Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
771 views
in Technique[技术] by (71.8m points)

maven - Non-resolvable import POM: Could not find artifact

I have Googled for the error stated in the subject but could not find an useful answer, possibly due to my directory structure. I am trying to build and install 4.4.0-SNAPSHOT of brovada-commons in my local repository. Relevant parts of BrovadaCoreLibrariesrovada-commons4.4.xpom.xml :

    <modelVersion>4.0.0</modelVersion>
    <groupId>com.brovada.lib</groupId>
    <artifactId>brovada-commons</artifactId>
    <version>4.4.0-SNAPSHOT</version>

    <parent>
        <groupId>com.brovada.pom</groupId>
        <artifactId>brovada-pom</artifactId>
        <version>4.4.0-SNAPSHOT</version>
    </parent>
...
    <dependencyManagement>
        <dependencies>
            <!-- Logging includes -->
            <dependency>
                <groupId>com.brovada.pom</groupId>
                <artifactId>brovada-logging-pom</artifactId>
                <version>${version.brovadaone}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

with

mvn clean install

I encountered the following error:

[ERROR] Non-resolvable import POM: Could not find artifact com.brovada.pom:brovada-logging-pom:pom:4.4.0-SNAPSHOT in brovada.snapshot (http://maven.brovadasj.local:8080/archiva/repository/snapshots/) @ line 45, column 25
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project com.brovada.lib:brovada-commons:4.4.0-SNAPSHOT (C:DevEnv44-AllianzuserdevsrcBrovadaCoreLibrariesrovada-commons4.4.xpom.xml) has 1 error
[ERROR]     Non-resolvable import POM: Could not find artifact com.brovada.pom:brovada-logging-pom:pom:4.4.0-SNAPSHOT in brovada.snapshot (http://maven.brovadasj.local:8080/archiva/repository/snapshots/) @ line 45, column 25

So I tried building and installing brovada-logging-pom in my local maven repo. I got this error:

[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.brovada.pom:brovada-logging-pom:4.4.0-SNAPSHOT: Failure to find com.brovada.pom:brovada-pom:pom:4.4.0-SNAPSHOT in http://maven.brovadasj.local:8080/archiva/repo
sitory/snapshots/ was cached in the local repository, resolution will not be reattempted until the update interval of brovada.snapshot has elapsed or updates are forced and 'parent.relativePath' points
at wrong local POM @ line 8, column 13

Relevant parts of BrovadaPOMsranches4.4.xrovada-logging-pompom.xml :

    <parent>
        <groupId>com.brovada.pom</groupId>
        <artifactId>brovada-pom</artifactId>
        <version>4.4.0-SNAPSHOT</version>
    </parent>

    <artifactId>brovada-logging-pom</artifactId>
    <version>4.4.0-SNAPSHOT</version>
    <packaging>pom</packaging>

I tried:

mvn -U clean install

but got this error:

[FATAL] Non-resolvable parent POM for com.brovada.pom:brovada-logging-pom:4.4.0-SNAPSHOT: Could not find artifact com.brovada.pom:brovada-pom:pom:4.4.0-SNAPSHOT in brovada.snapshot (http://maven.brovada
sj.local:8080/archiva/repository/snapshots/) and 'parent.relativePath' points at wrong local POM @ line 8, column 13
 @
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project com.brovada.pom:brovada-logging-pom:4.4.0-SNAPSHOT (C:DevEnv44-AllianzuserdevsrcBrovadaPOMsranches4.4.xrovada-logging-pompom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for com.brovada.pom:brovada-logging-pom:4.4.0-SNAPSHOT: Could not find artifact com.brovada.pom:brovada-pom:pom:4.4.0-SNAPSHOT in brovada.snapshot (http://maven.bro
vadasj.local:8080/archiva/repository/snapshots/) and 'parent.relativePath' points at wrong local POM @ line 8, column 13 -> [Help 2]

btw, running mvn clean install correctly installs brovada-pom-4.4.0-SNAPSHOT.pom in my local repo.

Both brovada-logging-pom and brovada-pom are under directory BrovadaPOMsranches4.4.x

Directory Structure of Dependent Projects

Thanks for your help.

question from:https://stackoverflow.com/questions/65909195/non-resolvable-import-pom-could-not-find-artifact

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...