axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Veithen (JIRA)" <>
Subject [jira] [Commented] (AXIS2-5783) Maven axis2-repo-maven-plugin + Maven WAR plugin with *.mar artifacts
Date Thu, 09 Jun 2016 17:46:21 GMT


Andreas Veithen commented on AXIS2-5783:

I think the only reasonable solution for this problem is to submit a patch for the maven-war-plugin
that would allow to disable the feature introduced by MWAR-193.

> Maven axis2-repo-maven-plugin + Maven WAR plugin with *.mar artifacts
> ---------------------------------------------------------------------
>                 Key: AXIS2-5783
>                 URL:
>             Project: Axis2
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: 1.7.3
>            Reporter: Jeff Thomas
>            Priority: Trivial
>             Fix For: 1.7.4, 1.8.0
> I have a conflict currently between the 'axis2-repo-maven-plugin' and the 'maven-war-plugin'.
> At some point someone upgraded the Maven WAR plugin so that it automatically packs any
"<type>mar</type>" runtime dependency into the resulting WAR.  Unfortunately it
is also not possible to disable this "feature" on the maven-war-plugin.
> I *want* to use the axis2-repo-maven-plugin to place different ".mar" artifacts into
two *different* Axis2 repositories in the same WAR (i.e. WEB-INF/modules and WEB-INF/client/modules).
 While the axis2-repo-maven-plugin does its job perfectly, the WAR plugin always runs last
and packs *ALL* MAR artifacts into WEB-INF/modules.
> My "workaround" which is most likely not release-viable was to change the axis2-repo-maven-plugin so that it works on MAR artifacts with scope "provided" instead
of "runtime" and "@requiresDependencyResolution compile" instead of "runtime".  This keeps
the WAR plugin from packing them automatically and allows me to run two separate executions
for my two repositories.
> {code:java}
> /**
>  * Creates an Axis2 repository from the project's runtime dependencies. This goal is
>  * used to build an Axis2 repository that will be packaged into some kind of distribution.
>  * 
>  * @goal create-repository
>  * @phase package
>  * @requiresDependencyResolution compile
>  */
> public class CreateRepositoryMojo extends AbstractCreateRepositoryMojo {
>     /**
>      * The output directory where the repository will be created.
>      * 
>      * @parameter default-value="${}/repository"
>      */
>     private File outputDirectory;
>     @Override
>     protected String getScope() {
>         return Artifact.SCOPE_PROVIDED;
>     }
>     @Override
>     protected File getOutputDirectory() {
>         return outputDirectory;
>     }
> }
> {code}
> I am not sure what a release-viable solution would look like...or even if it is a concern
for this plugin(?!?).  The best-possible solution would be an option to exclude .mar artifacts
in the maven-war-plugin ... but if possible I want to get away from having to customize the
Axis2 Plugin with every new release.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message