当前位置:网站首页>Assembly packaging
Assembly packaging
2022-07-28 06:02:00 【King_ Kwin】
pom file
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.6</version>
<configuration>
<archive>
<manifest>
<!-- Appoint main entrance -->
<mainClass>com.**.**Application</mainClass>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
</manifest>
<manifestEntries>
<Class-Path>./</Class-Path>
</manifestEntries>
</archive>
<excludes>
<!-- <exclude>assembly/**</exclude>-->
<exclude>bootstrap/**</exclude>
<exclude>assembly/**</exclude>
<exclude>*.yml</exclude>
<exclude>watchdog/**</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.5.5</version>
<configuration>
<finalName>projectName</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/main/resources/assembly/assembly.xml</descriptor>
</descriptors>
<!-- packaged jar The output directory -->
<outputDirectory>./output</outputDirectory>
<!-- need main Method executable jar, Please add the following code -->
<!-- <archive>
<manifest>
<!– Load the main running classes –>
<mainClass>MainApplication</mainClass>
<!– Specify project or not classpath Dependence under –>
<addClasspath>true</addClasspath>
<!– Declare prefix when specifying dependency –>
<classpathPrefix>./</classpathPrefix>
</manifest>
</archive>-->
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
</plugins>
</build>Assembly.xml
<assembly>
<id>***</id>
<formats>
<!-- Support zip,tar,tar.gz,tar.bz2,jar,dir,war etc. -->
<!-- <format>tar.gz</format>-->
<format>zip</format>
<!-- <format>dir</format>-->
</formats>
<includeBaseDirectory>true</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>src/main/resources/bin</directory>
<outputDirectory>bin</outputDirectory>
<!-- Represents a resource file containing the following format -->
<includes>
<include>*.sh</include>
</includes>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<directory>src/main/resources</directory>
<outputDirectory>../</outputDirectory>
<!-- Represents a resource file containing the following format -->
<includes>
<include>*.xml</include>
<include>*.yml</include>
</includes>
<fileMode>0500</fileMode>
</fileSet>
<fileSet>
<directory>src/main/resources/mapper</directory>
<outputDirectory>mapper</outputDirectory>
<fileMode>0644</fileMode>
</fileSet>
<fileSet>
<directory>${project.build.directory}</directory>
<outputDirectory>../</outputDirectory>
<includes>
<include>*.jar</include>
</includes>
</fileSet>
<fileSet>
<directory>src/main/resources/watchdog</directory>
<outputDirectory>watchdog</outputDirectory>
<fileMode>0700</fileMode>
</fileSet>
</fileSets>
<dependencySets>
<dependencySet>
<useProjectArtifact>false</useProjectArtifact>
<outputDirectory>lib</outputDirectory>
<scope>runtime</scope>
</dependencySet>
</dependencySets>
</assembly>边栏推荐
猜你喜欢
随机推荐
数字藏品以虚强实,赋能实体经济发展
Sorting and paging, multi table query after class exercise
【七】redis缓存与数据库数据一致性
Books - Templeton teaches you reverse
[uni app] the use of scroll into view in uni app
Cookie、Session和Token的区别与联系
Flume installation and use
第九章 子查询(重点)
On how digital collections and entities can empower each other
3:Mysql 主从复制搭建
Assembly打包
反弹shell的N种姿势
trino函数随记
mysql5.6(根据.ibd,.frm文件)恢复单表数据
Flume安装及使用
Related concepts and operations of DOM model
【二】redis基础命令与使用场景
话题功能实现
记录下在线扩容服务器遇到的问题 NOCHANGE: partition 1 is size 419428319. it cannot be grown
MySQL multi table query









