maven-2 - 如何在 Maven 中关闭 jar 压缩

Maven (2.0.9) 中是否有一个选项可以关闭整个操作的 jar 压缩?我在构建服务器和工作站中都使用 Maven,我想在工作站构建中禁用 jar 压缩(仅限开发)。但是,我不想触及所有的 pom 并为每个创建两个版本。

是否可以通过环境变量、文件或触摸单个 pom.xml 来关闭 jar 压缩?

最佳答案

显然可以通过定义这个来实现:

 <profile><id>...</id>
   <build>
     <pluginManagement>
         <plugins>
             <plugin>
                 <configuration>
                     <archive>
                         <compress>false</compress>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </pluginManagement>
  </build>
</profile>

在顶级 pom.xml 中。 附带说明一下 - 这并没有真正解决我最初的构建问题,即构建花费了太多时间。

https://stackoverflow.com/questions/1032685/

相关文章:

visual-studio-2010 - Visual Studio 2010 中构建的输出路径

c++ - 如何在 Visual Studio 2008 中优化构建速度

c# - 在 Visual Studio 2010 中使用目标构建时收到大量警告

android - 升级到android后无法构建项目-P

build - 如何修改 Jenkins 用于控制从站的负载平衡行为?

jenkins - "Delete Build in Jenkins after Keep Fore

maven - 为单个 Jenkins 作业构建多个 Maven 配置文件

build - 如何为 Windows 构建 google google-breakpad?

build - 一旦发生错误,是否可以加速 crosstool-ng 构建?

build - Phing和 Composer