maven-source-plugin提供项目自动将源码打包并发布的功能:
mvn install,maven会自动将source install到repository
mvn deploy,maven会自动将source deploy到remote-repository
注意:在多项目构建中,将source-plugin置于顶层或parent的pom中并不会发挥作用,必须置于具体项目的pom中
资料:[url]http://www.avajava.com/tutorials/lessons/how-do-i-generate-and-deploy-a-source-jar-file-for-my-project.html?page=1[/url]
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>2.1.2</version>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
mvn install,maven会自动将source install到repository
mvn deploy,maven会自动将source deploy到remote-repository
注意:在多项目构建中,将source-plugin置于顶层或parent的pom中并不会发挥作用,必须置于具体项目的pom中
资料:[url]http://www.avajava.com/tutorials/lessons/how-do-i-generate-and-deploy-a-source-jar-file-for-my-project.html?page=1[/url]