|
|
|
@ -198,33 +198,37 @@ |
|
|
|
|
|
|
|
<build> |
|
|
|
<plugins> |
|
|
|
<!-- 配置打包,并配置MainClass, 但不将依赖包打包,会出现找不到依赖的异常 --> |
|
|
|
<plugin> |
|
|
|
<groupId>org.apache.maven.plugins</groupId> |
|
|
|
<artifactId>maven-compiler-plugin</artifactId> |
|
|
|
<version>3.1</version> |
|
|
|
</plugin> |
|
|
|
<plugin> |
|
|
|
<artifactId>maven-assembly-plugin</artifactId> |
|
|
|
<artifactId>maven-jar-plugin</artifactId> |
|
|
|
<configuration> |
|
|
|
<finalName>rbs-pay</finalName> |
|
|
|
<archive> |
|
|
|
<manifest> |
|
|
|
<mainClass>com.base.app</mainClass> |
|
|
|
<addClasspath>true</addClasspath> |
|
|
|
<!-- MANIFEST.MF 中 Class-Path --> |
|
|
|
<classpathPrefix>lib/</classpathPrefix> |
|
|
|
<mainClass>com.base.springcloud.PaymentBaseApplication</mainClass> |
|
|
|
</manifest> |
|
|
|
</archive> |
|
|
|
<descriptorRefs> |
|
|
|
<descriptorRef>jar-with-dependencies</descriptorRef> |
|
|
|
</descriptorRefs> |
|
|
|
<finalName>rbs-pay</finalName> |
|
|
|
<outputDirectory>../target</outputDirectory> |
|
|
|
</configuration> |
|
|
|
<!--下面是为了使用 mvn package命令,如果不加则使用mvn assembly--> |
|
|
|
</plugin> |
|
|
|
<!-- 配置依赖包 --> |
|
|
|
<plugin> |
|
|
|
<groupId>org.apache.maven.plugins</groupId> |
|
|
|
<artifactId>maven-dependency-plugin</artifactId> |
|
|
|
<executions> |
|
|
|
<execution> |
|
|
|
<id>make-assemble</id> |
|
|
|
<id>copy-dependencies</id> |
|
|
|
<phase>package</phase> |
|
|
|
<goals> |
|
|
|
<goal>single</goal> |
|
|
|
<goal>copy-dependencies</goal> |
|
|
|
</goals> |
|
|
|
<configuration> |
|
|
|
<!-- 将依赖包打包至target下的lib目录 --> |
|
|
|
<outputDirectory>${project.build.directory}/lib</outputDirectory> |
|
|
|
</configuration> |
|
|
|
</execution> |
|
|
|
</executions> |
|
|
|
</plugin> |
|
|
|
|