[
http://jira.codehaus.org/browse/MPIR-193?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Siam Rafiee closed MPIR-193.
----------------------------
Resolution: Not A Bug
Created in wrong Project... Moving to Maven 2 & 3.
> Compile scoped dependencies replaced by test
> --------------------------------------------
>
> Key: MPIR-193
> URL: http://jira.codehaus.org/browse/MPIR-193
> Project: Maven 2.x Project Info Reports Plugin
> Issue Type: Bug
> Affects Versions: 2.2
> Environment: Windows XP SP2
> Reporter: Siam Rafiee
>
> Maven doesn't consider scopes correctly when applying the "nearest
> definition" rule on competing dependency definitions.
> We experienced an issue where a transitive compile time dependency on antlr
> was clobbered to test scope since a test framework artifact (at test scope)
> had also declared a dependency on antlr.
> <dependencies>
> <dependency>
> <!-- some dependency that transitively pulls in antlr 3 levels deep -->
> <scope>compile</scope>
> </dependency>
> <dependency>
> <!-- some test framework dependency that transitively pulls in antlr 2
> levels deep -->
> <scope>test</scope>
> </dependency>
> </dependencies>
> Since the test framework pulls in antlr at a shallower depth, it takes
> priority, but also clobbers antlr's scope to 'test'. Thus, the first declared
> library will now fail to function correctly at runtime since the required
> antlr jar hasn't been packaged.
> Since the module is unaware whether it needs antlr at all, it doesn't make
> sense for it to declare it directly as a dependency or even in a dependency
> management section.
> If a module requires an artifact at compile time at *any* depth, the scope
> should default to 'compile', and not be replaced by 'test' by competing
> dependency definitions.
--
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