Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-3628

When running offline, snapshot artifcats cannot be resolved even if they have previously be dowloaded from a repository

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.0.8
    • None
    • None
    • None

    Description

      When running offline, snapshot artifcats cannot be resolved even if they have previously be dowloaded from a repository. This happens when attempting to depend on a snapshot version of a module downloaded from a repository. If the snapshot version of the module is built and installed locally, the problem goes away.

      I will attach two projects (in a tar file) that have minimal external dependencies, and the debug output of trying to build. Here are the steps to reproduce:

      Environment:
      Maven 2.0.8
      Linux 2.6.18
      Artifactory 1.2.5 (rev. 1154)
      (this has also been reproduced by a colleague on a Windows machine).

      Preliminary steps:
      1) Modify the pom files to refer to your actual repository instead of http://localhost:8081/artifactory/jumptap-snapshots
      2) Build maven-test-project1
      3) Upload the pom and jar for maven-test-project1 to your repository.

      Steps that cause the error to happen:
      1) Delete maven-test-project1 from the local repository.
      2) Build maven-test-project2 without the offline flag (mvn install). This build is successful (and downloads maven-test-project1 to the local repository).
      3) Build maven-test-project2 with the offline flag (mvn -o install). This build fails, unable to resolve the maven-test-project1 artifact.

      Steps that cause the error not to happen
      1) Build maven-test-project1 locally. This build is successful.
      2) Build maven-test-project2 without the offline flag (mvn install). This build is successful.
      3) Build maven-test-project2 with the offline flag (mvn -o install). This build is successful.

      Attachments

        Issue Links

          Activity

            People

              bentmann Benjamin Bentmann
              happyharris Marc Harris
              Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: