maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <joerg.schai...@swisspost.com>
Subject Re: How to minimize quantity of profiles in pom.xml file
Date Fri, 14 Feb 2014 11:49:43 GMT
fred wrote:

> I need to build project for many kinds of environment so i need a lot of
> profiles with settings for this env.
> 
> There is a cutted module pom.xml -  pom.xml file
> <http://www.mediafire.com/view/47gt5jiegta7auq/pom.xml>

All you need in the profile is a simple property:

===================== %< ====================
 <build>
   <plugins>
     ...
     <plugin>
       ... your plugin ...
       <configuration>
        ... your configuration ...
        <targetURL>http://${profile.host}:
${port}/crx/packmgr/service.jsp</targetURL>
       </configuration>
       ...
     </plugin>
   </plugins>
   ...
 </build>
 <profiles>
   <profile>
     <id>auto-deploy</id>
     <properties>
       <profile.host>${host}</profile.host>
     </properties>
   </profile>
   <profile>
     <id>dev</id>
     <properties>
       <profile.host>${dev.host}</profile.host>
     </properties>
   </profile>
   ...
 </profiles>
===================== %< ====================

As rule of thumb: Just put the stuff into the profile that *is* actually 
different.

- Jörg


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


Mime
View raw message