How to get the source jar using maven
Is there a way to get the source jar besid开发者_运维问答es the binary jar by using maven?
Try this:
<project>
...
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs>
...
</configuration>
</plugin>
</plugins>
</build>
...
</project>
This works using Eclipse, otherwise you can do this on the command line:
# mvn dependency:sources
# mvn dependency:resolve -Dclassifier=javadoc
This might help: Get source JARs from Maven repository
精彩评论