Kevin Nammour
Kevin Nammour

Reputation: 29

Maven is unable to download a dependency's pom file

I have a legacy maven project that has the following plugin section:

 <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-dependency-plugin</artifactId>
    <configuration>
        <artifactItems>
            <artifactItem>
                <groupId>io.pivotal.gemfire</groupId>
                <artifactId>gemfire</artifactId>
                <version>${gemfire.version}</version>
                <type>tgz</type>
                <outputDirectory>${gemfire.temp.dir}</outputDirectory>
            </artifactItem>
        </artifactItems>
    </configuration>
    <executions>
        ...
    </executions>
</plugin>

When I build it the first time, it throws a small warning:

[WARNING] The POM for io.pivotal.gemfire:gemfire:pom:9.10.15 is missing, no dependency information available

This is expected as we are not storing a pom for that dependency inside our nexus repo. But the build passes. If I block internet access in the container, and I run it consecutively multiple times, the build passes (because all dependencies are locally) and the warning persists.

However, If I run it a bit later like 5-6 hours later inside the same container with blocked internet access, if fails with this error.

[ERROR] Could not resolve artifact io.pivotal.gemfire:gemfire:pom:9.10.15

Why is it passing if I run it directly after the online build. But it fails if I run it after 5 to 6 hours from the online build?

Note: If I use -o (offline mode), this issue is resolved but it introduces other problems with deploy goals.

Upvotes: 0

Views: 19

Answers (0)

Related Questions