Automatic packaging, release the source code

2011-07-23  来源:本站原创  分类:Development  人气:79 

maven-source-plugin package to provide project source code and automatically release features:

<plugin>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.1.2</version>
        <executions>
                <execution>
                        <goals>
                                <goal>jar</goal>
                        </goals>
                </execution>
        </executions>
</plugin>

mvn install, maven will automatically source install to the repository
mvn deploy, maven will automatically source deploy to remote-repository

Note: In multi-project build, will be placed in the top level or source-plugin pom in the parent's will not play a role, must be placed in specific projects pom

Information: http://www.avajava.com/tutorials/lessons/how-do-i-generate-and-deploy-a-source-jar-file-for-my-project.html?page=1

相关文章