我的应用程序在我的本地运行的URL即http://localhost:8080/WebIntegrationApp
代替本地主机。 有什么办法来取代http://localhost:8080/WebIntegrationApp
网址与http://WebIntegrationApp
在的pom.xml文件。 我的意思是我想运行这个应用程序使用url http://WebIntegrationApp
。如何用POM文件意味着全URL名称
使用的操作系统是Windows7的,下面是用于本地主机运行Tomcat插件:
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<url>http://localhost:8080/manager/text</url>
<server>localhost</server>
<path>/WebIntegrationApp</path>
<username>admin</username>
<password>s3cret</password>
</configuration>
<executions>
<execution>
<id>tomcat-run</id>
<goals>
<goal>run-war-only</goal>
</goals>
<phase>pre-integration-test</phase>
<configuration>
<fork>true</fork>
</configuration>
</execution>
<execution>
<id>tomcat-shutdown</id>
<goals>
<goal>shutdown</goal>
</goals>
<phase>post-integration-test</phase>
</execution>
</executions>
</plugin>
感谢您的回答。我想这不是一个好主意。如果这个文件必须由不同的用户使用,那么每个人都必须编辑主机文件。所以我正在寻找一个通用的解决方案。一个变化适用于其他人。 – 2014-08-28 12:46:07
然后你应该配置你的DNS服务器设置。 – 2014-08-28 13:00:29