Return-Path: X-Original-To: apmail-maven-users-archive@www.apache.org Delivered-To: apmail-maven-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4FDD7F82A for ; Tue, 2 Apr 2013 19:42:06 +0000 (UTC) Received: (qmail 2848 invoked by uid 500); 2 Apr 2013 19:42:04 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 2777 invoked by uid 500); 2 Apr 2013 19:42:03 -0000 Mailing-List: contact users-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Users List" Reply-To: "Maven Users List" Delivered-To: mailing list users@maven.apache.org Received: (qmail 2769 invoked by uid 99); 2 Apr 2013 19:42:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Apr 2013 19:42:03 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS,TVD_FW_GRAPHIC_NAME_MID X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [12.161.118.91] (HELO mx2.belden.com) (12.161.118.91) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Apr 2013 19:41:57 +0000 X-AuditID: 0a01015b-b7f776d0000012ed-a8-515b346fd752 Received: from bdcnotes1.beldencdt.com ( [10.1.1.71]) by mx2.belden.com (Service Ready) with SMTP id 78.75.04845.F643B515; Tue, 2 Apr 2013 15:41:35 -0400 (EDT) In-Reply-To: <1364926020976-5752479.post@n5.nabble.com> References: <1364926020976-5752479.post@n5.nabble.com> Subject: Re: Can I force a plugin to not run during parent pom execution phase? X-KeepSent: 4259E7D0:5750CD0C-85257B41:006AB003; type=4; name=$KeepSent To: "Maven Users List" X-Mailer: Lotus Notes Release 8.5.3FP2 SHF99 September 04, 2012 Message-ID: From: Alejandro.Endo@miranda.com Date: Tue, 2 Apr 2013 15:41:35 -0400 X-MIMETrack: Serialize by Router on BDCNotes1/BeldenCDT(Release 8.5.3|September 15, 2011) at 04/02/2013 03:41:35 PM MIME-Version: 1.0 Content-type: multipart/related; Boundary="0__=0ABBF1D2DFF936938f9e8a93df938690918c0ABBF1D2DFF93693" X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrNKsWRmVeSWpSXmKPExsXCxcjorptvEh1osOE7q8WjrdcZHRg92p8K BTBGNTDaJCWWlAVnpufp29kk5uXllySWpCqkpBYn2yo5peakpOYpuGQWJ+ckZuamFul6Bvvr WliYWiopZKbYKhkpKRTkJCan5qbmldgqJRYUpOalKNlxKWAAG6CyzDyF1Lzk/JTMvHRbJZg5 uoZKCXNYM17v0yxYuIqxYtvlhSwNjCsnMXYxcnJICJhI/L4/mQnCFpO4cG89WxcjF4eQwCJG iclL37KCJDgFzCW+fjwFlOAASphJLLtaBRIWFvCXaN2zjg2i11Pi/Ny/YDNFBPQllh28zwIR t5f4/ugDmM0rECrROWcTO4jNJqAgMffKJrBeFgEViWvTt7FD1JdK3N3ymQ2iXlDi5MwnYL3M AukS71d3s01g5J+FJDULSQrCzpbYMnsOlK0lsXlbEyuErS3x5N0FIJsDyNaU2L0iF8KUllj+ jwNVBYitJzHx2GEmiBJjiY37MyFMK4mDawwgKhQlpi1qYFzAyLOKkS+3wkgvCRyNesn5uZsY IakhegfjsR+qhxgFOBiVeHj//okKFGJNLCuuzD3EqAI04NGG1RcYpVjy8vNSlUR4D+lFBwrx piRWVqUW5ccXleakFh9irAQGzURmKe7kfGA6yyuJNzYwoC5HSZw3oN48UEggHZges1NTC1KL YHYzcXAeYpTg4JISKQYmuNSixNKSjHhQKo4vBiZjqQbGKWtjnKSkX83axrV3Vtr2V9VzDZal 7o+e+MDiGsPKQL15OzIObymeHO51QlvB49Ouv+w7Pn58KDFFoHpWZKsY56uSmJjgXd77Pjbq m80XeXA5R1uj8kdGrcR869jlZ1a9djBY823i3KY581iPWD7YEnk3yaBo8ZGgthk5zepfIn5o rM6rCIk8qMRSnJFoqMVcVJwIAMNfpAeOAwAA X-Virus-Checked: Checked by ClamAV on apache.org --0__=0ABBF1D2DFF936938f9e8a93df938690918c0ABBF1D2DFF93693 Content-type: multipart/alternative; Boundary="1__=0ABBF1D2DFF936938f9e8a93df938690918c0ABBF1D2DFF93693" --1__=0ABBF1D2DFF936938f9e8a93df938690918c0ABBF1D2DFF93693 Content-type: text/plain; charset=US-ASCII content-transfer-encoding: quoted-printable A trick i use, provided the plugin has a configuration to skip a run, is having something like this in the parent org.apache.maven.plugins maven-assembly-plugin 2.4 my-id package true config false single true false So as you can see, inside execution i enable inheritance and outside execution i configure the plugin to skip the run using the skipAssembly configuration and disable inheritance Notice that this still starts the plugin execution, but the run will end very early when it detects it will be skipped. This might be a problem when e.g. the plugin has a mandatory config argument that you define in the children. In that case, the verification for the parameter will make the build fail before you get to skip it I know this is limited but maybe your plugin has such a configuration. or if you wrote it yourself you can add it If this is not useful, take a look at this. The answer was not useful to me but the discussion is there anyway http://stackoverflow.com/questions/1625492/execute-maven-plugin-goal-on-chil= d-modules-but-not-on-parent Alejandro Endo | Software Designer/Concepteur de logiciels From: laredotornado-3 To: users@maven.apache.org, Date: 02/04/2013 02:07 PM Subject: Can I force a plugin to not run during parent pom execution phase? Hi, I'm using Maven 3.0.3. I've included this plugin in a profile in my parent pom, however, when I run my parent pom, I don't want this to be executed as part of the parent pom being built (I do want it executed for each of the child modules). How can I make this plugin not run during the parent execution phase? 4.0.0 org.mainco.subco subco 12.0.0-SNAPSHOT moduleA moduleB moduleC pom ... org.liquibase liquibase-maven-plugin 2.0.1 mysql mysql-connector-java 5.1.18 build-database process-test-resources com.mysql.jdbc.Driver jdbc:mysql://${test.mysql.db.host}:${test.mysql.db.port}/$ {test.mysql.db.sid} ${test.mysql.db.user} $ {test.mysql.db.password} $ {project.build.directory}/db.changelog-master.xml false update Thanks, - Dave -- View this message in context: http://maven.40175.n5.nabble.com/Can-I-force-a-plugin-to-not-run-during-pare= nt-pom-execution-phase-tp5752479.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@maven.apache.org For additional commands, e-mail: users-help@maven.apache.org DISCLAIMER: Privileged and/or Confidential information may be contained in this message. If you are not the addressee of this message, you may not copy, use or deliver this message to anyone. In such event, you should destroy the message and kindly notify the sender by reply e-mail. It is understood that opinions or conclusions that do not relate to the official business of the company are neither given nor endorsed by the company. Thank You. --1__=0ABBF1D2DFF936938f9e8a93df938690918c0ABBF1D2DFF93693 Content-type: text/html; charset=US-ASCII Content-Disposition: inline content-transfer-encoding: quoted-printable

