Maven: Insoluble parent POM and "parent.relativePath" indicate an invalid local POM

I use maven 3 to run the application, but I get the following error:

[ERROR] The build could not read 1 project -> [Help 1] org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs: [FATAL] Non-resolvable parent POM: Failure to find com.topdesk:tis-parent:pom:3. 4 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 3, column 11 at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:416) at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:663) at org.apache.maven.DefaultMaven.getProjectsForMavenReactor(DefaultMaven.java:654) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:243) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214) at org.apache.maven.cli.MavenCli.main(MavenCli.java:158) 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:497) 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 com.topdesk.test.junitcategorizer:junitcategorizer:0.0.1-SNAPSHOT (D:\Masters\thesis related papers and tools\junitcategorizer\pom.xml) has 1 error [ERROR] Non-resolvable parent POM: Failure to find com.topdesk:tis-parent:pom:3.4 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 3, column 11 -> [Help 2]org.apache.maven.model.resolution.UnresolvableModelException: Failure to find com.topdesk:tis-parent:pom:3.4 in https://repo.maven.apache.org/maven2 was cachedin 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(ProjectModelResolver.java:187) at org.apache.maven.project.ProjectModelResolver.resolveModel(ProjectModelResolver.java:236) at org.apache.maven.model.building.DefaultModelBuilder.readParentExternally(DefaultodelBuilder.java:898) at org.apache.maven.model.building.DefaultModelBuilder.readParent(DefaultModelBuilder.java:750) at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:309) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:463) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:432) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:396) at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:663) at org.apache.maven.DefaultMaven.getProjectsForMavenReactor(DefaultMaven.java:654) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:243) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214) at org.apache.maven.cli.MavenCli.main(MavenCli.java:158) 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:497) 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: Failure to find com.topdesk:tis-parent:pom:3.4 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 at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:459) at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:262) at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:239) at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:295) at org.apache.maven.project.ProjectModelResolver.resolveModel(ProjectModelResolver.java:183) ... 22 more Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Failure to find com.topdesk:tis-parent:pom:3.4 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 at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:232) at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:206) at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:599) at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:518) at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:436) ... 26 more 

I have the following parent pom file (part of it):

 <modelVersion>4.0.0</modelVersion> <parent> <groupId>com.topdesk</groupId> <artifactId>tis-parent</artifactId> <version>3.4</version> </parent> <groupId>com.topdesk.test.junitcategorizer</groupId> <artifactId>junitcategorizer</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>pom</packaging> <name>JUnitCategorizer</name> <modules> <module>junitcategorizer.instrument</module> <module>junitcategorizer.examples</module> <module>junitcategorizer.reporter.maven</module> <module>junitcategorizer.reporter.maven.site</module> <module>junitcategorizer.cutdetection</module> </modules> <organization> <name>TOP Informatie Systemen bv</name> <url>http://www.topdesk.com/</url> </organization> <properties> <project.build.sourceEncoding>utf-8</project.build.sourceEncoding> <project.reporting.outputEncoding>utf-8</project.reporting.outputEncoding> <surefire.version>2.12</surefire.version> </properties> <prerequisites> <maven>3.0</maven> </prerequisites> 

I have the following child module pom file:

  <modelVersion>4.0.0</modelVersion> <parent> <artifactId>junitcategorizer</artifactId> <groupId>com.topdesk.test.junitcategorizer</groupId> <version>0.0.1-SNAPSHOT</version> <relativePath>..</relativePath> </parent> <artifactId>junitcategorizer.cutdetection</artifactId> <name>Analysis of parameters for the CUT detection algorithm</name> <description>Analysis of parameters for the CUT detection algorithm</description> <dependencies> <dependency> <groupId>com.topdesk.test.junitcategorizer</groupId> <artifactId>junitcategorizer.instrument</artifactId> <version>0.0.1-SNAPSHOT</version> </dependency> </dependencies> </project> 

I tried to comment on the next part in the parent pom file (I don’t know whether to do it right), then this error disappeared and the assembly failed with this .

 <parent> <groupId>com.topdesk</groupId> <artifactId>tis-parent</artifactId> <version>3.4</version> </parent> 

Please help me!

thanks

+5
source share
2 answers

Normal layout for maven multi-module project:

 parent β”œβ”€β”€ pom.xml β”œβ”€β”€ module  β”œβ”€β”€ pom.xml 

Make sure you use this layout.

Additionally:

  • relativePath looks weird. Instead of ".."

     <relativePath>..</relativePath> 

    try '../' instead:

     <relativePath>../</relativePath> 

    You can also remove relativePath if you use the standard layout. This is what I always do, and on the command line I can also build the parent (and all modules) or just one module.

  • The path to the module may be incorrect. In the parent, you define the module as:

     <module>junitcategorizer.cutdetection</module> 

    You must specify the folder name of the child module, not the identifier of the artifact. If junitcategorizer.cutdetection is not the name of the folder, but the corresponding change.

Hope this helps.

EDIT take a look at another post, I answered there.

+4
source

You can try as follows:

  <parent> <groupId></groupId> <artifactId></artifactId> <version></version> </parent> 

So that the parent jar will be retrieved from the repository.

+1
source

Source: https://habr.com/ru/post/1246550/


All Articles