Commit a8affb3e authored by 吴江's avatar 吴江

修改打jar包

parent c6126b73
......@@ -30,15 +30,15 @@
</dependencies>
<!-- maven打包时将lib提取到jar同目录,将配置文件提取到jar目录/config/下 -->
<build>
<!-- <build>
<resources>
<!-- 先指定 src/main/resources下所有文件及文件夹为资源文件 -->
先指定 src/main/resources下所有文件及文件夹为资源文件
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*</include>
</includes>
<!-- 过滤不需要引用的文件 -->
过滤不需要引用的文件
<excludes>
<exclude>package.xml</exclude>
</excludes>
......@@ -50,22 +50,22 @@
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<!-- 添加index则不从mainfest中读取classpath,而是从Index.list中读取 -->
<!-- <index>true</index> -->
添加index则不从mainfest中读取classpath,而是从Index.list中读取
<index>true</index>
<manifest>
<mainClass>com.yeejoin.amos.YeeAmosIec104IntfStart</mainClass>
<!-- to create a class path to your dependecies you have to fill true
in this field -->
to create a class path to your dependecies you have to fill true
in this field
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<!--<classpathLayoutType>custom</classpathLayoutType> <customClasspathLayout>
lib/ artifact.groupId. {artifact.artifactId}.$${artifact.extension} </customClasspathLayout> -->
<classpathLayoutType>custom</classpathLayoutType> <customClasspathLayout>
lib/ artifact.groupId. {artifact.artifactId}.$${artifact.extension} </customClasspathLayout>
</manifest>
<manifestEntries>
<Class-Path>./</Class-Path>
</manifestEntries>
</archive>
<!-- <excludes> <exclude>config/**</exclude> </excludes> -->
<excludes> <exclude>config/**</exclude> </excludes>
<includes>
<include>**/**.class</include>
</includes>
......@@ -74,7 +74,7 @@
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<!-- not append assembly id in release file name -->
not append assembly id in release file name
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/main/resources/package.xml</descriptor>
......@@ -110,5 +110,42 @@
</plugin>
</plugins>
</build>
-->
<build>
<resources>
<!-- 先指定 src/main/resources下所有文件及文件夹为资源文件 -->
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*</include>
</includes>
<!-- 过滤不需要引用的文件 -->
<excludes>
<exclude>config/*</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment