------ Usage ------ Maria Odea Ching ------ 11 July 2006 ------ Usage The source plugin can be used to create a jar file of the project sources by executing the following command: +-----+ mvn source:jar +-----+ A jar file of the test sources can also be generated by executing: +-----+ mvn source:test-jar +-----+ *Installing the sources along with your artifact There are two ways to do this. You can either bind this plugin to a phase or you can add it to a profile. **Installing the sources using a phase binding Here is how you would configure the plugin in your <<>> to run automatically during the phase: +-----+ ... org.apache.maven.plugins maven-source-plugin attach-sources verify jar ... +-----+ We are using the phase here because it is the phase that comes before the phase, thus making sure that the sources jar has been created <> the install takes place. **Installing the sources using a profile If you want to install a jar of your sources along with your artifact during the release process, you can add this to your <<>> file: +-----+ ... release org.apache.maven.plugins maven-source-plugin attach-sources jar ... +-----+