【问题标题】:How do we run executions differently in local development machines and in deployment?我们如何在本地开发机器和部署中以不同的方式运行执行?
【发布时间】:2018-01-14 16:53:39
【问题描述】:

我想在本地开发时使用爆炸式战争(为了速度),但在部署到云时创建适当的压缩战争。

如何在每个环境中运行不同的执行?

<artifactId>maven-war-plugin</artifactId>
       <executions>
            <execution>
                <id>default-war</id>
                <phase>none</phase>
            </execution>
            <execution>
                <id>war-exploded</id>
                <phase>package</phase>
                <goals>
                    <goal>exploded</goal>
                </goals>
            </execution>
        </executions>

【问题讨论】:

  • 我认为你需要的是个人资料

标签: maven maven-2


【解决方案1】:

您或许可以依赖 Maven 配置文件(参见 introduction to Maven profiles)来将 war 插件配置到特定于环境的配置文件中。

【讨论】:

猜你喜欢
  • 2018-06-21
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-08-24
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-04-10
相关资源
最近更新 更多