With a maven configuration like the following, how do I get the source code for that particular version if it is a third party open source package.
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.2</version>
<scope>test</scope>
<开发者_JAVA技巧;/dependency>
You could also use maven eclipse plugin.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs>
... other stuff ...
</configuration>
</plugin>
You can use the maven dependency plugin, with the classifier 'sources'.
http://maven.apache.org/plugins/maven-dependency-plugin/examples/using-dependencies-sources.html
You can narrow this down to a specific group/artifact if you need.
精彩评论