[ 
https://issues.apache.org/jira/browse/MWAR-294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14526575#comment-14526575
 ] 

Marc Rohlfs edited comment on MWAR-294 at 5/4/15 12:22 PM:
-----------------------------------------------------------

Hi [~khmarbaise],
You are not right at this point. Using WAR dependencies with runtime scope is 
the intended and documented way to do WAR overlays - see [Maven WAR Plugin - 
Overlays|https://maven.apache.org/plugins/maven-war-plugin/overlays.html].
Kind regards, Marc


was (Author: marc.rohlfs):
Hi [~khmarbaise],
You are not right at this point. Using WAR dependencies with runtime scope is 
the intended and documented way to do WAR overlays - see [Maven WAR Plugin - 
Overlayshttps://maven.apache.org/plugins/maven-war-plugin/overlays.html].


> Unwanted transitive dependencies added to the WAR with dependency management 
> and Maven 3.
> -----------------------------------------------------------------------------------------
>
>                 Key: MWAR-294
>                 URL: https://issues.apache.org/jira/browse/MWAR-294
>             Project: Maven WAR Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1.1, 2.3
>         Environment: Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
> Maven home: /opt/apache-maven-3.0.4
> Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
> Java home: /usr/lib/jvm/java-6-sun-1.6.0.26/jre
> Default locale: en_GB, platform encoding: UTF-8
> OS name: "linux", version: "2.6.32-43-generic", arch: "i386", family: "unix"
>            Reporter: Marc Rohlfs
>         Attachments: MWAR-294.zip
>
>
> With Maven 3, unwanted libraries are added to the _WEB-INF/lib_ folder of the 
> packed web app in a multi-module build if:
> * The WAR module has a JAR dependency with {{provided}} scope.
> * The POM of the WAR module (or its parent POM) has a 
> {{dependencyManagement}} section that defines the transitive dependencies of 
> the JAR module.
> * The dependencies in the {{dependencyManagement}} section are *not* defined 
> as dependencies of the WAR module.
> * The dependencies in the {{dependencyManagement}} section explicitly define 
> {{compile}} or {{runtime}} scope.
> This leads to unwanted dependencies in the packaged web app or even duplicate 
> dependencies when using overlays.
> When running the build with _Maven 2.2.1_, it works fine and doesn't add 
> those unwanted dependencies to the web app.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to