2017-08-07 38 views
-1

我想在本地开发时使用爆炸战争(为了速度),但在部署到云时创建适当的压缩战争。我们如何在本地开发机器和部署中以不同方式运行执行?

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

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

我想你需要的是型材 – Jens

回答

1

你也许可以依靠Maven的配置文件(见introduction to Maven profiles)以配置战争插件到环境中特定的配置文件。

+0

这个链接也有助于 http://www.thinkplexx.com/learn/howto/maven2/m2-execution/configure-default-and-alternative-executions-in-maven- POM-用型材 –

相关问题