Maven Golden rule: One project produces one artifact. http://www.sonatype.com/people/2010/01/how-to-create-two-jars-from-one-project-and-why-you-shouldnt/
On Mon, Jan 25, 2010 at 17:36, Rémy <[email protected]> wrote: > > Hello, > > I want to generate two war from the same project. I managed to solve the > problem with profiles, but I'm not satisfied with the solution. > > In the POM I set this: > > <profile> > <id>test1</id> > <build> > <plugins> > <plugin> > <artifactId>maven-war-plugin</artifactId> > <configuration> > <webResources> > <resource> > <directory>${basedir}/repoA</directory> > <targetPath>repoA</targetPath> > </resource> > <resource> > <directory>${basedir}/repoB</directory> > <targetPath>repoB</targetPath> > </resource> > </webResources> > <warName>warTest1</warName> > </configuration> > </plugin> > </plugins> > </build> > </profile> > <profile> > <id>test1</id> > <build> > <plugins> > <plugin> > <artifactId>maven-war-plugin</artifactId> > <configuration> > <webResources> > <resource> > <directory>${basedir}/repoA</directory> > <targetPath>repoA</targetPath> > </resource> > <resource> > <directory>${basedir}/repoC</directory> > <targetPath>repoC</targetPath> > </resource> > </webResources> > <warName>warTest2</warName> > </configuration> > </plugin> > </plugins> > </build> > </profile> > > How can I do to factorize some informations between differents profiles. In > the example above, I would like to factorize the adding of repo in the war. > > Thank you. > > Rémy > > -- > View this message in context: > http://old.nabble.com/Generate-2-war-with-the-same-POM-tp27307985p27307985.html > Sent from the Maven - Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
