【发布时间】:2016-03-27 01:29:21
【问题描述】:
我正在尝试执行一个自定义 ant 任务,该任务定义在一个不在 Maven Central 下的 jar 中,因此我为此创建了一个私有存储库。
存储库是用类似这样的东西定义的,它还托管了其他“私人”jar,这些 jar 被完美地发现了:
<repositories>
<repository>
<id>repository.com</id>
<name>repository.com</name>
<url>http://repository.com/maven/</url>
</repository>
</repositories>
现在的问题:
虽然在文档状态中仅在
实际上是这样的,它重复了依赖项描述:
<dependencies>
<dependency>
<groupId>org.bitbucket.infinitekind</groupId>
<artifactId>appbundler</artifactId>
<version>1.0ea</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>local-install</id>
<phase>install</phase>
<configuration>
<target>
<taskdef name="appbundler" onerror="fail" classpathref="maven.plugin.classpath" classname="com.oracle.appbundler.AppBundlerTask"/>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.bitbucket.infinitekind</groupId>
<artifactId>appbundler</artifactId>
<version>1.0ea</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
这是预期的行为还是我遗漏了什么?
编辑
即使那样,似乎也没有满足依赖关系。 虽然我可以清楚地看到(由于通用依赖)jar 已下载并放置在 ~/.m2 存储库中,但 ant 任务仍然不理解它:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.8:run (local-install) on project cmmanager: Execution local-install of goal org.apache.maven.plugins:maven-antrun-plugin:1.8:run failed: Plugin org.apache.maven.plugins:maven-antrun-plugin:1.8 or one of its dependencies could not be resolved: Failure to find org.bitbucket.infinitekind:appbundler:jar:1.0ea in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
【问题讨论】:
标签: maven ant maven-antrun-plugin