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: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to