A trick i use, provided the plugin h= as a configuration to skip a run, is having something like this in the paren= t

<plugin>
<groupId&= gt;org.apache.maven.plugins= </groupId>
<artifactId>maven-assembly-plugin&= lt;/artifactId>
<version&= gt;2.4</version>
<executions>
<execution>
<id>= my-id</id>
<phase&= gt;package</phase>
<inherited>tru= e</inherited>
<configuration>
<descriptorRefs>
<descriptorRef>c= onfig</descriptorRef>
</descriptorRefs>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
<goals&= gt;
<goal>single</goal>

</goals>
</execution>
</executions>
<configuration>
<skipAssembly>true</skipAssembly>
</configuration>
<inherited>false= </= inherited= > <!-- so skip isn't inherited -->
</plugin>


So as you can see, in= side execution= i enable inhe= ritance and outside execution i configure the plugin to skip the run using the skipAssembly configuration and disable inheritance

Notice that this stil= l starts the plugin execution, but the run will end very early when it detec= ts it will be skipped. This might be a problem when e.g. the plugin has a ma= ndatory config argument that you define in the children. In that case, the v= erification for the parameter will make the build fail before you get to ski= p it
I know this is limite= d but maybe your plugin has such a configuration. or if you wrote it yoursel= f you can add it

If this is not use= ful, take a look at this. The answer was not useful to me but the discussion= is there anyway

http://stackoverflow.com/questions/1625492/execute-maven-plugin-goal-on-= child-modules-but-not-on-parent

Alejandro Endo | Software Designer/Concepteur de logiciels


3D"Inactivelaredoto= rnado-3 ---02/04/2013 02:07:35 PM---Hi, I'm using Maven 3.0.3.  I've in= cluded this plugin in a profile in my parent

From: laredotornado-3 <laredotornado@gmail.com>=
To: users@maven.apache.org,
Date: 02/04/2013 02:07 PM
Subject: Can I force a plugin to not run during paren= t pom execution phase?





Hi,

I'm using Maven 3.0.3.  I've included this plugin in a profile in my pa= rent
pom, however, when I run my parent pom, I don't want this to be executed as<= br> part of the parent pom being built (I do want it executed for each of the child modules).  How can I make this plugin not run during the parent execution phase?

<modelVersion>4.0.0</modelVersion>
<groupId>org.mainco.subco</groupId>
<artifactId>subco</artifactId>
<version>12.0.0-SNAPSHOT</version>
<modules>
<module>moduleA</module>
<module>moduleB</module>
<module>moduleC</module>
<packaging>pom</packaging>

<profiles>
<profile>
...
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>= ;
<version>2.0.1</version>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactI= d>
<version>5.1.18</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>build-database</id>
<phase>process-test-resources</phase> <configuration>
<driver>com.mysql.jdbc.Driver</driver>= ;

<url>jdbc:mysql://${test.mysql.db.host}:${test.mysql.db.port}/${test.m= ysql.db.sid}</url>
<username>${test.mysql.db.user}</usernam= e>
<password>${test.mysql.db.password}</pas= sword>

<changeLogFile>${project.build.directory}/db.changelog-master.xml</= changeLogFile>
<promptOnNonLocalDatabase>false</promptO= nNonLocalDatabase>
</configuration>
<goals>
<goal>update</goal>
</goals>
</execution>
</executions>
</plugin>

Thanks, - Dave




--
View this message in context:
http://maven.40175.n5.nabble.com/Can-I-= force-a-plugin-to-not-run-during-parent-pom-execution-phase-tp5752479.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


DISCLAIMER: Privileged and/or Confidential information may be contained in this message. If you are not the addressee of this message, you may not copy, use or deliver this message to anyone. In such event, you should destroy the message and kindly notify the sender by reply e-mail. It is understood that opinions or conclusions that do not relate to the official business of the company are neither given nor endorsed by the company. Thank You.

--1__=0ABBF1D2DFF936938f9e8a93df938690918c0ABBF1D2DFF93693-- --0__=0ABBF1D2DFF936938f9e8a93df938690918c0ABBF1D2DFF93693--