Nexus Central local storage missing maven jars - maven

I am currently using Nexus, but i'm pretty new to it.
I'm trying to build an EAR project and i'm getting the error below.
http://localhost:8080/nexus/content/groups/public is the default Public Group repository which includes Central, and within Central, the version 2.2.1 versions of the org.apache.maven artifacts are there remotely.
However, if i look at the local storage, it's not there, like the errors suggest.
I thought that during the build, it would update the local storage with the necessary files. I tried -U force updates already.
Any pointers are appreciated
John.
[INFO]
[INFO] --- maven-ear-plugin:2.10:generate-application-xml (default-generate-application-xml) # my-apps.ear ---
[WARNING] The POM for org.apache.maven:maven-project:jar:2.2.1 is missing, no dependency information available
[WARNING] The POM for org.apache.maven:maven-plugin-api:jar:2.2.1 is missing, no dependency information available
[WARNING] The POM for org.apache.maven:maven-artifact:jar:2.2.1 is missing, no dependency information available
[WARNING] The POM for org.apache.maven:maven-core:jar:2.2.1 is missing, no dependency information available
[WARNING] The POM for org.apache.maven:maven-archiver:jar:2.6 is missing, no dependency information available
[WARNING] The POM for org.codehaus.plexus:plexus-archiver:jar:2.9 is missing, no dependency information available
[WARNING] The POM for org.codehaus.plexus:plexus-utils:jar:3.0.20 is missing, no dependency information available
[WARNING] The POM for org.apache.maven.shared:maven-filtering:jar:1.3 is missing, no dependency information available
[WARNING] The POM for org.codehaus.plexus:plexus-interpolation:jar:1.22 is missing, no dependency information available
[WARNING] Failed to getClass for org.apache.maven.plugin.ear.GenerateApplicationXmlMojo
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.089 s
[INFO] Finished at: 2016-04-27T03:48:10+00:00
[INFO] Final Memory: 13M/107M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-ear-plugin:2.10:generate-application-xml (default-generate-application-xml) on project my-apps.ear: Execution default-generate-application-xml of goal org.apache.maven.plugins:maven-ear-plugin:2.10:generate-application-xml failed: Plugin org.apache.maven.plugins:maven-ear-plugin:2.10 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.apache.maven:maven-project:jar:2.2.1, org.apache.maven:maven-plugin-api:jar:2.2.1, org.apache.maven:maven-artifact:jar:2.2.1, org.apache.maven:maven-core:jar:2.2.1, org.apache.maven:maven-archiver:jar:2.6, org.codehaus.plexus:plexus-archiver:jar:2.9, org.codehaus.plexus:plexus-utils:jar:3.0.20, org.apache.maven.shared:maven-filtering:jar:1.3, org.codehaus.plexus:plexus-interpolation:jar:1.22: Failure to find org.apache.maven:maven-project:jar:2.2.1 in http://localhost:8080/nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of Nexus has elapsed or updates are forced -> [Help 1]

Related

Could not find artifact after replication from JFrog Cloud to JFrog Cloud

