jira-importer commented on issue #189:
URL: 
https://github.com/apache/maven-war-plugin/issues/189#issuecomment-2967849064

   **[Alex 
Rau](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=rauar)** 
commented
   
   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.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to