This is what classifiers are for:

<project>
<build>
<plugin>
 <artifactId>maven-jar-plugin</artifactId>
 <configuration>
  <classifier>${myClassifier}</classifier>
 </configuration>

... then for each profile:

<profiles>
 <profile>
   <id>profile1</id>
   <properties>
     <myClassifier>profile1</myClassifier>
   </properties>

Viola

Eric

On 3/5/07, Andy Thompson <[EMAIL PROTECTED]> wrote:

i've run into a situation where i've got a set of jars that are identical
except for a set of properties files.

what i would like to do is have a set of profiles that inserts the
relevent
properties files into the jar.  And this isn't a problem.  But i would
also
like to automate that process where the build creates a jar for each
profile.  for example, in the parent pom.xml - i'd like it to run
mvn compile -DsomeProfile=bob
mvn compile -DsomeProfile=sally

and generate sally.jar and bob.jar.

thoughts on how to approach this?

--
Andrew R. Thompson
Currently in D.C. Consulting




--
Eric Redmond
http://codehaus.org/~eredmond

Reply via email to