直到 company_repository 的更新间隔已过或强制更新后才会尝试解析

Posted

技术标签:

【中文标题】直到 company_repository 的更新间隔已过或强制更新后才会尝试解析【英文标题】:Resolution will not be attempted until the update interval of company_repository has elapsed or updates are forced 【发布时间】:2019-02-05 09:24:50 【问题描述】:

我已经多次看到这个问题的答案,我也尝试过。

我正在尝试在我的项目中使用 grooy-all 和 groovy-maven-plugin 并且 pom.xml 中的依赖项是:

          <plugin>
                <groupId>org.codehaus.gmaven</groupId>
                <artifactId>groovy-all</artifactId>
                <version>2.5.2</version>
                <executions>
                    <execution>
                        <id>Kryst-reports-flex</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>execute</goal>
                        </goals>
                        <configuration>
                            <scriptpath>
                                <element>src/main/resources</element>
                            </scriptpath>
                            <source>ReportsAssembly.buildFlex(ant, project) 
                        </source>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.gmaven</groupId>
                <artifactId>groovy-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>Kryst-reports-flex</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>execute</goal>
                        </goals>
                        <configuration>
                            <scriptpath>
                                <element>src/main/resources</element>
                            </scriptpath>
                            <source>ReportsAssembly.buildFlex(ant, project) 
                        </source>
                        </configuration>
                    </execution>
                </executions>
                 <dependencies>
                    <dependency>
                      <groupId>org.codehaus.groovy</groupId>
                      <artifactId>groovy-all</artifactId>
                      <version>2.5.2</version>
                    </dependency>
                  </dependencies>
            </plugin>

当我尝试在此项目上执行 mvn package 或 mvn install 时出现错误。错误是:

Failure to find org.codehaus.gmaven:groovy-all:jar:2.5.2 in http://myrepo:9090/nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of Z-nexus-public has elapsed or updates are forced pom.xml /cockpit-repo   line 1  Maven Configuration Problem

我尝试执行 mvn clean install -U 并右键单击项目 -> Maven -> 使用更新快照更新项目。 但到现在为止没有任何效果。

有人可以帮我解决这个问题吗? 在此先感谢

PS:我试过 mvn dependency:purge-local-repository clean install 。它也给出了错误:

INFO] Downloading from : http://myrepo:9090/nexus/content/groups/public/org/codehaus/gmaven/groovy-maven-plugin/maven-metadata.xml
[INFO] Downloading from : http://myrepo:9090/nexus/content/groups/public-snapshots/org/codehaus/gmaven/groovy-maven-plugin/maven-metadata.xml
[INFO] Downloading from : https://repo.maven.apache.org/maven2/org/codehaus/gmaven/groovy-maven-plugin/maven-metadata.xml
[INFO] Downloaded from : https://repo.maven.apache.org/maven2/org/codehaus/gmaven/groovy-maven-plugin/maven-metadata.xml (368 B at 1.0 kB/s)
[INFO] Downloaded from : http://myrepo:9090/nexus/content/groups/public/org/codehaus/gmaven/groovy-maven-plugin/maven-metadata.xml (368 B at 511 B/s)
[INFO] 
[INFO] ---------------< com.zetes.crystal:cockpit-reports-flex >---------------
[INFO] Building Cockpit reports Flex components 3.2.1-MB-18
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] Downloading from : http://myrepo:9090/nexus/content/groups/public/org/codehaus/gmaven/groovy-all/2.5.2/groovy-all-2.5.2.pom
[INFO] Downloading from : https://repo.maven.apache.org/maven2/org/codehaus/gmaven/groovy-all/2.5.2/groovy-all-2.5.2.pom
[WARNING] The POM for org.codehaus.gmaven:groovy-all:jar:2.5.2 is missing, no dependency information available
[INFO] Downloading from : http://myrepo:9090/nexus/content/groups/public/org/codehaus/gmaven/groovy-all/2.5.2/groovy-all-2.5.2.jar
[INFO] Downloading from : https://repo.maven.apache.org/maven2/org/codehaus/gmaven/groovy-all/2.5.2/groovy-all-2.5.2.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.816 s
[INFO] Finished at: 2018-08-30T14:25:55+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.codehaus.gmaven:groovy-all:2.5.2 or one of its dependencies could not be resolved: Could not find artifact org.codehaus.gmaven:groovy-all:jar:2.5.2 in Z-nexus-public (http://myrepo:9090/nexus/content/groups/public) -> [Help 1]

【问题讨论】:

您是否尝试从本地存储库中手动删除依赖项? 【参考方案1】:

首先尝试强制更新:

mvn clean install -U

如果强制更新不起作用,则说明有问题。 检查以下事项: 损坏的本地工件 - 转到本地 maven 存储库并搜索工件并删除文件夹。 (win 通常在 C:\Documents and Settingsyour-username.m2 下,在 linux ~/.m2 下) 工件实际上是在 repo 上吗,检查拼写,版本,一切! 是否可以连接到 repo,注意代理设置!

【讨论】:

simple mvn clean install -U 不起作用。你能解释一下代理吗?

以上是关于直到 company_repository 的更新间隔已过或强制更新后才会尝试解析的主要内容,如果未能解决你的问题,请参考以下文章

UINavigationBar 直到表格视图更新后才更新栏按钮项

如何使无效更新让音频播放直到结束?

无法解决依赖关系......直到更新间隔已过或强制更新[重复]

无法更新用户显示名称直到我注销并再次登录firebase

ScrollView 中的 ForEach 直到交互才更新

带有睡眠循环的PHP直到循环结束才更新数据库