diff --git a/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/AbstractFromDependenciesMojo.java b/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/AbstractFromDependenciesMojo.java index a92e8298d..1d03fde69 100644 --- a/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/AbstractFromDependenciesMojo.java +++ b/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/AbstractFromDependenciesMojo.java @@ -104,7 +104,7 @@ public abstract class AbstractFromDependenciesMojo extends AbstractDependencyFil * @since 2.0-alpha-2 */ @Parameter(property = "mdep.failOnMissingClassifierArtifact", defaultValue = "false") - protected boolean failOnMissingClassifierArtifact = true; + protected boolean failOnMissingClassifierArtifact; /** * @return Returns the outputDirectory. diff --git a/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/CopyDependenciesMojo.java b/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/CopyDependenciesMojo.java index 8b2d8c07d..dcf2e9141 100644 --- a/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/CopyDependenciesMojo.java +++ b/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/CopyDependenciesMojo.java @@ -64,7 +64,7 @@ public class CopyDependenciesMojo extends AbstractFromDependenciesMojo { * @since 2.0 */ @Parameter(property = "mdep.copyPom", defaultValue = "false") - protected boolean copyPom = true; + protected boolean copyPom; @Component private CopyUtil copyUtil; diff --git a/src/test/java/org/apache/maven/plugins/dependency/fromDependencies/TestCopyDependenciesMojo.java b/src/test/java/org/apache/maven/plugins/dependency/fromDependencies/TestCopyDependenciesMojo.java index 2a2cdfc3b..e1ec92823 100644 --- a/src/test/java/org/apache/maven/plugins/dependency/fromDependencies/TestCopyDependenciesMojo.java +++ b/src/test/java/org/apache/maven/plugins/dependency/fromDependencies/TestCopyDependenciesMojo.java @@ -429,6 +429,7 @@ public void testArtifactResolutionException() throws MojoFailureException { public void dotestArtifactExceptions() throws MojoFailureException { mojo.classifier = "jdk"; + mojo.failOnMissingClassifierArtifact = true; mojo.type = "java-sources"; try { diff --git a/src/test/java/org/apache/maven/plugins/dependency/fromDependencies/TestUnpackDependenciesMojo.java b/src/test/java/org/apache/maven/plugins/dependency/fromDependencies/TestUnpackDependenciesMojo.java index 6ff789178..463f8f9b6 100644 --- a/src/test/java/org/apache/maven/plugins/dependency/fromDependencies/TestUnpackDependenciesMojo.java +++ b/src/test/java/org/apache/maven/plugins/dependency/fromDependencies/TestUnpackDependenciesMojo.java @@ -491,16 +491,13 @@ public void dotestClassifierType(String testClassifier, String testType) throws } } - public void testArtifactNotFound() throws Exception { - dotestArtifactExceptions(false, true); + public void testArtifactResolutionException() throws MojoFailureException { + dotestArtifactExceptions(); } - public void testArtifactResolutionException() throws Exception { - dotestArtifactExceptions(true, false); - } - - public void dotestArtifactExceptions(boolean are, boolean anfe) throws Exception { + public void dotestArtifactExceptions() throws MojoFailureException { mojo.classifier = "jdk"; + mojo.failOnMissingClassifierArtifact = true; mojo.type = "java-sources"; try {