Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: dev
-
Fix Version/s: 0.9.7
-
Component/s: Dependency Resolver
-
Labels:None
Description
Seems workspace resolution in embedder is broken. When I create 2 trivial projects from scratch (parent and child), there is no way to make it work:
12/16/08 12:44:31 AM EST: Build error for /child/pom.xml; org.apache.maven.reactor.MavenExecutionException: Error scanning for extensions: Error building model lineage in order to pre-scan for extensions: Cannot find artifact for parent POM: g:parent::1 for project g:child:jar:1 at C:\sona\ganymede\runtime-New_configuration\child\pom.xml Caused by: org.apache.maven.project.ProjectBuildingException: Cannot find artifact for parent POM: g:parent::1 for project g:child:jar:1 at C:\sona\ganymede\runtime-New_configuration\child\pom.xml at org.apache.maven.project.build.model.DefaultModelLineageBuilder.resolveParentFromRepositories(DefaultModelLineageBuilder.java:550) at org.apache.maven.project.build.model.DefaultModelLineageBuilder.resolveParentPom(DefaultModelLineageBuilder.java:414) at org.apache.maven.project.build.model.DefaultModelLineageBuilder.buildModelLineage(DefaultModelLineageBuilder.java:131) at org.apache.maven.extension.DefaultBuildExtensionScanner.buildModelLineage(DefaultBuildExtensionScanner.java:425) ... 12 more Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable to download the artifact from any repository g:parent:pom:1 from the specified remote repositories: central (http://repo1.maven.org/maven2) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:208) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:83) at org.apache.maven.project.build.model.DefaultModelLineageBuilder.resolveParentFromRepositories(DefaultModelLineageBuilder.java:541) ... 15 more
I tried creating new workspace, etc, no luck. Why it tries remote repository for a workspace project? These 2 projects have proper maven markers and dependency containers. Tried enabling/disabling dependency management, updating dependencies/project configuration, etc - no luck.
Issue Links
- duplicates
-
MNGECLIPSE-1104
Workspace resolution in embedder is broken
-
Although the original issue was closed by the submitter as just needing to add <packaging>pom</packaging>, this does not resolve the issue.
It appears from my testing that workspace resolution is not handling parent poms that are not maven modules. If the attached zip from the original issue is imported into a workspace and the packaging pom is added to the parent, the error will still occur. However, if the parent pom is installed then the error no longer occurs. This error does not seem to be an issue with nested projects (maven modules), only projects using parents which are not nested.