0
我有這個項目自定義Maven插件沒有找到
+ foo
pom.xml
+ bar
src/main/java/foo/mojo.java
pom.xml
第二POM是:
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>foo.bar</groupId>
<artifactId>mojo</artifactId>
<packaging>maven-plugin</packaging>
<parent>
<groupId>com</groupId>
<artifactId>foo</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
....
</project>
的mojo.java
是
public class Mojo extends AbstractMojo {
public void execute() throws MojoExecutionException, MojoFailureException {
System.out.print("Hi");
}
}
然後我跑c:\workspace\foo\bar\mvn clean install
安裝的魔力。
問題: 如果我運行c:\workspace\foo\bar\mvn foo.bar:mojo:1.0-SNAPSHOT:mojo
它說:
[ERROR] Plugin foo.bar:Mojo:1.0-SNAPSHOT or one of its dependencies could not be resolved: Failed to read artifact descriptor for foo.bar:Mojo:1.0-SNAPSHOT: Could not find artifact foo:bar:pom:1.0-SNAPSHOT in repo.jenkins-ci.org (http://repo.jenkins-ci.org/public/) -> [Help 1]
你有沒有檢查root/parent pom info版本(應該是「1.0-SNAPSHOT」)? – boly38
是的,我檢查了根/父母的pom。 –