pom.xml中加入插件并设置属性;
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
<executions>
<execution>
<id>copy-war</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
<type>${project.packaging}</type>
</artifactItem>
</artifactItems>
<!--指定war包保存地址-->
<outputDirectory>F:\server\apache-tomcat-8.0.42\webapps</outputDirectory>
<includeArtifactIds>false</includeArtifactIds>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
本文介绍如何使用Maven依赖插件自动将WAR包部署到Tomcat服务器的具体配置方法。
1358

被折叠的 条评论
为什么被折叠?



