Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

maven-shade-plugin : how to turn off compression?

I just tried the Shade plugin, but generated jar is always compressed.

How to turn off the jar compression ?

Here's the 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

like image 208
user1470083 Avatar asked Oct 07 '22 11:10

user1470083


1 Answers

Ok finally I managed to turn off jar compression, with help of Wayne's answer

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

like image 89
user1470083 Avatar answered Oct 18 '22 12:10

user1470083