pom文件中添加插件如下
org.apache.maven.plugins maven-compiler-plugin org.apache.maven.plugins maven-source-plugin 3.0.1 attach-sources jar releases Nexus Release Repository http://xxxx:8081/repository/cetccd_hosted/ snapshots Nexus Snapshot Repository http://xxxx:8081/repository/cetccd_snapshots/
settings.xml文件添加如下内容
snapshots admin xxxx releases admin xxxx
clean deploy -Dmaven.test.skip=true