Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Not A Problem
-
2.0-alpha-1, 2.0-alpha-2, 2.0-alpha-3, 2.0-alpha-4, 2.0, 2.1, 2.2
-
None
-
None
-
Maven 2.0.9, dependency plugin 2.0.
Description
I used the dependency:copy-dependencies goal on the command-line, and wanted to set the "failOnMissingClassifierArtifact" option to "false".
Command-line used:
mvn -Dclassifier=sources -DfailOnMissingClassifierArtifact=false -DoutputDirectory=x/y/z dependency:copy-dependencies
The problem is that the "failOnMissingClassifierArtifact" remained "true". This was also visible after running maven in debug mode. After looking in the source code, I saw that the "failOnMissingClassifierArtifact" class field was specified as '@parameter expression="${mdep.failOnMissingClassifierArtifact}" default-value="true"'.
The "outputDirectory" parameter however was specified as '@parameter expression="${outputDirectory}" default-value="${project.build.directory}/dependency"'.
Thus, without the "mdep." prefix.
The outputDirectory worked so I changed the commandline to include the mdep. prefix:
mvn -Dclassifier=sources -Dmdep.failOnMissingClassifierArtifact=false -DoutputDirectory=x/y/z dependency:copy-dependencies
Now it worked. According to the documentation however the "mdep." prefix is not needed, and I would find it strange if it was needed. I think this problem is also true for other parameters, maybe even for other goals.