修改打包配置
This commit is contained in:
parent
983f0de171
commit
89dfbf29e5
39
server/zyjblogs-sms/bin/assembly.xml
Normal file
39
server/zyjblogs-sms/bin/assembly.xml
Normal file
@ -0,0 +1,39 @@
|
||||
<assembly>
|
||||
<id>bin</id>
|
||||
<formats>
|
||||
<format>zip</format>
|
||||
</formats>
|
||||
|
||||
<includeBaseDirectory>true</includeBaseDirectory>
|
||||
|
||||
<dependencySets>
|
||||
<dependencySet>
|
||||
<useProjectArtifact>false</useProjectArtifact>
|
||||
<outputDirectory>lib</outputDirectory>
|
||||
<unpack>false</unpack>
|
||||
</dependencySet>
|
||||
</dependencySets>
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>${project.build.directory}</directory>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<includes>
|
||||
<include>*.jar</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<includes>
|
||||
<include>*.md</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
|
||||
<!-- 配置文件,静态资源 -->
|
||||
<fileSet>
|
||||
<directory>src/main/resources/</directory>
|
||||
<outputDirectory>config/${project.artifactId}</outputDirectory>
|
||||
<!--权限控制,与linux权限写法一致(自行百度)-->
|
||||
<fileMode>0644</fileMode>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</assembly>
|
@ -81,4 +81,64 @@
|
||||
|
||||
<!--=============================sms短信sdk end========================== -->
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>${maven-jar-plugin.version}</version>
|
||||
<configuration>
|
||||
<!--<outputDirectory>${jar_dir}</outputDirectory>-->
|
||||
<archive>
|
||||
<manifest>
|
||||
<!--启动类 such as: com.test.StartApp-->
|
||||
<mainClass>cn.zyjblogs.RbacApplication</mainClass>
|
||||
<!-- 把所依赖的 jar 包写入 manifest -->
|
||||
<addClasspath>true</addClasspath>
|
||||
<!--定义依赖jar包的相对路径(相对项目jar包)-->
|
||||
<classpathPrefix>lib/</classpathPrefix>
|
||||
<useUniqueVersions>false</useUniqueVersions>
|
||||
</manifest>
|
||||
<manifestEntries>
|
||||
<!--MANIFEST.MF 中 Class-Path 加入资源文件目录-->
|
||||
<!--定义静态资源的相对路径(相对项目jar包)-->
|
||||
<Class-Path>config/${project.artifactId}/.</Class-Path>
|
||||
</manifestEntries>
|
||||
</archive>
|
||||
<includes>
|
||||
<!-- 当前项目的 jar 包内排除静态资源 -->
|
||||
<include>**/*.class</include>
|
||||
</includes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>${maven-assembly-plugin.version}</version>
|
||||
<configuration>
|
||||
<appendAssemblyId>false</appendAssemblyId>
|
||||
<descriptors>
|
||||
<!--assembly配置文件的相对路径-->
|
||||
<descriptor>bin/assembly.xml</descriptor>
|
||||
</descriptors>
|
||||
<!--assembly打包后的输出位置-->
|
||||
<outputDirectory>target</outputDirectory>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>make-assembly</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
Loading…
Reference in New Issue
Block a user