Non resolvable parent POM although relativePath set to existing parent pom.xml - maven

My project has the structure
pom.xml (parent)
tcp/pom.xml
spark/pom.xml
The module xmls' both include this blurb
<parent>
<groupId>org.myorg</groupId>
<artifactId>parent</artifactId>
<version>1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
I have also tried leaving relativePath blank, or to ../ or .. or even not including it at all . In all cases the result is:
[ERROR] The build could not read 2 projects -> [Help 1]
[ERROR]
[ERROR] The project org.myorg:tcpclient:1.0.0 (/git/MYorg/tcp/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for org.myorg:tcpclient:1.0.0:
Failure to find org.myorg:parent:pom:1.0 in https://repository.apache.org/content/repositories/snapshots was cached in
the local repository, resolution will not be reattempted until
the update interval of Maven snapshots repository has elapsed or updates
are forced and 'parent.relativePath' points at wrong local POM # line 24,
column 9 -> [Help 2]
So I could use some help getting off the ground with these multi modules builds.
Update Following is last part of output of
mvn clean install -U -X > out 2>&1
INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from /usr/local/Cellar/maven/3.3.9/libexec/conf/settings.xml
[DEBUG] Reading user settings from /Users/steve/.m2/settings.xml
[DEBUG] Reading global toolchains from /usr/local/Cellar/maven/3.3.9/libexec/conf/toolchains.xml
[DEBUG] Reading user toolchains from /Users/steve/.m2/toolchains.xml
[DEBUG] Using local repository at /Users/steve/.m2/repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for /Users/steve/.m2/repository
[INFO] Scanning for projects...
[DEBUG] Using transporter WagonTransporter with priority -1.0 for https://repository.apache.org/content/repositories/snapshots
[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://repository.apache.org/content/repositories/snapshots
Downloading: https://repository.apache.org/content/repositories/snapshots/org/openchai/parent/1.0/parent-1.0.pom
[DEBUG] Writing tracking file /Users/steve/.m2/repository/org/openchai/parent/1.0/parent-1.0.pom.lastUpdated
[DEBUG] Using transporter WagonTransporter with priority -1.0 for https://repo.maven.apache.org/maven2
[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://repo.maven.apache.org/maven2
Downloading: https://repo.maven.apache.org/maven2/org/openchai/parent/1.0/parent-1.0.pom
[DEBUG] Writing tracking file /Users/steve/.m2/repository/org/openchai/parent/1.0/parent-1.0.pom.lastUpdated
[DEBUG] Skipped remote request for org.openchai:parent:pom:1.0, already updated during this session.
[DEBUG] Extension realms for project org.openchai:parent:pom:1.0.0: (none)
[DEBUG] Looking up lifecyle mappings for packaging pom from ClassRealm[plexus.core, parent: null]
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-jar-plugin # line 223, column 21
[FATAL] Non-resolvable parent POM for org.openchai:tcpclient:1.0.0: Could not find artifact org.openchai:parent:pom:1.0 in Maven snapshots repository (https://repository.apache.org/content/repositories/snapshots) and 'parent.relativePath' points at wrong local POM # line 24, column 9
[FATAL] Non-resolvable parent POM for org.openchai:spark_p2prdd:1.0.0: Failure to find org.openchai:parent:pom:1.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 and 'parent.relativePath' points at wrong local POM # line 24, column 10
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-install-plugin is missing. # line 90, column 21
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-source-plugin is missing. # line 168, column 15
#
[ERROR] The build could not read 2 projects -> [Help 1]
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-jar-plugin # line 223, column 21
[FATAL] Non-resolvable parent POM for org.openchai:tcpclient:1.0.0: Could not find artifact org.openchai:parent:pom:1.0 in Maven snapshots repository (https://repository.apache.org/content/repositories/snapshots) and 'parent.relativePath' points at wrong local POM # line 24, column 9
[FATAL] Non-resolvable parent POM for org.openchai:spark_p2prdd:1.0.0: Failure to find org.openchai:parent:pom:1.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 and 'parent.relativePath' points at wrong local POM # line 24, column 10
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-install-plugin is missing. # line 90, column 21
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-source-plugin is missing. # line 168, column 15
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:422)
at org.apache.maven.graph.DefaultGraphBuilder.collectProjects(DefaultGraphBuilder.java:419)
at org.apache.maven.graph.DefaultGraphBuilder.getProjectsForMavenReactor(DefaultGraphBuilder.java:410)
at org.apache.maven.graph.DefaultGraphBuilder.build(DefaultGraphBuilder.java:83)
at org.apache.maven.DefaultMaven.buildGraph(DefaultMaven.java:491)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:219)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[ERROR]
[ERROR] The project org.openchai:tcpclient:1.0.0 (/git/OCspark/tcp/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for org.openchai:tcpclient:1.0.0: Could not find artifact org.openchai:parent:pom:1.0 in Maven snapshots repository (https://repository.apache.org/content/repositories/snapshots) and 'parent.relativePath' points at wrong local POM # line 24, column 9 -> [Help 2]
org.apache.maven.model.resolution.UnresolvableModelException: Could not find artifact org.openchai:parent:pom:1.0 in Maven snapshots repository (https://repository.apache.org/content/repositories/snapshots)
at org.apache.maven.project.ProjectModelResolver.resolveModel(ProjectModelResolver.java:197)
at org.apache.maven.project.ProjectModelResolver.resolveModel(ProjectModelResolver.java:246)
at org.apache.maven.model.building.DefaultModelBuilder.readParentExternally(DefaultModelBuilder.java:1000)
at org.apache.maven.model.building.DefaultModelBuilder.readParent(DefaultModelBuilder.java:800)
at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:329)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:469)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:438)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:555)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:438)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:401)
at org.apache.maven.graph.DefaultGraphBuilder.collectProjects(DefaultGraphBuilder.java:419)
at org.apache.maven.graph.DefaultGraphBuilder.getProjectsForMavenReactor(DefaultGraphBuilder.java:410)
at org.apache.maven.graph.DefaultGraphBuilder.build(DefaultGraphBuilder.java:83)
at org.apache.maven.DefaultMaven.buildGraph(DefaultMaven.java:491)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:219)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact org.openchai:parent:pom:1.0 in Maven snapshots repository (https://repository.apache.org/content/repositories/snapshots)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:294)
at org.apache.maven.project.ProjectModelResolver.resolveModel(ProjectModelResolver.java:193)
... 27 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact org.openchai:parent:pom:1.0 in Maven snapshots repository (https://repository.apache.org/content/repositories/snapshots)
at org.eclipse.aether.

Amid so many details to track I made the following mistake:
The parent version was listed as 1.0 . The actual version in the parent pom.xml is 1.0.0.
There was no conceptual misunderstanding on my part: just attention to detail.

I just saw the version difference in the poms. 1.0.0 and 1.0. Check?
Ohh you updated the same :)

The primary answer to this should be at When maven says "resolution will not be reattempted until the update interval of MyRepo has elapsed", where is that interval specified?
I am guessing you might have tried an incorrect relativePath while building the project at some stage and that tried generating the artifact and failed but now that pom.xml is cached with an incorrect relativePath and would keep on throwing an error.
Would also suggest you go through this answer at How do you clear Apache Maven's cache? to use an effective way of clearing the cache if you simply don't want to delete the repository
More about <relativePath>, and it's use -
The relative path of the parent <code>pom.xml</code> file
within the checkout.
The default value is ../pom.xml.
Maven looks for the parent pom first in the reactor of currently building projects, then in this location on the filesystem, then the local repository, and lastly in the remote repo.
<code>relativePath</code> allows you to select a different location, for example when your structure is flat, or deeper without an intermediate parent pom.
However, the group ID, artifact ID and version are still required,
and must match the file in the location given or it will revert to the repository for the POM.
This feature is only for enhancing the development in a local checkout of that project.
In your case, the structure as depicted from the question doesn't need to explicitly define the relativePath and can use its default value skipping its declaration.

Related

Maven's Non-Resolvable Parent POM Problem

We have downloaded the Project "https://bitbucket.org/m2m/cumulocity-clients-java/src/develop/" and try to run the project the project but we have the following issue :
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.nsn.cumulocity.clients-java:clients-java:9.19.1-SNAPSHOT: Failure to find com.nsn.cumulocity.root:root:pom:9.19.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 and 'parent.relativePath' points at wrong local POM # line 5, column 10
#
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.nsn.cumulocity.clients-java:clients-java:9.19.1-SNAPSHOT (D:\Projects\Dormakaba\Code\Test-Code\cumulocity\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for com.nsn.cumulocity.clients-java:clients-java:9.19.1-SNAPSHOT: Failure to find com.nsn.cumulocity.root:root:pom:9.19.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 and 'parent.relativePath' points at wrong local POM # line 5, column 10 -> [Help 2]
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
My Main POM.XML
http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
<parent>
<groupId>com.nsn.cumulocity.root</groupId>
<artifactId>root</artifactId>
<version>9.19.0</version>
<relativePath>/pom.xml</relativePath>
</parent>
<groupId>com.nsn.cumulocity.clients-java</groupId>
<artifactId>clients-java</artifactId>
<packaging>pom</packaging>
<version>9.19.1-SNAPSHOT</version>
<name>Cumulocity :: Clients Java</name>
<url>http://startups.jira.com/wiki/display/MTM/Home</url>
<scm>
<connection>scm:hg:ssh://hg#bitbucket.org/m2m/cumulocity-clients-java</connection>
<tag>HEAD</tag>
</scm>
<modules>
<module>device-capability-model</module>
<module>java-client</module>
<module>java-me-client</module>
<module>java-me-client-test</module>
<module>java-me-maven-plugin</module>
<module>java-me-smartrest</module>
<module>java-email-client</module>
<module>java-sms-client</module>
<module>java-client-services</module>
</modules>
...................
Best regards, Manoj
Like the error message states, your Parent Pom is not found in the Remote Repository and neither in your local Repository nor in the given relative Path.
Put the Parent Pom in the correct location and all should be fine.
EDIT: The description of this project states, that you do need to add their own repo.
https://bitbucket.org/m2m/cumulocity-clients-java

Maven Oracle 10.2.0.5.0 driver issue

I am trying the following command to use oracle from my application but it is failing on windows 7.
mvn install:install-file -Dfile=Z:\oracle\ojdbc14.jar -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.5.0 -Dpackaging=jar
stacktrace:
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven
-install-plugin/2.4/maven-install-plugin-2.4.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:mave
n-install-plugin:2.4: Plugin org.apache.maven.plugins:maven-install-plugin:2.4 o
r one of its dependencies could not be resolved: Failed to read artifact descrip
tor for org.apache.maven.plugins:maven-install-plugin:jar:2.4
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven
-deploy-plugin/2.7/maven-deploy-plugin-2.7.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:mave
n-deploy-plugin:2.7: Plugin org.apache.maven.plugins:maven-deploy-plugin:2.7 or
one of its dependencies could not be resolved: Failed to read artifact descripto
r for org.apache.maven.plugins:maven-deploy-plugin:jar:2.7
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven
-site-plugin/3.3/maven-site-plugin-3.3.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:mave
n-site-plugin:3.3: Plugin org.apache.maven.plugins:maven-site-plugin:3.3 or one
of its dependencies could not be resolved: Failed to read artifact descriptor fo
r org.apache.maven.plugins:maven-site-plugin:jar:3.3
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven
-antrun-plugin/1.3/maven-antrun-plugin-1.3.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:mave
n-antrun-plugin:1.3: Plugin org.apache.maven.plugins:maven-antrun-plugin:1.3 or
one of its dependencies could not be resolved: Failed to read artifact descripto
r for org.apache.maven.plugins:maven-antrun-plugin:jar:1.3
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven
-assembly-plugin/2.2-beta-5/maven-assembly-plugin-2.2-beta-5.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:mave
n-assembly-plugin:2.2-beta-5: Plugin org.apache.maven.plugins:maven-assembly-plu
gin:2.2-beta-5 or one of its dependencies could not be resolved: Failed to read
artifact descriptor for org.apache.maven.plugins:maven-assembly-plugin:jar:2.2-b
eta-5
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven
-dependency-plugin/2.8/maven-dependency-plugin-2.8.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:mave
n-dependency-plugin:2.8: Plugin org.apache.maven.plugins:maven-dependency-plugin
:2.8 or one of its dependencies could not be resolved: Failed to read artifact d
escriptor for org.apache.maven.plugins:maven-dependency-plugin:jar:2.8
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.473 s
[INFO] Finished at: 2016-05-20T10:27:58-05:00
[INFO] Final Memory: 10M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its d
ependencies could not be resolved: Failed to read artifact descriptor for org.ap
ache.maven.plugins:maven-install-plugin:jar:2.4: Failure to transfer org.apache.
maven.plugins:maven-install-plugin:pom:2.4 from https://repo.maven.apache.org/ma
ven2 was cached in the local repository, resolution will not be reattempted unti
l the update interval of central has elapsed or updates are forced. Original err
or: Could not transfer artifact org.apache.maven.plugins:maven-install-plugin:po
m:2.4 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.
org -> [Help 1]
org.apache.maven.plugin.PluginResolutionException: Plugin org.apache.maven.plugi
ns:maven-install-plugin:2.4 or one of its dependencies could not be resolved: Fa
iled to read artifact descriptor for org.apache.maven.plugins:maven-install-plug
in:jar:2.4
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.re
solve(DefaultPluginDependenciesResolver.java:117)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginD
escriptor(DefaultMavenPluginManager.java:179)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDes
criptor(DefaultMavenPluginManager.java:284)
at org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor(D
efaultBuildPluginManager.java:241)
at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.getMojoDesc
riptor(MojoDescriptorCreator.java:238)
at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalcul
ator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:103)
at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalcul
ator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:83)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:89)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
356)
Caused by: org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to
read artifact descriptor for org.apache.maven.plugins:maven-install-plugin:jar:2
.4
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.
loadPom(DefaultArtifactDescriptorReader.java:282)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.
readArtifactDescriptor(DefaultArtifactDescriptorReader.java:198)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.readArtifact
Descriptor(DefaultRepositorySystem.java:287)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.re
solve(DefaultPluginDependenciesResolver.java:103)
... 21 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Failure to
transfer org.apache.maven.plugins:maven-install-plugin:pom:2.4 from https://rep
o.maven.apache.org/maven2 was cached in the local repository, resolution will no
t be reattempted until the update interval of central has elapsed or updates are
forced. Original error: Could not transfer artifact org.apache.maven.plugins:ma
ven-install-plugin:pom:2.4 from/to central (https://repo.maven.apache.org/maven2
): repo.maven.apache.org
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(Defa
ultArtifactResolver.java:444)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtif
acts(DefaultArtifactResolver.java:246)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtif
act(DefaultArtifactResolver.java:223)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.
loadPom(DefaultArtifactDescriptorReader.java:267)
... 24 more
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to tra
nsfer org.apache.maven.plugins:maven-install-plugin:pom:2.4 from https://repo.ma
ven.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 for
ced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-
install-plugin:pom:2.4 from/to central (https://repo.maven.apache.org/maven2): r
epo.maven.apache.org
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newExcepti
on(DefaultUpdateCheckManager.java:238)
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtif
act(DefaultUpdateCheckManager.java:183)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownlo
ads(DefaultArtifactResolver.java:585)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownl
oads(DefaultArtifactResolver.java:503)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(Defa
ultArtifactResolver.java:421)
... 27 more
[ERROR]
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResoluti
onException
try deleting the failed artifact from your local maven repository and try again. In your case, delete this directory and try again.
C:/Users//.m2/repository/org/apache/maven/plugins/maven-install-plugin
The issue was due to proxy. Proxy setting were changed.

Nexus Central local storage missing maven jars

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]

