我的應用程序在我的本地運行的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