|
@@ -144,30 +144,9 @@
|
|
|
<build>
|
|
|
<plugins>
|
|
|
<plugin>
|
|
|
- <groupId>org.apache.maven.plugins</groupId>
|
|
|
- <artifactId>maven-jar-plugin</artifactId>
|
|
|
- <version>3.3.0</version>
|
|
|
- <configuration>
|
|
|
- <outputDirectory>${project.build.directory}</outputDirectory>
|
|
|
- <archive>
|
|
|
- <!-- 生成的jar中,包含pom.xml和pom.properties这两个文件 -->
|
|
|
- <addMavenDescriptor>true</addMavenDescriptor>
|
|
|
- <!-- 生成MANIFEST.MF的设置 -->
|
|
|
- <manifest>
|
|
|
- <!--这个属性特别关键,如果没有这个属性,有时候我们引用的包maven库 下面可能会有多个包,并且只有一个是正确的, 其余的可能是带时间戳的,此时会在classpath下面把那个带时间戳的给添加上去,然后我们 在依赖打包的时候, 打的是正确的,所以两头会对不上,报错。 -->
|
|
|
- <useUniqueVersions>false</useUniqueVersions>
|
|
|
- <!-- 为依赖包添加路径, 这些路径会写在MANIFEST文件的Class-Path下 -->
|
|
|
- <addClasspath>true</addClasspath>
|
|
|
- <!-- MANIFEST.MF 中 Class-Path 各个依赖加入前缀 -->
|
|
|
- <!--这个jar所依赖的jar包添加classPath的时候的前缀,需要 下面maven-dependency-plugin插件补充-->
|
|
|
- <!--一定要找对目录,否则jar找不到依赖lib,前边加../是因为jar在bin下,而bin与lib是平级目录-->
|
|
|
- <classpathPrefix>./lib</classpathPrefix>
|
|
|
- <!--指定jar启动入口类 -->
|
|
|
- <mainClass>com.fdkankan.contro.ModelingControlApplication</mainClass>
|
|
|
- </manifest>
|
|
|
-
|
|
|
- </archive>
|
|
|
- </configuration>
|
|
|
+ <groupId>org.springframework.boot</groupId>
|
|
|
+ <artifactId>spring-boot-maven-plugin</artifactId>
|
|
|
+ <version>2.3.12.RELEASE</version>
|
|
|
</plugin>
|
|
|
|
|
|
<plugin>
|
|
@@ -177,26 +156,6 @@
|
|
|
<testFailureIgnore>true</testFailureIgnore>
|
|
|
</configuration>
|
|
|
</plugin>
|
|
|
-
|
|
|
- <!--拷贝依赖 copy-dependencies-->
|
|
|
- <plugin>
|
|
|
- <groupId>org.apache.maven.plugins</groupId>
|
|
|
- <artifactId>maven-dependency-plugin</artifactId>
|
|
|
- <executions>
|
|
|
- <execution>
|
|
|
- <id>copy-dependencies</id>
|
|
|
- <phase>package</phase>
|
|
|
- <goals>
|
|
|
- <goal>copy-dependencies</goal>
|
|
|
- </goals>
|
|
|
- <configuration>
|
|
|
- <outputDirectory>
|
|
|
- ${project.build.directory}/lib
|
|
|
- </outputDirectory>
|
|
|
- </configuration>
|
|
|
- </execution>
|
|
|
- </executions>
|
|
|
- </plugin>
|
|
|
</plugins>
|
|
|
|
|
|
</build>
|