在 POM 中为 Maven 指定路径

发布于 2024-10-09 01:55:20 字数 73 浏览 0 评论 0原文

当我打包我的应用程序时,它会被放置在目标目录中。相反,我想选择 tomcat WebApps 目录。如何在 POM.xml 中指定。

When ever i package my Application, it gets placed in target directory. Instead i want to choose tomcat WebApps directory. How to specify that in POM.xml.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

嘿看小鸭子会跑 2024-10-16 01:55:20

您可以使用 tomcat 插件

<plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>tomcat-maven-plugin</artifactId>
        <configuration>
                <warFile>path/to/my/warFile.war</warFile>
        </configuration>
</plugin>

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>
屋顶上的小猫咪 2024-10-16 01:55:20
   <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>
   <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>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文