あなたは別のプロファイルを設定することによってそれを行うことができます。http://maven.apache.org/guides/introduction/introduction-to-profiles.html
EXP:
<profile>
<id>deploywar</id>
<build>
<plugins>
<plugin>
<groupId>net.fpic</groupId>
<artifactId>tomcat-deployer-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<executions>
<execution>
<id>pos</id>
<phase>install</phase>
<goals>
<goal>deploy</goal>
</goals>
<configuration>
<host>${deploymentManagerRestHost}</host>
<port>${deploymentManagerRestPort}</port>
<username>${deploymentManagerRestUsername}</username>
<password>${deploymentManagerRestPassword}</password>
<artifactSource>
address/target/addressservice.war
</artifactSource>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- Defines the QA deployment information -->
<profile>
<id>qa</id>
<activation>
<property>
<name>env</name>
<value>qa</value>
</property>
</activation>
<properties>
<deploymentManagerRestHost>10.50.50.50</deploymentManagerRestHost>
<deploymentManagerRestPort>58090</deploymentManagerRestPort>
<deploymentManagerRestUsername>
myotherusername
</deploymentManagerRestUsername>
<deploymentManagerRestPassword>
myotherpassword
</deploymentManagerRestPassword>
</properties>
</profile>
あなたが注意することがmvn -Pdeploywar -Denv=dev clean install
一つのことで、CLIでdeploywarプロファイルを呼び出すことになるで私の知る限り、そのプロフィールはMaven 3で消えています。 – CoolBeans
うまくいけば、彼らはそれを逆互換にする...私たちのPOMファイルの大部分はプロファイルです。 – wajiw
@CoolBeans - POMファイルまたは設定ファイルの外で定義されたプロファイルは何もなくなります。 –