diff --git a/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/AbstractDependencyFilterMojo.java b/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/AbstractDependencyFilterMojo.java index 655458b5d..d8de436cf 100644 --- a/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/AbstractDependencyFilterMojo.java +++ b/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/AbstractDependencyFilterMojo.java @@ -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; @@ -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; diff --git a/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/BuildClasspathMojo.java b/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/BuildClasspathMojo.java index 698c2739e..5604ece9e 100644 --- a/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/BuildClasspathMojo.java +++ b/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/BuildClasspathMojo.java @@ -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( diff --git a/src/test/java/org/apache/maven/plugins/dependency/analyze/TestAnalyzeDuplicateMojo.java b/src/test/java/org/apache/maven/plugins/dependency/analyze/TestAnalyzeDuplicateMojo.java index 339d2b646..b0b758092 100644 --- a/src/test/java/org/apache/maven/plugins/dependency/analyze/TestAnalyzeDuplicateMojo.java +++ b/src/test/java/org/apache/maven/plugins/dependency/analyze/TestAnalyzeDuplicateMojo.java @@ -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); @@ -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); @@ -151,14 +163,15 @@ 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; } @@ -166,6 +179,7 @@ public boolean isInfoEnabled() { /** * @see org.apache.maven.plugin.logging.Log#isWarnEnabled() */ + @Override public boolean isWarnEnabled() { return true; } @@ -173,6 +187,7 @@ public boolean isWarnEnabled() { /** * @see org.apache.maven.plugin.logging.Log#isErrorEnabled() */ + @Override public boolean isErrorEnabled() { return true; } diff --git a/src/test/java/org/apache/maven/plugins/dependency/exclusion/AnalyzeExclusionsMojoTest.java b/src/test/java/org/apache/maven/plugins/dependency/exclusion/AnalyzeExclusionsMojoTest.java index bbcc74857..f4e37d424 100644 --- a/src/test/java/org/apache/maven/plugins/dependency/exclusion/AnalyzeExclusionsMojoTest.java +++ b/src/test/java/org/apache/maven/plugins/dependency/exclusion/AnalyzeExclusionsMojoTest.java @@ -230,6 +230,7 @@ static class TestLog implements Log { /** * {@inheritDoc} */ + @Override public void debug(CharSequence content) { print("debug", content); } @@ -237,6 +238,7 @@ public void debug(CharSequence content) { /** * {@inheritDoc} */ + @Override public void debug(CharSequence content, Throwable error) { print("debug", content, error); } @@ -244,6 +246,7 @@ public void debug(CharSequence content, Throwable error) { /** * {@inheritDoc} */ + @Override public void debug(Throwable error) { print("debug", error); } @@ -251,6 +254,7 @@ public void debug(Throwable error) { /** * {@inheritDoc} */ + @Override public void info(CharSequence content) { print("info", content); } @@ -258,6 +262,7 @@ public void info(CharSequence content) { /** * {@inheritDoc} */ + @Override public void info(CharSequence content, Throwable error) { print("info", content, error); } @@ -265,6 +270,7 @@ public void info(CharSequence content, Throwable error) { /** * {@inheritDoc} */ + @Override public void info(Throwable error) { print("info", error); } @@ -272,6 +278,7 @@ public void info(Throwable error) { /** * {@inheritDoc} */ + @Override public void warn(CharSequence content) { print("warn", content); } @@ -279,6 +286,7 @@ public void warn(CharSequence content) { /** * {@inheritDoc} */ + @Override public void warn(CharSequence content, Throwable error) { print("warn", content, error); } @@ -286,6 +294,7 @@ public void warn(CharSequence content, Throwable error) { /** * {@inheritDoc} */ + @Override public void warn(Throwable error) { print("warn", error); } @@ -293,6 +302,7 @@ public void warn(Throwable error) { /** * {@inheritDoc} */ + @Override public void error(CharSequence content) { print("error", content); } @@ -300,6 +310,7 @@ public void error(CharSequence content) { /** * {@inheritDoc} */ + @Override public void error(CharSequence content, Throwable error) { StringWriter sWriter = new StringWriter(); PrintWriter pWriter = new PrintWriter(sWriter); @@ -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); @@ -325,14 +337,15 @@ 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; } @@ -340,6 +353,7 @@ public boolean isInfoEnabled() { /** * @see org.apache.maven.plugin.logging.Log#isWarnEnabled() */ + @Override public boolean isWarnEnabled() { return true; } @@ -347,6 +361,7 @@ public boolean isWarnEnabled() { /** * @see org.apache.maven.plugin.logging.Log#isErrorEnabled() */ + @Override public boolean isErrorEnabled() { return true; } diff --git a/src/test/java/org/apache/maven/plugins/dependency/resolvers/ResolveDependenciesMojoTest.java b/src/test/java/org/apache/maven/plugins/dependency/resolvers/ResolveDependenciesMojoTest.java index a9d3c6077..ff9197973 100644 --- a/src/test/java/org/apache/maven/plugins/dependency/resolvers/ResolveDependenciesMojoTest.java +++ b/src/test/java/org/apache/maven/plugins/dependency/resolvers/ResolveDependenciesMojoTest.java @@ -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); @@ -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 artifacts) { - // TODO: implement logger to check correct output + private void doTestDependencyStatusLog(Set artifacts) { // this test is just looking for unexpected exceptions. ResolveDependenciesMojo mojo = newMojo(new DependencyStatusSets());