开发者

With maven config, how to get the source?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