简体   繁体   English

maven-shade-plugin:如何关闭压缩?

[英]maven-shade-plugin : how to turn off compression?

I just tried the Shade plugin, but generated jar is always compressed. 我刚刚尝试了Shade插件,但生成的jar总是被压缩。

How to turn off the jar compression ? 如何关闭jar压缩?

Here's the pom: 这是pom:

<build>
<plugins>
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.4</version>
        <configuration>
            <archive>
                <compress>false</compress>
            </archive>
        </configuration>
    </plugin>

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>1.7</version>
        <executions>
            <execution>
                <phase>package</phase>
                <goals>
                    <goal>shade</goal>
                </goals>
            </execution>
        </executions>
    </plugin>
</plugins>
</build>

Thanks 谢谢

Fabrice 法布里斯

Ok finally I managed to turn off jar compression, with help of Wayne's answer 好吧最后我在Wayne的回答的帮助下成功关闭了jar压缩

and this link: http://maven.apache.org/plugins/maven-shade-plugin/examples/use-shader-other-impl.html 和这个链接: http//maven.apache.org/plugins/maven-shade-plugin/examples/use-shader-other-impl.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM