Hi,
please don't write in all caps (even if it's just the subject), this is
considered rude. People will decide to read and answer you question not
based on how strong you try to advertise it but on how good you describe
your problem and if they know an answer.
Regarding your question. this should do what you want:
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>my-test-app</artifactId>
<groupId>my-test-group</groupId>
<version>1.0-SNAPSHOT</version>
<profiles>
<profile>
<id>alpha</id>
<activation>
<property>
<name>env_alpha</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<id>build-alpha-ear</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>alpha</classifier>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
You can then build with 'mvn -Denv_alpha package'. If you have more
environments you want to create packgings for, just copy the profile and
change the names accordingly and then invoke maven like this 'mvn
-Denv_alpha -Denv_beta package'.
Note that the example uses the jar plugin but for an ear it works
exactly the same, just substitue the plugins.
If you want to deploy the extra artifacts to your repository you need to
attach them with the build-helper plugin [1].
-Tim
[1] http://mojo.codehaus.org/build-helper-maven-plugin/
mailming schrieb:
I am trying to implement packaging multiple into multiple ear files using
profile activation, using classifier.
for example
mvn package -DEnv=Alpha
maven package into file-0.5-snapshot-alpha.ear
and then
mvn package -DEnv=Delta
maven package into file-0.5-snapshot-delta.ear
but I need to do multiple packaging which is
do something like mvn package -DEnv=Delta package -DEnv=Alpha, so it can
package twice in the same process and with different Env profile,
Hopefully this is doable.
--Ming
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]