开发者

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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