This page provides a space for users to contribute examples, errata, tips and other useful information about the Maven Source Plugin. Everybody is invited to share his/her thoughts about the plugin to help the community to improve it.
Note: Please do not use this page to report bugs or feature requests. Instead, please fill in an issue in the issue tracking system listed in the official plugin documentation.
Thanks!
– The Maven Team
<project>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.0.4</version>
<configuration>
<!-- your example configuration here -->
</configuration>
</plugin>
</plugins>
</build>
</project>
|
With the following configuration sources will be created in target folder with mvn install and deployed to local repo with mvn deploy. It is probably not possible to link this to the deploy phase.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<configuration>
<attach>true</attach>
</configuration>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>jar</goal>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
|
You need to ...