[ https://issues.apache.org/jira/browse/MWAR-399?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Karl Heinz Marbaise closed MWAR-399. ------------------------------------ Resolution: Cannot Reproduce Fix Version/s: (was: waiting-for-feedback) > Maven WAR Plugin imports MAR/AAR Dependencies - can not be disabled > ------------------------------------------------------------------- > > Key: MWAR-399 > URL: https://issues.apache.org/jira/browse/MWAR-399 > Project: Maven WAR Plugin > Issue Type: Bug > Affects Versions: 3.0.0 > Reporter: Jeff Thomas > Priority: Major > > Included Axis2 AAR/MAR Dependencies are automatically added to the WAR. This > functionality can currently not be disabled. > Axis2 provides a separate plugin for performing the task of creating an Axis2 > Repository including AAR/MAR dependencies > ("org.apache.axis2:axis2-repo-maven-plugin"). > Reasons to allow disabling: > 1. The Axis2 Repository *default* is "WEB-INF" (ie. WEB-INF/modules, > WEB-INF/services); however this is not a requirement. The Axis2 Repository > can be located somewhere else ("WEB-INF/foobar/modules") - by default it is > relative to the location of the "axis2.xml" file. > 2. A single WAR can contain multiple Axis2 repositories with different > modules and services. (ie. "WEB-INF/client/modules" and > "WEB-INF/server/moduels"). Currently *all* MARs are sent to "WEB-INF/lib" > and adding the Axis2 plugin to the mix to use a non-standard location results > in at least two copies of every AAR/MAR. > Filtering the artifact "*.aar" or "*.mar" with "<packagingExcludes>" works on > the final WAR packaging (not on the exploded); however, causes other problems > - all filtered artifacts are no longer recognized as dependencies. As such, > in a multi-module project with a custom MAR and a WAR dependent on the MAR - > if filtered, the MAR project is no longer correctly associated with the WAR > project disabling dynamic hotswap debugging. > I believe what I am looking for is a MOJO parameter to disable the packaging > of specific artifact types (without completely filtering them out of the > dependencies). This parameter would probably be set in the > WarPackagingContext and picked up in the ArtifactsPackagingTask. (?!?) > My workaround at the moment is not so great. I have build a special > variation of the axis2-repo-maven-plugin which picks up MAR dependencies with > scope "runtime" and flagged as optional. The maven-war-plugin ignores these. > The problem with the workaround is the above mentioned Eclipse m2e problem > which doesn't associate the MAR source projects on runtime dependencies. > This can be resolved with an Eclipse-only profile, but the solution is not > "clean". Disabling the MAR packaging on the WAR would solve these problems. -- This message was sent by Atlassian JIRA (v7.6.3#76005)