THX*_*138 1 groovy repository artifact pom.xml maven
我试图在这里指定的codehaus快照存储库中使用Groovy编译器的快照版本- 但似乎无法使maven看到存储库中的工件.
我有以下插件配置:
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<!-- 2.8.0-01 and later require maven-compiler-plugin 3.1 or higher -->
<version>3.1</version>
<configuration>
<compilerId>groovy-eclipse-compiler</compilerId>
<!-- set verbose to be true if you want lots of uninteresting messages -->
<!-- <verbose>true</verbose> -->
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-eclipse-compiler</artifactId>
<version>2.9.0-01-SNAPSHOT</version>
</dependency>
<!-- for 2.8.0-01 and later you must have an explicit dependency on groovy-eclipse-batch -->
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-eclipse-batch</artifactId>
<version>2.2.1-01-SNAPSHOT</version>
<!-- or choose a different compiler version -->
<!-- <version>1.8.6-01</version> -->
<!-- <version>1.7.10-06</version> -->
</dependency>
</dependencies>
</plugin>
<plugin>
Run Code Online (Sandbox Code Playgroud)
我的存储库部分显示以下信息:
<repository>
<id>Nexus Codehaus</id>
<url>http://nexus.codehaus.org/snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
Run Code Online (Sandbox Code Playgroud)
但是,当我运行mvn -U clean install时,我收到以下消息:
[WARNING] The POM for org.codehaus.groovy:groovy-eclipse-compiler:jar:2.9.0-01-SNAPSHOT is missing, no dependency information available
[WARNING] The POM for org.codehaus.groovy:groovy-eclipse-batch:jar:2.2.1-01-SNAPSHOT is missing, no dependency information available
Run Code Online (Sandbox Code Playgroud)
在构建模块时我也会看到以下内容
Downloading: http://repository.apache.org/snapshots/org/codehaus/groovy/groovy-eclipse-compiler/2.9.0-01-SNAPSHOT/maven-metadata.xml
Downloading: http://repository.apache.org/snapshots/org/codehaus/groovy/groovy-eclipse-compiler/2.9.0-01-SNAPSHOT/groovy-eclipse-compiler-2.9.0-01-SNAPSHOT.pom
[WARNING] The POM for org.codehaus.groovy:groovy-eclipse-compiler:jar:2.9.0-01-SNAPSHOT is missing, no dependency information available
Downloading: http://repository.apache.org/snapshots/org/codehaus/groovy/groovy-eclipse-batch/2.2.1-01-SNAPSHOT/maven-metadata.xml
Downloading: http://repository.apache.org/snapshots/org/codehaus/groovy/groovy-eclipse-batch/2.2.1-01-SNAPSHOT/groovy-eclipse-batch-2.2.1-01-SNAPSHOT.pom
[WARNING] The POM for org.codehaus.groovy:groovy-eclipse-batch:jar:2.2.1-01-SNAPSHOT is missing, no dependency information available
Downloading: http://repository.apache.org/snapshots/org/codehaus/groovy/groovy-eclipse-compiler/2.9.0-01-SNAPSHOT/groovy-eclipse-compiler-2.9.0-01-SNAPSHOT.jar
Downloading: http://repository.apache.org/snapshots/org/codehaus/groovy/groovy-eclipse-batch/2.2.1-01-SNAPSHOT/groovy-eclipse-batch-2.2.1-01-SNAPSHOT.jar
Run Code Online (Sandbox Code Playgroud)
看来maven正试图从我甚至没有定义的存储库中下载工件!为什么会这样?
如果我浏览存储库,我可以看到POM以及各种快照罐,所以我看不出为什么这不起作用.我在我的存储库声明中遗漏了什么吗?
显然,当您想从远程存储库下载maven插件时 - 与标准artifcat相反,您必须在pom中定义一个特殊的pluginRepositories部分; 一个简单的存储库声明将被忽略.
<pluginRepositories>
<pluginRepository>
<id>Nexus Codehaus</id>
<url>http://nexus.codehaus.org/snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
Run Code Online (Sandbox Code Playgroud)