When ever i package my Application, it gets placed in target directory. Instead i want to choose tomcat WebApps directory. H开发者_运维百科ow to specify that in POM.xml.
You can use the tomcat plugin:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<configuration>
<warFile>path/to/my/warFile.war</warFile>
</configuration>
</plugin>
<build>
<directory>${custom.build.directory}</directory>
</build>
<properties>
<custom.build.directory>target</custom.build.directory>
</properties>
In your settings.xml:
<properties>
<!-- Personal overridden value, perhaps profile-specific -->
<custom.build.directory>/your/dir/</custom.build.directory>
</properties>
精彩评论