Search code examples
mavenmaven-2nexus

Tests fail with unresolved dependencies error


When I run mvn clean test I get this error:

[ERROR] Failed to execute goal on project prices-snapshot: Could not resolve dependencies for project com.me.cd:prices-snapshot:jar:0.0.1-SNAPSHOT: The following artifacts could not be resolved: com.me.dp.te:te-client:jar:1.1.3.3, me-secure:me-secure:pom:1.1.2, com.me.as.logging:secure-logging:jar:0.6.1: Failure to find com.me.dp.te:te-client:jar:1.1.3.3 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 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

My pom has the following repo configuration:

<repository>
    <id>UnmanagedReleases</id>
        <url>https://nexus:8443/nexus/content/repositories/unmanaged_releases/</url>
    </repository>
<snapshotRepository>
    <!--    <id>Snapshots</id>-->
    <!--    <url>https://nexus:8443/nexus/content/repositories/snapshots/</url>-->
    <!--<uniqueVersion>false</uniqueVersion> -->
    <id>UnmanagedSnapshots</id>
    <url>https://nexus:8443/nexus/content/repositories/unmanaged_snapshots/</url>
</snapshotRepository>

The jars are in the repo. I can't see them at https://repo.maven.apache.org/maven2. I'm not sure what's wrong. Is it possible that when I run the command it looks in an incorrect repo or could there be a possible permissions issue when I run the command?


Solution

  • I didn't have permissions to the particular dependencies. Once I was granted them I could run my test.