gpt4 book ai didi

maven - 为什么 Maven 要下载 Groovy 的_所有_版本?

转载 作者:行者123 更新时间:2023-12-04 16:50:41 24 4
gpt4 key购买 nike

在我的项目的 POM 中,我放置了以下依赖项:

<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>1.8.6</version>
</dependency>

以及以下编译器插件:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.4</version>
<configuration>
<compilerId>groovy-eclipse-compiler</compilerId>
<verbose>true</verbose>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-eclipse-compiler</artifactId>
<version>2.6.0-01</version>
</dependency>
</dependencies>
</plugin>

所以我希望 Maven 下载 Groovy 的 1.8.6 jar,但它似乎试图下载曾经发布的每个 jar!

[WARNING] The POM for org.codehaus.groovy:groovy:jar:1.5.5-SNAPSHOT is missing, no dependency information available
[WARNING] The POM for org.codehaus.groovy:groovy:jar:1.5.6-SNAPSHOT is missing, no dependency information available
[WARNING] The POM for org.codehaus.groovy:groovy:jar:1.5.7-SNAPSHOT is missing, no dependency information available
[WARNING] The POM for org.codehaus.groovy:groovy:jar:1.6-beta-1-SNAPSHOT is missing, no dependency information available
[WARNING] The POM for org.codehaus.groovy:groovy:jar:1.6-beta-2-SNAPSHOT is missing, no dependency information available
[WARNING] The POM for org.codehaus.groovy:groovy:jar:1.6-RC-1-SNAPSHOT is missing, no dependency information available
[WARNING] The POM for org.codehaus.groovy:groovy:jar:1.6-RC-2-SNAPSHOT is missing, no dependency information available
[WARNING] The POM for org.codehaus.groovy:groovy:jar:1.6.1-SNAPSHOT is missing, no dependency information available
[WARNING] The POM for org.codehaus.groovy:groovy:jar:1.6.3-SNAPSHOT is missing, no dependency information available
[WARNING] The POM for org.codehaus.groovy:groovy:jar:1.6.5-SNAPSHOT is missing, no dependency information available
[WARNING] The POM for org.codehaus.groovy:groovy:jar:1.7-beta-1-SNAPSHOT is missing, no dependency information available
[WARNING] The POM for org.codehaus.groovy:groovy:jar:1.7-rc-2-SNAPSHOT is missing, no dependency information available

是什么导致了这种奇怪的行为?

最佳答案

参见:groovy-eclipse-compiler-2.6.0-01.pom

<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-eclipse-batch</artifactId>
<version>[1.7.10-02,1.7.10-99],[1.8.2-01,1.9.0)</version>
</dependency>

它需要所有版本。添加

<repository>
<id>codehaus-snapshots</id>
<name>Codehaus Snapshots</name>
<url>http://nexus.codehaus.org/snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>

如果你需要快照到你的 pom。

关于maven - 为什么 Maven 要下载 Groovy 的_所有_版本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10796430/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com