profile is:
i use ${artifactId} as profile id.
<profiles>
<profile>
<id>${artifactId}</id>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.3</version>
<configuration>
<descriptors>
<descriptor>distribution.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
Running maven in shell:
mvn -U -Dmaven.test.skip=true -f pom.xml -Pabc_test clean install
Then I catch an error:
[WARNING] The requested profile “abc_test” could not be activated because it does not exist.
Finish
You have to define all your profiles in pom.xml.
Here the profile names are
devandprod. You can use${war.name}as the variable modified by the profile.