Magnolia archetype can't resolve info.magnolia.ui:magnolia-ui-project:pom:5.3

I'm trying to use maven archetype to create a Magnolia project by running:
D:\workingFolder\workspace\MagnoliaTutorial5.3\tryProjects> mvn archetype:generate -DarchetypeCatalog=http://nexus.magnolia-cms.com/content/groups/public/
and choose
5: http://nexus.magnolia-cms.com/content/groups/public/ -> info.magnolia.maven.archetypes:magnolia-project-archetype (An arch
etype to create a Magnolia project (a parent pom and a webapp))
and configure the properties as follow:
Confirm properties configuration:
groupId: com.try.projects
artifactId: tryProjects
version: 1.0-SNAPSHOT
package: com.try.projects
magnolia-version: 5.3
project-name: tryProjects
project creation is successful but when I run
mvn clean install
I run into following problem:
[INFO] Error building POM (may not be this project's POM).
Project ID: info.magnolia.ui:magnolia-ui-project
Reason: POM 'info.magnolia.ui:magnolia-ui-project' not found in repository: Unable to download the artifact from any reposito
ry
info.magnolia.ui:magnolia-ui-project:pom:5.3
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
for project info.magnolia.ui:magnolia-ui-project
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: POM 'info.magnolia.ui:magnolia-ui-project' not found in repository: Unable
to download the artifact from any repository
info.magnolia.ui:magnolia-ui-project:pom:5.3
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
for project info.magnolia.ui:magnolia-ui-project
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:404)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:272)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.project.ProjectBuildingException: POM 'info.magnolia.ui:magnolia-ui-project' not found in reposit
ory: Unable to download the artifact from any repository
info.magnolia.ui:magnolia-ui-project:pom:5.3
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
for project info.magnolia.ui:magnolia-ui-project
at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:605)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:251)
at org.apache.maven.project.DefaultMavenProjectBuilder.mergeManagedDependencies(DefaultMavenProjectBuilder.java:1456)
at org.apache.maven.project.DefaultMavenProjectBuilder.processProjectLogic(DefaultMavenProjectBuilder.java:999)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:880)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:255)
at org.apache.maven.project.DefaultMavenProjectBuilder.mergeManagedDependencies(DefaultMavenProjectBuilder.java:1456)
at org.apache.maven.project.DefaultMavenProjectBuilder.processProjectLogic(DefaultMavenProjectBuilder.java:999)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:880)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:50
8)
at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:200)
at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:604)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:487)
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:391)
... 12 more
Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable to download the artifact from any repository
info.magnolia.ui:magnolia-ui-project:pom:5.3
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:228)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:90)
at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:558)
... 25 more
Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to download the artifact from any repository
at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:404)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:216)
... 27 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Sun Jul 20 22:47:32 SGT 2014
[INFO] Final Memory: 3M/15M
[INFO] ------------------------------------------------------------------------
I tried to use earlier version 5.1.1 this problem is not occurred. looks like something wrong for the repository but I can't figure out the solution for this.
Any ideal how I can fix this problem?
Magnolia's modules are located in their own maven repository, so you need to add this one to your settings.xml.
The following command can be executed from a terminal in your .m2 repository (usually <user-dir>/.m2) and will download a settings.xml file preconfigured for Magnolia CE:
mvn org.sonatype.plugins:nexus-maven-plugin:1.9.2.4:settings-download -Dnexus.url=http://nexus.magnolia-cms.com -Dsettings.templateId=magnolia-community-public
You will only need to do this step once. After that, maven knows Magnolia's maven repo.
Documentation: http://documentation.magnolia-cms.com/display/DOCS/Maven+init
https://wiki.magnolia-cms.com/display/DEV/Maven+setup
for CE users, you need to use the following command in .m2 folder:
mvn org.sonatype.plugins:nexus-m2settings-maven-plugin:1.6.5:download -DnexusUrl=https://nexus.magnolia-cms.com -Dusername=anonymous -Dpassword=anonymous -DtemplateId=magnolia-community-public

