当我打包我的应用程序时,它将被放置在目标目录中。相反,我想选择tomcat WebApps目录。如何在POM.xml中指定它。
答案 0 :(得分:1)
<build>
<directory>${custom.build.directory}</directory>
</build>
<properties>
<custom.build.directory>target</custom.build.directory>
</properties>
在您的settings.xml中:
<properties>
<!-- Personal overridden value, perhaps profile-specific -->
<custom.build.directory>/your/dir/</custom.build.directory>
</properties>
答案 1 :(得分:1)
您可以使用tomcat plugin:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<configuration>
<warFile>path/to/my/warFile.war</warFile>
</configuration>
</plugin>