Skip to content

Commit

Permalink
optimize_app_package_size
Browse files Browse the repository at this point in the history
  • Loading branch information
zackyoungh committed Nov 28, 2024
1 parent fcd3805 commit d007f33
Showing 1 changed file with 39 additions and 13 deletions.
52 changes: 39 additions & 13 deletions dinky-app/dinky-app-1.14/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,25 +64,51 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.6</version>
<artifactId>maven-shade-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<!-- 可以设置jar包的入口类(可选) -->
<mainClass>org.dinky.app.MainApp</mainClass>
</manifest>
</archive>
<finalName>${project.build.finalName}-jar-with-dependencies</finalName>
<outputDirectory>${project.parent.parent.basedir}/build/extends</outputDirectory>
<minimizeJar>true</minimizeJar>
<createDependencyReducedPom>false</createDependencyReducedPom>
<filters>
<filter>
<artifact>org.dinky:*</artifact>
<includes>
<include>org/dinky/**</include>
<include>META-INF/**</include>
</includes>
</filter>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>tpch/**</exclude>
<exclude>tpcds/**</exclude>
<exclude>support/**</exclude>
<exclude>springfox/**</exclude>
<exclude>org/slf4j/**</exclude>
<exclude>org/springframework/**</exclude>
<exclude>javax/**</exclude>
<exclude>javassist/**</exclude>
<exclude>Class50/**</exclude>
<exclude>lombok/**</exclude>
<exclude>freemarker/**</exclude>
<exclude>com.sun/**</exclude>
<exclude>META-INF/resources/**</exclude>
</excludes>
</filter>
</filters>

<transformers>
<!--设置主函数-->
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.dinky.app.MainApp</mainClass>
</transformer>
</transformers>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<goals>
<goal>single</goal>
<goal>shade</goal>
</goals>
<phase>package</phase>
</execution>
Expand Down

0 comments on commit d007f33

Please sign in to comment.