我见过maven plugins setting configurations与目标挂钩。我想用我的tomcat7-maven-plugin
做到这一点。但是,这似乎不起作用;当我运行deploy
时,它默认为localhost。这个插件不接受不同的配置,还是我做错了什么?
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<id>deploy</id>
<goals>
<goal>deploy</goal>
<goal>redeploy</goal>
</goals>
<configuration>
<url>${tomcat-manager-url}/manager/text</url>
<username>${tomcat-manager-username}</username>
<password>${tomcat-manager-password}</password>
<path>/${project.artifactId}1</path>
</configuration>
</execution>
<execution>
<id>run</id>
<goals>
<goal>run</goal>
</goals>
<configuration>
<path>/</path>
</configuration>
</execution>
</executions>
</plugin>