Resolution will not be attempted until the update interval of company_repository has elapsed or updates are forced

Srijani Ghosh picture Srijani Ghosh · Aug 30, 2018 · Viewed 18.2k times · Source

I already have seen answers to this problems several time and I tried them too.

I am trying to use grooy-all and groovy-maven-plugin in my project and the dependencies in pom.xml is:

          <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>

I am getting error when I am trying to do mvn package or mvn install on this project. The error is:

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

I tried to do mvn clean install -U and right click on project -> Maven -> update project with Update snapshots. But nothing has worked till now.

Could anyone please help me regarding this? Thanks in advance

PS: I tried mvn dependency:purge-local-repository clean install . It also gives error:

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]

Answer

user10254832 picture user10254832 · Aug 30, 2018

First try a forced update:

mvn clean install -U

If the forced update does not work there IS something wrong. Check the following things: Broken local artifacts - go to you local maven repository and search for the artifact and delete the folder. (in win usually under C:\Documents and Settings{your-username}.m2, in linux ~/.m2) Is the artifact ACTUALLY on the repo, check spelling, version, everything! Is the connection to the repo possible, watchout for proxy settings!