开发者

Specifiying path in POM for Maven

开发者 https://www.devze.com 2023-02-01 06:05 出处:网络
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:

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>
0

精彩评论

暂无评论...
验证码 换一张
取 消