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
