1.制定jdk版本插件
<plugin>
<groupId>org.apache.maven.plugins
</groupId>
<artifactId>maven-compiler-plugin
</artifactId>
<configuration>
<source>1.8
</source>
<target>1.8
</target>
</configuration>
</plugin>
2.自定义jar包生成源码插件
<plugin>
<groupId>org.apache.maven.plugins
</groupId>
<artifactId>maven-source-plugin
</artifactId>
<executions>
<execution>
<id>attach-sources
</id>
<phase>package
</phase>
<goals>
<goal>jar-no-fork
</goal>
</goals>
</execution>
</executions>
</plugin>
转载请注明原文地址: https://www.6miu.com/read-31186.html