tomcat - How do you specify the server information used by the tomcat7-maven-plugin on the command line? -


i using tomcat7-maven-plugin deploy application tomcat. in pom.xml have following information

 <plugin>    <groupid>org.apache.tomcat.maven</groupid>    <artifactid>tomcat7-maven-plugin</artifactid>    <version>2.2</version>    <configuration>       <server>test</server>       <path>/api</path>       <update>true</update>       <url>http://xxx.xxx.xx.xx:8080/manager/text</url>    </configuration>  </plugin> 

and in ~/.m2/settings.xml have following

<settings>   <servers>     <server>       <id>test</id>       <username>*******</username>       <password>*******</password>     </server>      <server>       <id>production</id>       <username>*********</username>       <password>*********</password>     </server>   </servers> </settings> 

my hope able able include selection of server id part of command line, e.g.

mvn tomcat7:redeploy -dserver=production 

and have appropriate configuration information settings.xml file used. in addition selecting specific username , password deployment, mean moving url out of pom.xml separate location.

this post talks storing server url outside of pom, , seems indicates there's way part using properties files, doesn't expand on files should located, nor how specify them on command line.

is possible i'm looking for? or stuck editing pom.xml file each time want choose different server deploy to?


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -