so essentially you have 2 different executions which you want to trigger with 2 
different profiles 
 
http://www.thinkplexx.com/learn/howto/maven2/m2-execution/configure-default-and-alternative-executions-in-maven-pom-using-profiles

there are a number of triggers you can implement to trigger your profile:

absence or presence of a file
which maven phase you want the execution to bind to
environment variables detection
detection of OS variables
property values
 
http://maven.apache.org/settings.html#Profiles

Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.

  


> Date: Tue, 19 Mar 2013 12:35:04 +0100
> Subject: Re: maven-dependency-plugin
> From: [email protected]
> To: [email protected]
> 
> Hi,
> Have you try to add two differents executions (with differents id), one
> for type war the others for type jar ?
> 
> 
> On Tue, Mar 19, 2013 at 10:51 AM, virg g <[email protected]> wrote:
> 
> > HI,
> > I have project which contains many modules and creates jars and wars. My
> > Build structure is parent POM has all modules. I am placing all my plugins
> > in PARENT POM to be required to to applied all child modules. My
> > requirement is to copy all these created jars to one location and wars to
> > another location. I am using maven-dependency-plugin to do this. This is
> > sample plugin. I have two issues with this.
> > 1. I am able to copy all the jars and wars to one folder, but not jars to
> > one folder and wars to another. Not able to distinguish
> > 2. SInce i have placed this plugin in parent, along with all the jars and
> > wars, from Parent POM type is POM it is copying project.pom to this
> > location also. How to exclude project.pom being copied.
> >
> > Here is my plugin. I have added 2 artifactItems one for jar and another
> > with war by mentioning TYPE as jar and war for each, also added excludes
> > and includes, nothing worked. Any solution to my problem? Really it would
> > be great help.
> >
> > <plugin>
> > <groupId>org.apache.maven.plugins</groupId>
> > <artifactId>maven-dependency-plugin</artifactId>
> > <version>2.7</version>
> > <executions>
> > <execution>
> > <id>copy-installed</id>
> > <phase>install</phase>
> > <goals>
> > <goal>copy</goal>
> > </goals>
> > <configuration>
> > <artifactItems>
> > <artifactItem>
> > <groupId>${project.groupId}</groupId>
> >
> > <artifactId>${project.artifactId}</artifactId>
> > <version>${project.version}</version>
> > <type>${project.packaging}</type>
> > <overWrite>true</overWrite>
> >
> > <destFileName>${project.artifactId}.${project.packaging}</destFileName>
> > </artifactItem>
> > </artifactItems>
> >
> > <outputDirectory>../../${install.jar.folder}</outputDirectory>
> > </configuration>
> > </execution>
> > </executions>
> > </plugin>
> >
> > Thanks
> > Virg
> >
> 
> 
> 
> -- 
> Adrien Rivard
                                          

Reply via email to