答案 0 :(得分:0)
您可以将部署操作添加到pom.xml,如下所示:
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<phase>package</phase>
<configuration>
<target>
<unzip src="target/youwarfile.war" dest="/opt/tomcat/webapps/youwar"/>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
然后war文件将部署在&#34; package&#34;阶段,请根据您的需要进行修改。并确保在发布后发表评论。