Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup a few obsolete TODOs #467

Merged
merged 1 commit into from
Nov 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ public File getMarkersDirectory() {
}

/**
* @param theMarkersDirectory The markersDirectory to set.
* @param theMarkersDirectory the markersDirectory to set
*/
public void setMarkersDirectory(File theMarkersDirectory) {
this.markersDirectory = theMarkersDirectory;
Expand All @@ -487,14 +487,14 @@ public void setMarkersDirectory(File theMarkersDirectory) {
// TODO: Set marker files.

/**
* @return true, if the groupId should be prepended to the filename.
* @return true, if the groupId should be prepended to the filename
*/
public boolean isPrependGroupId() {
return prependGroupId;
}

/**
* @param prependGroupId - true if the groupId must be prepended during the copy.
* @param prependGroupId true if the groupId must be prepended during the copy
*/
public void setPrependGroupId(boolean prependGroupId) {
this.prependGroupId = prependGroupId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ protected void appendArtifactPath(Artifact art, StringBuilder sb) {
}
sb.append(file);
} else {
// TODO: add param for prepending groupId and version.
sb.append(prefix);
sb.append(File.separator);
sb.append(DependencyUtil.getFormattedFileName(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,56 +76,67 @@ static class DuplicateLog implements Log {
StringBuilder sb = new StringBuilder();

/** {@inheritDoc} */
@Override
public void debug(CharSequence content) {
print("debug", content);
}

/** {@inheritDoc} */
@Override
public void debug(CharSequence content, Throwable error) {
print("debug", content, error);
}

/** {@inheritDoc} */
@Override
public void debug(Throwable error) {
print("debug", error);
}

/** {@inheritDoc} */
@Override
public void info(CharSequence content) {
print("info", content);
}

/** {@inheritDoc} */
@Override
public void info(CharSequence content, Throwable error) {
print("info", content, error);
}

/** {@inheritDoc} */
@Override
public void info(Throwable error) {
print("info", error);
}

/** {@inheritDoc} */
@Override
public void warn(CharSequence content) {
print("warn", content);
}

/** {@inheritDoc} */
@Override
public void warn(CharSequence content, Throwable error) {
print("warn", content, error);
}

/** {@inheritDoc} */
@Override
public void warn(Throwable error) {
print("warn", error);
}

/** {@inheritDoc} */
@Override
public void error(CharSequence content) {
System.err.println("[error] " + content.toString());
}

/** {@inheritDoc} */
@Override
public void error(CharSequence content, Throwable error) {
StringWriter sWriter = new StringWriter();
PrintWriter pWriter = new PrintWriter(sWriter);
Expand All @@ -139,6 +150,7 @@ public void error(CharSequence content, Throwable error) {
/**
* @see org.apache.maven.plugin.logging.Log#error(java.lang.Throwable)
*/
@Override
public void error(Throwable error) {
StringWriter sWriter = new StringWriter();
PrintWriter pWriter = new PrintWriter(sWriter);
Expand All @@ -151,28 +163,31 @@ public void error(Throwable error) {
/**
* @see org.apache.maven.plugin.logging.Log#isDebugEnabled()
*/
@Override
public boolean isDebugEnabled() {
// TODO: Not sure how best to set these for this implementation...
return false;
}

/**
* @see org.apache.maven.plugin.logging.Log#isInfoEnabled()
*/
@Override
public boolean isInfoEnabled() {
return true;
}

/**
* @see org.apache.maven.plugin.logging.Log#isWarnEnabled()
*/
@Override
public boolean isWarnEnabled() {
return true;
}

/**
* @see org.apache.maven.plugin.logging.Log#isErrorEnabled()
*/
@Override
public boolean isErrorEnabled() {
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,76 +230,87 @@ static class TestLog implements Log {
/**
* {@inheritDoc}
*/
@Override
public void debug(CharSequence content) {
print("debug", content);
}

/**
* {@inheritDoc}
*/
@Override
public void debug(CharSequence content, Throwable error) {
print("debug", content, error);
}

/**
* {@inheritDoc}
*/
@Override
public void debug(Throwable error) {
print("debug", error);
}

/**
* {@inheritDoc}
*/
@Override
public void info(CharSequence content) {
print("info", content);
}

/**
* {@inheritDoc}
*/
@Override
public void info(CharSequence content, Throwable error) {
print("info", content, error);
}

/**
* {@inheritDoc}
*/
@Override
public void info(Throwable error) {
print("info", error);
}

/**
* {@inheritDoc}
*/
@Override
public void warn(CharSequence content) {
print("warn", content);
}

/**
* {@inheritDoc}
*/
@Override
public void warn(CharSequence content, Throwable error) {
print("warn", content, error);
}

/**
* {@inheritDoc}
*/
@Override
public void warn(Throwable error) {
print("warn", error);
}

/**
* {@inheritDoc}
*/
@Override
public void error(CharSequence content) {
print("error", content);
}

/**
* {@inheritDoc}
*/
@Override
public void error(CharSequence content, Throwable error) {
StringWriter sWriter = new StringWriter();
PrintWriter pWriter = new PrintWriter(sWriter);
Expand All @@ -313,6 +324,7 @@ public void error(CharSequence content, Throwable error) {
/**
* @see org.apache.maven.plugin.logging.Log#error(java.lang.Throwable)
*/
@Override
public void error(Throwable error) {
StringWriter sWriter = new StringWriter();
PrintWriter pWriter = new PrintWriter(sWriter);
Expand All @@ -325,28 +337,31 @@ public void error(Throwable error) {
/**
* @see org.apache.maven.plugin.logging.Log#isDebugEnabled()
*/
@Override
public boolean isDebugEnabled() {
// TODO: Not sure how best to set these for this implementation...
return false;
}

/**
* @see org.apache.maven.plugin.logging.Log#isInfoEnabled()
*/
@Override
public boolean isInfoEnabled() {
return true;
}

/**
* @see org.apache.maven.plugin.logging.Log#isWarnEnabled()
*/
@Override
public boolean isWarnEnabled() {
return true;
}

/**
* @see org.apache.maven.plugin.logging.Log#isErrorEnabled()
*/
@Override
public boolean isErrorEnabled() {
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.apache.maven.plugins.dependency.utils.DependencyStatusSets;

public class ResolveDependenciesMojoTest extends AbstractDependencyMojoTestCase {
@Override
protected void setUp() throws Exception {
// required for mojo lookups to work
super.setUp("dss", true);
Expand Down Expand Up @@ -60,8 +61,7 @@ public void testOptionalDependencyFormatting() throws IOException {
assertTrue(output.contains("g:a:jar:1.0:test (optional)" + System.lineSeparator()));
}

public void doTestDependencyStatusLog(Set<Artifact> artifacts) {
// TODO: implement logger to check correct output
private void doTestDependencyStatusLog(Set<Artifact> artifacts) {
// this test is just looking for unexpected exceptions.

ResolveDependenciesMojo mojo = newMojo(new DependencyStatusSets());
Expand Down