[
http://jira.codehaus.org/browse/MWAR-33?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=164557#action_164557
]
Alex Rau commented on MWAR-33:
------------------------------
Paul
I agree with you that this could be more under control of the war plugin.
However it looks (at least to me) like the handling (resolution) of artifacts
of certain types (WAR in our case here) is fundamentally settled in the plexus
configuration and artifact resolution. The war plugin (from what I've seen
during my debug session) just gets the resolved artifacts presented without
being able to control that process. Therefore is "just receives" the resolved
dependencies based on the WAR artifact type which does (based on the plexus
configuration) not include transitive dependencies.
*If* the WAR plugin should be configurable in this respect I guess it's more
difficult as there needs to be some communication between WAR plugin and
dependency resolution (which does not exist as far as I know).
I think the actual question first is: should the dependency resolution really
be different for WARs compared to JARs ? Does a WAR dependency justify the
dependency resolution mechanism to cut off transitive dependencies ? In the end
both types of artifacts are quite similar - both are essentially java class
artifacts (or libraries if you want) where the WAR artifact may include
additional filesystem resources and libraries. The existence of libraries leads
to a conflict here as the WAR bundle itself and maven "want" to take over
control over dependencies in general. The current situation is: the WAR file
wins and maven does not deal with transitive dependencies in favor of the WAR
artifact. This leads to the conflict that "on-top" artifacts based on WAR files
can't be handled by maven properly as there is some kind of processing gap in
the dependency chain where maven is missing proper information about
dependencies to properly deal with them.
This is why I personally do not really consider this to be a hack. I think the
change would reflect a fundamental change in the behaviour of dealing with WAR
artifacts. And it would not just be a local fix to the WAR plugin but a change
which would straighten the dependency resolution in general for maven (and all
affected plugins). I'm aware of that this is a quite severe change (e.g. what
are the effects on other plugins dealing with WARs ?). But on the other hand I
consider this issue being a bigger problem as well as Maven remains some kind
of "incomplete" dependeny maangement solution for WAR projects.
> jars with differents versions can be in WEB-INF/lib with war as dependencies
> ----------------------------------------------------------------------------
>
> Key: MWAR-33
> URL: http://jira.codehaus.org/browse/MWAR-33
> Project: Maven 2.x War Plugin
> Issue Type: Bug
> Environment: all
> Reporter: Olivier Lamy
> Assignee: Stephane Nicoll
> Fix For: 2.1
>
> Attachments: MWAR-33-example.zip, MWAR-33-workaround.zip
>
> Original Estimate: 15 minutes
> Time Spent: 30 minutes
> Remaining Estimate: 0 minutes
>
> My pom has the following dependencies :
> - log4j:log4j:1.2.13
> - a war with log4j:log4j:1.2.11 included
> Result the two jars are in WEB-INF/lib.
--
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