1

特定のソース 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

pluginManagement でプラグイン部分を移動しようとしましたが、どちらも機能しませんでした。どうしたの?

4

0 に答える 0