Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 265C2200AE4 for ; Thu, 9 Jun 2016 18:02:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 2527A160A58; Thu, 9 Jun 2016 16:02:23 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 67059160A59 for ; Thu, 9 Jun 2016 18:02:22 +0200 (CEST) Received: (qmail 45850 invoked by uid 500); 9 Jun 2016 16:02:21 -0000 Mailing-List: contact java-dev-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@axis.apache.org Delivered-To: mailing list java-dev@axis.apache.org Received: (qmail 45837 invoked by uid 99); 9 Jun 2016 16:02:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Jun 2016 16:02:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id F40AF2C1F5C for ; Thu, 9 Jun 2016 16:02:20 +0000 (UTC) Date: Thu, 9 Jun 2016 16:02:20 +0000 (UTC) From: "Jeff Thomas (JIRA)" To: java-dev@axis.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AXIS2-5783) Maven axis2-repo-maven-plugin + Maven WAR plugin with *.mar artifacts MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 09 Jun 2016 16:02:23 -0000 [ https://issues.apache.org/jira/browse/AXIS2-5783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15322762#comment-15322762 ] Jeff Thomas commented on AXIS2-5783: ------------------------------------ Hello Andreas, I am familiar with that post :). The thing is... and here is probably a grey area... your suggestion works great for the final WAR archive. Which means that the modules will / can be excluded from the final WAR. The problem is really with the development environment when working with WARs that do this. This means on both Eclipse (m2e-wtp Plugin) and Intellij, an exploded WAR is built and used for testing the WAR (i.e. in Tomcat). No matter what you do, the packaging excludes do not apply to this exploded WAR ... the filters are applied to generate the end-WAR from the exploded-WAR. So during development, all MARs always end up in WEB-INF/modules. > Maven axis2-repo-maven-plugin + Maven WAR plugin with *.mar artifacts > --------------------------------------------------------------------- > > Key: AXIS2-5783 > URL: https://issues.apache.org/jira/browse/AXIS2-5783 > 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 "mar" 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 CreateRepositoryMojo.java 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 typically > * 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="${project.build.directory}/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 (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org For additional commands, e-mail: java-dev-help@axis.apache.org