添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I am using maven 3 to run the application but I am getting 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 commenting the below part in the parent pom file( i don't know if it is correct to do it), then this error is gone and the build fails with this error.

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

Please help me!

Thanks

What it complains about is that it can't find the com.topdesk:tis-parent (or at least not the correct version of it). You have in your parent pom specified tis-parent as the parent pom of your parent. The question is if that is what you want to do. Is in fact tis-parent the parent of junitcategorizer? If it is then you need to figure out why you can't find it. If it is not the correct parent then it should be removed or replaced with the correct one. – DanielBarbarian Apr 6, 2016 at 12:24 I removed the tis-parent as it from the company, so now I this error is gone but still I have this. – Srinu Apr 7, 2016 at 10:24

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

  • The module path may be wrong. In the parent you define the module as:

    <module>junitcategorizer.cutdetection</module>
    

    You must specify the name of the folder of the child module, not an artifact identifier. If junitcategorizer.cutdetection is not the name of the folder than change it accordingly.

  • Hope that helps..

    EDIT have a look at the other post, I answered there.

    Thanks for your suggestions! but now I modified the parent pom file so this error gone but the build fails with this error.. – Srinu Apr 7, 2016 at 10:25

    I'm probably a bit late to the party, but I wrote the junitcategorizer for my thesis project at TOPdesk. Earlier versions indeed used a company internal Parent POM. So your problems are caused by the Parent POM not being resolvable, since it is not available to the outside world.

    You can either:

  • Remove the <parent> block, but then have to configure the Surefire, Compiler and other plugins yourself
  • (Only applicable to this specific case!) Change it to point to our Open Source Parent POM by setting:
  • <parent>
        <groupId>com.topdesk</groupId>
        <artifactId>open-source-parent</artifactId>
        <version>1.2.0</version>
    </parent>
    

    So In my case, After trying all the above options, I realized it was VPN (company firewall).once connected and ran cmd: clean install spring-boot:run. Issue is resolved. Step 1: check maven is configured correctly or not. Step 2: check settings.xml is mapped correctly or not. Step 3: verify if you are behind any firewall then map your repo urls accordingly. Step 4:run clean install spring-boot:run step 5: issue is resolved.

    Using Maven 3.8.3 on Windows, I had no problem by explicitly specifying the relative path of the parent pom.xml (../pom.xml), i.e.:

    <parent>
        <groupId>org.example</groupId>
        <artifactId>example</artifactId>
        <version>1.0.0-SNAPSHOT</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    

    The only thing that left me disappointed is the misleading documentation.

    Quoting the Maven source about relativePath:

    The relative path of the parent pom.xml file within the check out. The default value is ../pom.xml. [...]

    Now, while the documentation states that ../pom.xml should be the default, replacing <relativePath>../pom.xml</relativePath> with <relativePath/> had the effect of producing exactly the error reported in the question.

    Adding the following to pom.xml will resolve the issue:

    <pluginRepositories>
        <pluginRepository>
            <id>central</id>
            <name>Central Repository</name>
            <url>https://repo.maven.apache.org/maven2</url>
            <layout>default</layout>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <updatePolicy>never</updatePolicy>
            </releases>
        </pluginRepository>
    </pluginRepositories>
    <repositories>
        <repository>
            <id>central</id>
            <name>Central Repository</name>
            <url>https://repo.maven.apache.org/maven2</url>
            <layout>default</layout>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>
    fixation steps :

  • Copy the contents of the below file to a file on your local (Don't Copy Line 1). https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.6.9/spring-boot-starter-parent-2.6.9.pom

  • Copy the path("C:/Users/bharat/.m2/repository_saml/org/springframework/boot/spring-boot-starter-parent/2.0.4" in my case) and add it to your pom.xml like below.

    <parent>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-parent</artifactId>
         <version>2.0.4</version>
         <relativePath>C:/Users/bharat/.m2/repository_saml/org/springframework/boot/spring-boot-starter-parent/2.0.4</relativePath>
    </parent>
    

    This will do the trick no matter what.

    Thanks for contributing an answer to Stack Overflow!

    • Please be sure to answer the question. Provide details and share your research!

    But avoid

    • Asking for help, clarification, or responding to other answers.
    • Making statements based on opinion; back them up with references or personal experience.

    To learn more, see our tips on writing great answers.

  •