Maven shade plugin: why original jar contains all the dependency (just like the shaded jar)

Viewed 22

I created a general shade plugin instance below

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-shade-plugin</artifactId>
    <version>2.3</version>
    <configuration>
      <filters>
          <filter>
              <artifact>*:*<artifact/>
              <excludes>
                  <exclude>META-INF/*.gif</exclude>
              <excludes>
          </filter>
      </filters>
    </configuration>
    <executions>
      <execution>
        <phase>package</phase>
        <goals>
          <goal>shade</goal>
        </goals>
      </execution>
    </executions>
  </plugin>

However when executing mvn clean package I found the original- jar is the same size of the shade jar and contains all the dependency library, what could be the cause of such incident

original-myapp-0.0.1-SNAPSHOT.jar  168Mb
myapp-0.0.1-SNAPSHOT.jar  168Mb
0 Answers
Related