Saturday, November 1, 2014

The way to download javadocs and sources in maven automatically

Only one step is needed to achieve this.
vim ~/.m2/settings.xml:
<profiles>
    <profile>
        <id>downloadSources</id>
        <properties>
            <downloadSources>true</downloadSources>
            <downloadJavadocs>true</downloadJavadocs>
        </properties>
    </profile>
</profiles>

<activeProfiles>
    <activeProfile>downloadSources</activeProfile>
</activeProfiles>

In such way, we don't have to specifying '-DdownloadSources=true -DdownloadJavadocs=true' every time we issuing a maven command from command line or in Eclipse.

© 2014-2017 jason4zhu.blogspot.com All Rights Reserved 
If transfering, please annotate the origin: Jason4Zhu

No comments:

Post a Comment