[
http://jira.codehaus.org/browse/MNG-2314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_90583
]
Joerg Schaible commented on MNG-2314:
-------------------------------------
With the classifier you declare a secondary (aka attached), but different
artifact. It is not even necessary to have a main artifact. There's no
difference in this respect with the dependency resolution nor the repo.
You might be confused, since some plugins resolve those secondary artifacts on
their own, even if they are not declared in the dependency section itself, e.g.
the Eclipse plugin looks automatically for all declared and transitive
dependencies for the appropriate source artifact (for downloadSources=true),
but this is the plugin's task and has nothing to do with the dependency
mechanism per se.
In your case you try to add the attached artifact to the standard dependency
mechanism and therefore you have to declare the classifier, since the compiler
plugin does not look for undeclared attached artifacts on its own.
> <dependencyManagement> not inherited more than one level
> --------------------------------------------------------
>
> Key: MNG-2314
> URL: http://jira.codehaus.org/browse/MNG-2314
> Project: Maven 2
> Issue Type: Bug
> Components: Dependencies, Inheritance and Interpolation
> Affects Versions: 2.0.4
> Reporter: Simon Kepp Nielsen
> Assigned To: John Casey
> Fix For: 2.0.5
>
> Attachments: MNG-2314.test.zip
>
>
> Version information from the <dependencyManagement> section in the parent pom
> is correctly inherited to dependencies in a child project. But if you try to
> inherit version information from a grand-parent project, you get the
> following error:
> Error Building POM (may not be this project's POM).
> POM Location: <child pom location>
> Validation Messages:
> [0] 'dependencies.dependency.version' is missing for
> <groupId>:<artifactId>
> Reason: Failed to validate POM
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira