有没有办法将maven配置为always下载源和javadoc?每次指定-DdownloadSources=true -DdownloadJavadocs=true
(这通常伴随着运行两次MVN Compile,因为我第一次忘记了)变得相当单调乏味.
有没有办法将maven配置为always下载源和javadoc?每次指定-DdownloadSources=true -DdownloadJavadocs=true
(这通常伴随着运行两次MVN Compile,因为我第一次忘记了)变得相当单调乏味.
打开settings.xml文件~/.m2/settings.xml
(如果它不存在,则创建它).添加添加了属性的节.然后确保activeProfiles包含新的配置文件.
<settings>
<!-- ... other settings here ... -->
<profiles>
<profile>
<id>downloadSources</id>
<properties>
<downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs>
</properties>
</profile>
</profiles>
<activeProfiles>
<activeProfile>downloadSources</activeProfile>
</activeProfiles>
</settings>