문제

I have a multi-module project in maven and I created a main sub-module(which means that this sub-module has the main class). I add the other sub-modules into the main the sub-module(which is Submodule-0) as dependencies:

<dependencies>

    <dependency>
        <groupId>ProjectGroupId</groupId>
        <artifactId>Submodule-1</artifactId>
        <version>${project.version}</version>
    </dependency>

    <dependency>
        <groupId>ProjectGroupId</groupId>
        <artifactId>Submodule-2</artifactId>
        <version>${project.version}</version>
    </dependency>

    <dependency>
        <groupId>ProjectGroupId</groupId>
        <artifactId>Submodule-3</artifactId>
        <version>${project.version}</version>
    </dependency>

</dependencies>

I have Artifactory in my LAN and my maven settings.xml is configured to connect into the local Artifactory. In the PC where I installed the Artifactory this setup works fine but when I ran the setup in another computer(my laptop) it can't find the sub-modules libraries but I can see it in the Dependencies section of the project using Netbeans.

The Error Generated is:

[ERROR] Failed to execute goal on project Submodule-0: Could not resolve dependencies for project ProjectGroupId:Submodule-0:jar:0.0.1: Failed to collect dependencies at ProjectGroupId:Submodule-1:jar:0.0.1: Failed to read artifact descriptor for ProjectGroupId:Submodule-1:jar:0.0.1: Failure to find ProjectGroupId:MultiModule:pom:0.0.1 in http://192.168.10.136:8081/artifactory/libs-release was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]

I hope you guys can help and if this is a duplicate question hope you guys can lead me in the right path.

도움이 되었습니까?

해결책

Try to run a maven build with the goal "deploy" on the machine with Artifactory installed. With that the artifacts are uploaded to the Artifactory's repository and will be available for remote access.

Once you have a stable version you may want to take a look into the maven-release-stuff http://maven.apache.org/maven-release/maven-release-plugin/index.html

EDIT: Did you copy the settings.xml to the other machine?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top