我是maven的新手。我正在使用以下命令尝试为我的项目构建.ear(包含其他几个项目)。
mvn clean package -DskipTests
以下是我的错误日志:
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.mmm.snaps:snaps-root:3.13.1.1-SNAPSHOT
: Failure to find com.mmm.ebus:ebus-root:pom:3.0.0.3 in https://repo.maven.apach
e.org/maven2 was cached in the local repository, resolution will not be reattemp
ted until the update interval of central has elapsed or updates are forced and '
parent.relativePath' points at wrong local POM @ line 9, column 10
@
[ERROR] The build could not read 1 project -> [Help 1]
以下是我在com.mmm.ebus
pom.xml
<parent>
<groupId>com.mmm.ebus</groupId>
<artifactId>ebus-root</artifactId>
<version>3.0.0.3</version>
</parent>
我和我的同事都有相同的代码。它在她的系统上运行正常但不在我的系统上。可能出了什么问题?
我已经完成了mvn clean
。
以下是mvn clean package -DskipTests -X
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T17:27:3
7+05:30)
Maven home: C:\Users\414578\apache-maven-3.3.3\bin\..
Java version: 1.8.0_91, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_91\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "x86", family: "dos"
[DEBUG] Created new class realm maven.api
[DEBUG] Importing foreign packages into class realm maven.api
[DEBUG] Imported: javax.enterprise.inject.* < plexus.core
[DEBUG] Imported: javax.enterprise.util.* < plexus.core
[DEBUG] Imported: javax.inject.* < plexus.core
[DEBUG] Imported: org.apache.maven.* < plexus.core
[DEBUG] Imported: org.apache.maven.artifact < plexus.core
[DEBUG] Imported: org.apache.maven.classrealm < plexus.core
[DEBUG] Imported: org.apache.maven.cli < plexus.core
[DEBUG] Imported: org.apache.maven.configuration < plexus.core
[DEBUG] Imported: org.apache.maven.exception < plexus.core
[DEBUG] Imported: org.apache.maven.execution < plexus.core
[DEBUG] Imported: org.apache.maven.execution.scope < plexus.core
[DEBUG] Imported: org.apache.maven.lifecycle < plexus.core
[DEBUG] Imported: org.apache.maven.model < plexus.core
[DEBUG] Imported: org.apache.maven.monitor < plexus.core
[DEBUG] Imported: org.apache.maven.plugin < plexus.core
[DEBUG] Imported: org.apache.maven.profiles < plexus.core
[DEBUG] Imported: org.apache.maven.project < plexus.core
[DEBUG] Imported: org.apache.maven.reporting < plexus.core
[DEBUG] Imported: org.apache.maven.repository < plexus.core
[DEBUG] Imported: org.apache.maven.rtinfo < plexus.core
[DEBUG] Imported: org.apache.maven.settings < plexus.core
[DEBUG] Imported: org.apache.maven.toolchain < plexus.core
[DEBUG] Imported: org.apache.maven.usability < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.* < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.authentication < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.authorization < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.events < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.observers < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.proxy < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.repository < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.resource < plexus.core
[DEBUG] Imported: org.codehaus.classworlds < plexus.core
[DEBUG] Imported: org.codehaus.plexus.* < plexus.core
[DEBUG] Imported: org.codehaus.plexus.classworlds < plexus.core
[DEBUG] Imported: org.codehaus.plexus.component < plexus.core
[DEBUG] Imported: org.codehaus.plexus.configuration < plexus.core
[DEBUG] Imported: org.codehaus.plexus.container < plexus.core
[DEBUG] Imported: org.codehaus.plexus.context < plexus.core
[DEBUG] Imported: org.codehaus.plexus.lifecycle < plexus.core
[DEBUG] Imported: org.codehaus.plexus.logging < plexus.core
[DEBUG] Imported: org.codehaus.plexus.personality < plexus.core
[DEBUG] Imported: org.codehaus.plexus.util.xml.Xpp3Dom < plexus.core
[DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlPullParser < plexus.cor
e
[DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlPullParserException < p
lexus.core
[DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlSerializer < plexus.cor
e
[DEBUG] Imported: org.eclipse.aether.* < plexus.core
[DEBUG] Imported: org.eclipse.aether.artifact < plexus.core
[DEBUG] Imported: org.eclipse.aether.collection < plexus.core
[DEBUG] Imported: org.eclipse.aether.deployment < plexus.core
[DEBUG] Imported: org.eclipse.aether.graph < plexus.core
[DEBUG] Imported: org.eclipse.aether.impl < plexus.core
[DEBUG] Imported: org.eclipse.aether.installation < plexus.core
[DEBUG] Imported: org.eclipse.aether.internal.impl < plexus.core
[DEBUG] Imported: org.eclipse.aether.metadata < plexus.core
[DEBUG] Imported: org.eclipse.aether.repository < plexus.core
[DEBUG] Imported: org.eclipse.aether.resolution < plexus.core
[DEBUG] Imported: org.eclipse.aether.spi < plexus.core
[DEBUG] Imported: org.eclipse.aether.transfer < plexus.core
[DEBUG] Imported: org.eclipse.aether.version < plexus.core
[DEBUG] Imported: org.slf4j.* < plexus.core
[DEBUG] Imported: org.slf4j.spi.* < plexus.core
[DEBUG] Populating class realm maven.api
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from C:\Users\414578\apache-maven-3.3.3\bin\..\c
onf\settings.xml
[DEBUG] Reading user settings from C:\Users\312974\.m2\settings.xml
[DEBUG] Reading global toolchains from C:\Users\414578\apache-maven-3.3.3\bin\..
\conf\toolchains.xml
[DEBUG] Reading user toolchains from C:\Users\312974\.m2\toolchains.xml
[DEBUG] Using local repository at C:\Users\312974\.m2\repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for C:\U
sers\312974\.m2\repository
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.mmm.snaps:snaps-root:3.13.1.1-SNAPSHOT
: Failure to find com.mmm.ebus:ebus-root:pom:3.0.0.3 in https://repo.maven.apach
e.org/maven2 was cached in the local repository, resolution will not be reattemp
ted until the update interval of central has elapsed or updates are forced and '
parent.relativePath' points at wrong local POM @ line 9, column 10
@
[ERROR] The build could not read 1 project -> [Help 1]
org.apache.maven.project.ProjectBuildingException: Some problems were encountere
d while processing the POMs:
[FATAL] Non-resolvable parent POM for com.mmm.snaps:snaps-root:3.13.1.1-SNAPSHOT
: Failure to find com.mmm.ebus:ebus-root:pom:3.0.0.3 in https://repo.maven.apach
e.org/maven2 was cached in the local repository, resolution will not be reattemp
ted until the update interval of central has elapsed or updates are forced and '
parent.relativePath' points at wrong local POM @ line 9, column 10
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBu
ilder.java:422)
at org.apache.maven.graph.DefaultGraphBuilder.collectProjects(DefaultGra
phBuilder.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:862)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
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)
[ERROR]
[ERROR] The project com.mmm.snaps:snaps-root:3.13.1.1-SNAPSHOT (C:\Users\31297
4\GIT\snaps\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for com.mmm.snaps:snaps-root:3.13.1.1-SNAP
SHOT: Failure to find com.mmm.ebus:ebus-root:pom:3.0.0.3 in https://repo.maven.a
pache.org/maven2 was cached in the local repository, resolution will not be reat
tempted until the update interval of central has elapsed or updates are forced a
nd 'parent.relativePath' points at wrong local POM @ line 9, column 10 -> [Help
2]
org.apache.maven.model.resolution.UnresolvableModelException: Failure to find co
m.mmm.ebus:ebus-root:pom:3.0.0.3 in https://repo.maven.apache.org/maven2 was cac
hed 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.project.ProjectModelResolver.resolveModel(ProjectMod
elResolver.java:197)
at org.apache.maven.project.ProjectModelResolver.resolveModel(ProjectMod
elResolver.java:246)
at org.apache.maven.model.building.DefaultModelBuilder.readParentExterna
lly(DefaultModelBuilder.java:978)
at org.apache.maven.model.building.DefaultModelBuilder.readParent(Defaul
tModelBuilder.java:796)
at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultMode
lBuilder.java:325)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBu
ilder.java:469)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBu
ilder.java:438)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBu
ilder.java:401)
at org.apache.maven.graph.DefaultGraphBuilder.collectProjects(DefaultGra
phBuilder.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:862)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
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.ArtifactResolutionException: Failure to
find com.mmm.ebus:ebus-root:pom:3.0.0.3 in https://repo.maven.apache.org/maven2
was cached in the local repository, resolution will not be reattempted until th
e update interval of central has elapsed or updates are forced
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.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtif
act(DefaultRepositorySystem.java:294)
at org.apache.maven.project.ProjectModelResolver.resolveModel(ProjectMod
elResolver.java:193)
... 25 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Failure to fin
d com.mmm.ebus:ebus-root:pom:3.0.0.3 in https://repo.maven.apache.org/maven2 was
cached in the local repository, resolution will not be reattempted until the up
date interval of central has elapsed or updates are forced
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newExcepti
on(DefaultUpdateCheckManager.java:231)
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtif
act(DefaultUpdateCheckManager.java:206)
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)
... 29 more
[ERROR]
[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/ProjectBuildin
gException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableMo
delException
答案 0 :(得分:0)
您正试图从maven存储库(https://repo.maven.apache.org/maven2)获取父工件。
我猜com.mmm.ebus:ebus-root:pom:3.0.0.3
是您的项目特定工件,它将驻留在您的客户端远程存储库中。
你的同事应该通过
来提及 <parent>
....
<relativePath>../..</relativePath>
</parent>
否则,她应该已经配置了正确的存储库,必须从中提取此父节点,如..
<repositories>
<repository>
<url>http://.......</url>
</repository>
</repositories>
将您的专家settings.xml
与您的同事进行比较。这应该会有所帮助。