Maven Build Failure - failure to find plugins

I have created a project using the m2 eclipse tool and selected the web application archetype now if I try to package this empty application I get a build failure saying
[ERROR] Plugin org.apache.maven.plugins:maven-war-plugin:2.1 or one of its dependencies could not be resolved: Failure to find org.apache.maven.plugins:maven-war-plugin:jar:2.1 in http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update in
terval of central has elapsed or updates are forced -> [Help 1]
org.apache.maven.plugin.PluginResolutionException: Plugin org.apache.maven.plugins:maven-war-plugin:2.1 or one of its dependencies could not be resolv
ed: Failure to find org.apache.maven.plugins:maven-war-plugin:jar:2.1 in http://repo1.maven.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
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:96)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor(DefaultMavenPluginManager.java:136)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDescriptor(DefaultMavenPluginManager.java:251)
at org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor(DefaultBuildPluginManager.java:197)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.setupMojoExections(DefaultLifecycleExecutionPlanCalculator.java
:134)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan(DefaultLifecycleExecutionPlanCalculator.
java:116)
at org.apache.maven.lifecycle.internal.BuilderCommon.resolveBuildPlan(BuilderCommon.java:92)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:314)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:151)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:445)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:168)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Failure to find org.apache.maven.plugins:maven-war-plugin:jar:2.1 in http://rep
o1.maven.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
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:488)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:190)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:250)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:92)
... 23 more
Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Failure to find org.apache.maven.plugins:maven-war-plugin:jar:2.1 in http://repo1.m
aven.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
at org.sonatype.aether.impl.internal.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:191)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:384)
... 26 more
[ERROR]
[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/PluginResolutionException
Now I have tried updating the repository ect but I am having no luck.
Upon suggestion I have tried to update the plugin registry but there is no such file pugin-registry.xml on my file system.
Also it builds fine within eclipse but fails from command , so I'm guessing they are both using different versions. How to fix this?
Try using the -cpu flag. Output from mvn -help:
usage: mvn [options] [<goal(s)>] [<phase(s)>]
Options:
-cpu,--check-plugin-updates Force upToDate check for any
relevant registered plugins
You are missing a plugin required for the Maven build to function. Check and tweak the values in the Plugin Registry such that an update is forced. You can also use command line parameters to force the download of the plugin.
I followed below steps and it worked for me. Check if it is useful for you.
project-->properties-->Maven-->User settings
change user settings to point out to correct settings.xml
and to your repository folder should exist in your system.
This is resolved when I moved back to maven v 3.0.4.

Resources