Is there a way to get the source jar besides the binary jar by using maven?
Asked
Active
Viewed 2,569 times
0
-
1possible duplicate of [get source jars from maven repository](http://stackoverflow.com/questions/2059431/get-source-jars-from-maven-repository) – Matt Fenwick Oct 11 '13 at 12:32
2 Answers
4
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

Tim
- 13,228
- 36
- 108
- 159
-
# mvn dependency:sources # mvn dependency:resolve -Dclassifier=javadoc works. I want to know what is your first solution mean? – user496949 Feb 27 '11 at 08:26
-
The first one is if you use Eclipse and you put this into your `pom.xml` file managing repositories, dependencies and plugins. – Tim Mar 08 '11 at 14:47