开发者

With maven config, how to get the source?

开发者 https://www.devze.com 2023-02-17 15:59 出处:网络
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.

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

精彩评论

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