簡體   English   中英

插件 maven-antrun-plugin 導致 xmltask 無法在 repo 中下載並且構建失敗

[英]Plugin maven-antrun-plugin causes xmltask to be not download in repo and build is getting failure

將 Maven 構建為:

<plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-antrun-plugin</artifactId>
      <version>1.7</version>
      <dependencies>
            <dependency>
                  <groupId>com.oopsconsultancy</groupId>
                  <artifactId>xmltask</artifactId>
                  <version>1.14</version>
            </dependency> 
      </dependencies> 
</plugin>

對於我的項目groupel-orchestrate ::

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.7</version>
                <executions>
                    <execution>
                        <id>concat-hosts-and-install-uninstall</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                 </execution>
            </executions>
        </plugin>

導致構建失敗:

[錯誤] 無法在項目 groupel-orchestrate 上執行目標 org.apache.maven.plugins:maven-antrun-plugin:1.7:run (concat-hosts-and-install-uninstall):執行 concat-hosts-and-install-卸載目標 org.apache.maven.plugins:maven-antrun-plugin:1.7:run failed: Plugin org.apache.maven.plugins:maven-antrun-plugin:1.7 或其依賴項之一無法解決:無法解決在中央找到工件 com.oopsconsultancy:xmltask:jar:1.14 ( https://repo.maven.apache.org/maven2 ) -> [Help 1]

我應該怎么做才能克服這個錯誤?

您嘗試使用的插件不存在於 Maven 中央存儲庫中,而僅存在於 Atlassian 3rd party repo 中 為了能夠使用,您需要將該存儲庫添加到您的構建中,如下所示:

<pluginRepositories>
    <pluginRepository>
        <id>atlassian-third-party-repo</id>
        <name>atlassian-third-party-repo</name>
        <url>https://maven.atlassian.com/3rdparty/</url>
    </pluginRepository>
</pluginRepositories>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM