Maven外掛列表中沒有tomcat7外掛問題
阿新 • • 發佈:2020-12-10
技術標籤:maven
2020版IDEA中pom.xml新增plugins後maven外掛列表中仍無法出現tomcat7外掛的問題
由於自動生成的pom.xml中的 <pluginMangement> 會鎖定外掛版本,刪除此標籤後新增以下外掛配置:
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<!-- tomcat7的外掛, 不同tomcat版本這個也不一樣 -->
< artifactId>tomcat7-maven-plugin</artifactId>
<version>2.1</version>
<configuration>
<!-- 通過maven tomcat7:run執行專案時,訪問專案的埠號 -->
<port>80</port>
<!-- 專案訪問路徑 本例:localhost:9090, 如果配置的/aa, 則訪問路徑為localhost:9090/aa-->
<path>/travel</path>
</configuration>
</plugin>