Commit a8affb3e authored by 吴江's avatar 吴江

修改打jar包

parent c6126b73
...@@ -30,15 +30,15 @@ ...@@ -30,15 +30,15 @@
</dependencies> </dependencies>
<!-- maven打包时将lib提取到jar同目录,将配置文件提取到jar目录/config/下 --> <!-- maven打包时将lib提取到jar同目录,将配置文件提取到jar目录/config/下 -->
<build> <!-- <build>
<resources> <resources>
<!-- 先指定 src/main/resources下所有文件及文件夹为资源文件 --> 先指定 src/main/resources下所有文件及文件夹为资源文件
<resource> <resource>
<directory>src/main/resources</directory> <directory>src/main/resources</directory>
<includes> <includes>
<include>**/*</include> <include>**/*</include>
</includes> </includes>
<!-- 过滤不需要引用的文件 --> 过滤不需要引用的文件
<excludes> <excludes>
<exclude>package.xml</exclude> <exclude>package.xml</exclude>
</excludes> </excludes>
...@@ -50,22 +50,22 @@ ...@@ -50,22 +50,22 @@
<artifactId>maven-jar-plugin</artifactId> <artifactId>maven-jar-plugin</artifactId>
<configuration> <configuration>
<archive> <archive>
<!-- 添加index则不从mainfest中读取classpath,而是从Index.list中读取 --> 添加index则不从mainfest中读取classpath,而是从Index.list中读取
<!-- <index>true</index> --> <index>true</index>
<manifest> <manifest>
<mainClass>com.yeejoin.amos.YeeAmosIec104IntfStart</mainClass> <mainClass>com.yeejoin.amos.YeeAmosIec104IntfStart</mainClass>
<!-- to create a class path to your dependecies you have to fill true to create a class path to your dependecies you have to fill true
in this field --> in this field
<addClasspath>true</addClasspath> <addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix> <classpathPrefix>lib/</classpathPrefix>
<!--<classpathLayoutType>custom</classpathLayoutType> <customClasspathLayout> <classpathLayoutType>custom</classpathLayoutType> <customClasspathLayout>
lib/ artifact.groupId. {artifact.artifactId}.$${artifact.extension} </customClasspathLayout> --> lib/ artifact.groupId. {artifact.artifactId}.$${artifact.extension} </customClasspathLayout>
</manifest> </manifest>
<manifestEntries> <manifestEntries>
<Class-Path>./</Class-Path> <Class-Path>./</Class-Path>
</manifestEntries> </manifestEntries>
</archive> </archive>
<!-- <excludes> <exclude>config/**</exclude> </excludes> --> <excludes> <exclude>config/**</exclude> </excludes>
<includes> <includes>
<include>**/**.class</include> <include>**/**.class</include>
</includes> </includes>
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<plugin> <plugin>
<artifactId>maven-assembly-plugin</artifactId> <artifactId>maven-assembly-plugin</artifactId>
<configuration> <configuration>
<!-- not append assembly id in release file name --> not append assembly id in release file name
<appendAssemblyId>false</appendAssemblyId> <appendAssemblyId>false</appendAssemblyId>
<descriptors> <descriptors>
<descriptor>src/main/resources/package.xml</descriptor> <descriptor>src/main/resources/package.xml</descriptor>
...@@ -110,5 +110,42 @@ ...@@ -110,5 +110,42 @@
</plugin> </plugin>
</plugins> </plugins>
</build> </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> </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