开发者

How to get the source jar using maven

开发者 https://www.devze.com 2023-02-14 04:37 出处:网络
Is there a way to get the source jar besid开发者_运维问答es the binary jar by using maven?Try this:

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

精彩评论

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