I recently started a push based replication from my current JFrog Cloud account to a new JFrog Cloud account. However, after that the repositories in my local release and snapshot started throwing this error while building any project that uses them. Could someone please check and advise as to what else should I look for in order to resolve/debug this issue.
$ mvn clean install -P artifactory -U
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------< com.mydomain.myproj:mainproject >------------------------
[INFO] Building mainproject 1.0.0
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from central: https://myartifactory.jfrog.io/artifactory/myproj-mvn-release-virtual/com/example/myproject/apiclient/0.43/apiclient-0.43.pom
[WARNING] The POM for com.mydomain.myproject:apiclient:jar:0.43 is missing, no dependency information available
Downloading from central: https://myartifactory.jfrog.io/artifactory/myproj-mvn-release-virtual/com/example/myproject/thirdparty-client/0.7/thirdparty-client-0.7.pom
[WARNING] The POM for com.mydomain.myproject:thirdparty-client:jar:0.7 is missing, no dependency information available
Downloading from central: https://myartifactory.jfrog.io/artifactory/myproj-mvn-release-virtual/com/example/myproject/interference-sdk/0.16/interference-sdk-0.16.pom
[WARNING] The POM for com.mydomain.myproject:interference-sdk:jar:0.16 is missing, no dependency information available
Downloading from central: https://myartifactory.jfrog.io/artifactory/myproj-mvn-release-virtual/com/example/myproject/roger-client/0.3/roger-client-0.3.pom
[WARNING] The POM for com.mydomain.myproject:roger-client:jar:0.3 is missing, no dependency information available
Downloading from snapshots: https://myartifactory.jfrog.io/artifactory/myproj-mvn-snapshot-virtual/com/example/myteam/sprin-param/2.0.5-SNAPSHOT/maven-metadata.xml
Downloading from snapshots: https://myartifactory.jfrog.io/artifactory/myproj-mvn-snapshot-virtual/com/example/myteam/sprin-param/2.0.5-SNAPSHOT/sprin-param-2.0.5-SNAPSHOT.pom
[WARNING] The POM for com.mydomain.myteam:sprin-param:jar:2.0.5-SNAPSHOT is missing, no dependency information available
Downloading from central: https://myartifactory.jfrog.io/artifactory/myproj-mvn-release-virtual/com/example/myproject/apiclient/0.43/apiclient-0.43.jar
Downloading from central: https://myartifactory.jfrog.io/artifactory/myproj-mvn-release-virtual/com/example/myproject/thirdparty-client/0.7/thirdparty-client-0.7.jar
Downloading from central: https://myartifactory.jfrog.io/artifactory/myproj-mvn-release-virtual/com/example/myproject/interference-sdk/0.16/interference-sdk-0.16.jar
Downloading from central: https://myartifactory.jfrog.io/artifactory/myproj-mvn-release-virtual/com/example/myproject/roger-client/0.3/roger-client-0.3.jar
Downloading from snapshots: https://myartifactory.jfrog.io/artifactory/myproj-mvn-snapshot-virtual/com/example/myteam/sprin-param/2.0.5-SNAPSHOT/sprin-param-2.0.5-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.618 s
[INFO] Finished at: 2022-08-13T19:57:44+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project mainproject: Could not resolve dependencies for project com.mydomain.myproj:mainproject:jar:1.0.0: The following artifacts could not be resolved: com.mydomain.myproject:apiclient:jar:0.43, com.mydomain.myproject:thirdparty-client:jar:0.7, com.mydomain.myproject:interference-sdk:jar:0.16, com.mydomain.myproject:roger-client:jar:0.3, com.mydomain.myteam:sprin-param:jar:2.0.5-SNAPSHOT: Could not find artifact com.mydomain.myproject:apiclient:jar:0.43 in central (https://myartifactory.jfrog.io/artifactory/myproj-mvn-release-virtual) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
Also, I can see that the JARs have been copied along with the POM to the new account.

How to deploy to Nexus Sonatype new Maven module

I'm creating new module for existing Maven project. When I try to mvn:install project from Idea it throughs these error:
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for kz.alfabank:type-ortalyk-bazar:bundle:1.0
[WARNING] 'version' contains an expression but should be a constant. # kz.alfabank:type-ortalyk-bazar:${kz.alfabank.type.ortalyk-bazar.version}, C:\Users\u8002\Documents\dev\alfa-bank\kz.alfabank.soa\kz.alfabank.soa\type-ortalyk-bazar\pom.xml, line 19, column 14
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building type-ortalyk-bazar 1.0
[INFO] ------------------------------------------------------------------------
Downloading: http://vserver266:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-surefire-plugin/maven-metadata.xml
[WARNING] Could not transfer metadata org.apache.maven.plugins:maven-surefire-plugin/maven-metadata.xml from/to public (http://vserver266:8081/nexus/content/groups/public): Failed to transfer file: http://vserver266:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-surefire-plugin/maven-metadata.xml. Return code is: 504 , ReasonPhrase:Connection Timed Out.
Downloading: http://vserver266:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-install-plugin/maven-metadata.xml
[WARNING] Could not transfer metadata org.apache.maven.plugins:maven-install-plugin/maven-metadata.xml from/to public (http://vserver266:8081/nexus/content/groups/public): Failed to transfer file: http://vserver266:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-install-plugin/maven-metadata.xml. Return code is: 504 , ReasonPhrase:Connection Timed Out.
Downloading: http://vserver266:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-deploy-plugin/maven-metadata.xml
[WARNING] Could not transfer metadata org.apache.maven.plugins:maven-deploy-plugin/maven-metadata.xml from/to public (http://vserver266:8081/nexus/content/groups/public): Failed to transfer file: http://vserver266:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-deploy-plugin/maven-metadata.xml. Return code is: 504 , ReasonPhrase:Connection Timed Out.
Downloading: http://vserver266:8081/nexus/content/groups/public/kz/alfabank/type-ortalyk-bazar/1.0/type-ortalyk-bazar-1.0.jar
Downloading: https://repo.maven.apache.org/maven2/kz/alfabank/type-ortalyk-bazar/1.0/type-ortalyk-bazar-1.0.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:03 min
[INFO] Finished at: 2018-10-11T14:01:00+06:00
[INFO] Final Memory: 14M/167M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project type-ortalyk-bazar: Could not resolve dependencies for project kz.alfabank:type-ortalyk-bazar:bundle:1.0: Could not find artifact kz.alfabank:type-ortalyk-bazar:jar:1.0 in public (http://vserver266:8081/nexus/content/groups/public) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
We use as a repository Sonatype Nexus 2.11.4. Why Maven looks for newly created module in Nexus repository? And seems that some metadata files cannot be downloaded from Nexus :/
If dependencies are not available in local repository or other dependencies are not built or downloaded prior to the current module build that is when it looks within the remote repositories.
Please do look for the artifact kz.alfabank:type-ortalyk-bazar:jar:1.0 is present in the in your .m2 repo
Note: If you are using IntelliJ within the setting try offline mode

Resolving dependencies in Maven fails

I am trying to deploy Usergrid with the following POM file: https://github.com/apache/usergrid/blob/master/deployment/aws/pom.xml
Initially, I got a bunch of dependency issues so I ran:
mvn dependency:resolve-plugins
In the output I got some errors and warnings:
[WARNING] Could not transfer metadata org.codehaus.groovy:groovy-eclipse-batch/maven-metadata.xml from/to codehaus.org (http://repository.codehaus.org): repository.codehaus.org: unknown error
[WARNING] Could not transfer metadata org.codehaus.groovy:groovy-eclipse-batch/maven-metadata.xml from/to codehaus-snapshots (http://nexus.codehaus.org/snapshots/): nexus.codehaus.org: unknown error
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.apache.usergrid:awscluster:jar:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.codehaus.mojo:exec-maven-plugin # line 178, column 21
[WARNING]
[INFO]
[INFO] -------------------< org.apache.usergrid:awscluster >-------------------
[INFO] Building awscluster 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.9:resolve-plugins (default-cli) # awscluster ---
[INFO] Plugin Resolved: maven-jar-plugin-3.1.0.jar
[INFO] Plugin Dependency Resolved: maven-plugin-api-3.0.jar
[INFO] Plugin Dependency Resolved: maven-core-3.0.jar
[INFO] Plugin Dependency Resolved: maven-artifact-3.0.jar
[INFO] Plugin Dependency Resolved: maven-archiver-3.2.0.jar
[INFO] Plugin Dependency Resolved: plexus-archiver-3.5.jar
[INFO] Plugin Dependency Resolved: plexus-utils-3.1.0.jar
[INFO] Plugin Resolved: groovy-eclipse-compiler-2.6.0-01.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.350 s
[INFO] Finished at: 2018-08-17T13:49:11-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.9:resolve-plugins (default-cli) on project awscluster: Nested:: Failure to find org.codehaus.groovy:groovy-eclipse-batch:jar:[1.7.10-02,1.7.10-99],[1.8.2-01,1.9.0) in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
I tried downloading and installing the plugin from here:
https://mvnrepository.com/artifact/org.codehaus.groovy/groovy-eclipse-batch/1.8.2-01
Using:
$ mvn install:install-file -DgroupId=org.codehaus.groovy -DartifactId=groovy-eclipse-batch -Dversion=null -Dpackaging=jar -Dfile=groovy-eclipse-batch-1.8.2-01.jar
I ran mvn deploy and still got the dependency error.
How can fix this?

Invalid packaging for parent POM , must be "pom" but is "maven-plugin"

1]
I added the maven-clean-plugin:2.6.1.jar to my local repository. I did not specify a pom, so it generated one called mavin-plugin and gives me the error messages
[WARNING] The POM for org.apache.maven.plugins:maven-clean-plugin:jar:2.6.1 is invalid, transitive dependencies (if any) will not be available: 2 problems were encountered while building the effective model for org.apache.maven.plugins:maven-clean-plugin:2.6.1
[ERROR] Invalid packaging for parent POM org.apache.maven.plugins:maven-clean-plugin:2.6.1, must be "pom" but is "maven-plugin" #
[FATAL] The parents form a cycle: org.apache.maven.plugins:maven-clean-plugin:2.6.1 -> org.apache.maven.plugins:maven-clean-plugin:2.6.1 #
2]
I also tried adding in 2.4.1 by putting in both the jar and pom.xml with its jar packaging but got the error message:
[WARNING] The POM for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1 is invalid, transitive dependencies (if any) will not be available: 2 problems were encountered while building the effective model for org.apache.maven.plugins:maven-clean-plugin:2.4.1
[ERROR] Invalid packaging for parent POM rg.apache.maven.plugins:maven-clean-plugin:2.4.1, must be "pom" but is "jar" #
[FATAL] The parents form a cycle: org.apache.maven.plugins:maven-clean-plugin:2.4.1 -> org.apache.maven.plugins:maven-clean-plugin:2.4.1 #
3]
I also tried to update the jar file but did not specify a pom.xml and got an error
Downloading: https://mvnrepository.com/artifact/org.apache.maven.plugins/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
[DEBUG] Writing resolution tracking file C:\Users\xxx\.m2\repository\org\apache\maven\plugins\maven-clean-plugin\2.4.1\maven-clean-plugin-2.4.1.pom.lastUpdated
[WARNING] The POM for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.300s
[INFO] Finished at: Tue Dec 13 13:22:06 CST 2016
[INFO] Final Memory: 6M/121M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved:
Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1:
Could not find artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.4.1 in central (http://xxxxzero1.dev.deodiaus.com:8081/artifactory/plugins-release) -> [Help 1]
org.apache.maven.plugin.PluginResolutionException:
Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved:
Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:129)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor(DefaultMavenPluginManager.java:142)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDescriptor(DefaultMavenPluginManager.java:261)
at org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor(DefaultBuildPluginManager.java:185)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.setupMojoExecution(DefaultLifecycleExecutionPlanCalculator.java:152)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.setupMojoExecutions(DefaultLifecycleExecutionPlanCalculator.java:139)
4]
I also tried to manually change the pom.xml in my ~/repository/.../pom.xml file

build failure in dyn.js

Today I tried to build dyn.js from source with the instructions on https://github.com/dynjs/dynjs.
I tried it on Windows 7 and Linux (Fedora), but on both systems the build fails.
This is what i get:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building dynjs 0.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.projectodd.rephract:rephract:jar:1.x.incremental.39 is missing, no dependency information available
[WARNING] The POM for org.jboss.jreadline:jreadline:jar:0.20.incremental.2 is missing, no dependency information available
[WARNING] The POM for org.jruby.joni:joni:jar:1.1.10.incremental.1 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.382s
[INFO] Finished at: Wed Mar 20 12:01:04 CET 2013
[INFO] Final Memory: 7M/109M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project dynjs: Could not resolve dependencies for project org.dynjs:dynjs:jar:0.1.0-SNAPSHOT: The following artifacts could not be resolved: org.projectodd.rephract:rephract:jar:1.x.incremental.39, org.jboss.jreadline:jreadline:jar:0.20.incremental.2, org.jruby.joni:joni:jar:1.1.10.incremental.1: Failure to find org.projectodd.rephract:rephract:jar:1.x.incremental.39 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
Does anyone know how to fix this or how to get a working version of dyn.js?
Thanks!
The version # for that dependency has just been updated, see here:
https://github.com/dynjs/dynjs/blob/master/pom.xml#L144
so if you pull the repo, it should fix that and here is a link to the 0.1.1 tag
https://github.com/dynjs/dynjs/tree/v0.1.1
Once the sonatype ends its maintenance, 0.1.1 should be released in central
-Luke

Resources