我想下载一个特定的源jar(guice-sources.jar),我不想让它下载android源码。这适用于终端:
mvn dependency:sources -DincludeArtifactIds=android
这也很有效:
mvn dependency:sources -DincludeArtifactIds=guice
我在pom.xml中配置了一个插件段,如下所示,
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>default-cli</id>
<goals>
<goal>sources</goal>
</goals>
<configuration>
<includeArtifactIds>guice</includeArtifactIds>
<!--<excludeArtifactIds>android</excludeArtifactIds>-->
</configuration>
</execution>
</executions>
</plugin>
然后运行它,它仍然为我下载了android jar
mvn dependency:sources
我试图在插件管理中移动插件部分,但也没有用。 怎么了?