一 打 .java 不包含依赖的jar包
1. ciems 的pom
<plugins> 下添加 (不是 </pluginManagement> 里面)
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>attach-sources</id>
<phase>verify</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
2.修改报错Error
<version>1.0.0-Alpha</version> 改为 <version>${revision}</version>
3. 修改 <id>nexus</id>
<repository>
<id>nexus</id> ---------》》 <id>nexus-releases</id>
<name>Nexus Snapshot Repository</name>
<url>http://192.168.2.211:10890/nexus/content/repositories/releases/</url>
</repository>
4.Maven --ciems--Plugins--clean--clean:clean
5.Maven --ciems--Plugins--source--source:jar
二 打 .java jar包,另外包好依赖dependency 的文件
1.maven 顶部 profiles 打钩 dev,(记得打完包去掉)
2.pom
<!-- 打包源码插件 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<configuration>
<attach>true</attach>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- 打包依赖插件 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
3.注释掉伺服仓库地址
<!-- <repository>-->
4.Lifecycle --clean
5.Lifecycle--install
6.Plugis--dependency--denpendency:copy-dependencies