Maven
  1. Maven
  2. MNG-3295

Cannot use offline (-o) if a <parent> is declared

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.0.7
    • Fix Version/s: 2.0.9
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Create a simple project:

      mvn archetype:create -DgroupId=test -DartifactId=offline_parent_test -DarchetypeArtifactId=maven-archetype-quickstart

      edit the pom.xml and add a parent entry that you know exists in your local repository, e.g.

      <parent>
      <groupId>com.test</groupId>
      <artifactId>MyParent</artifactId>
      <version>1.0-SNAPSHOT</version>
      </parent>

      run

      mvn -o install

      produces the following error:

      [INFO]
      NOTE: Maven is executing in offline mode. Any artifacts not already in your local
      repository will be inaccessible.

      [INFO] Scanning for projects...
      [INFO] snapshot com.test:MyParent:1.0-SNAPSHOT: checking for updates from maven.catlin.com.repo.snapshots
      [INFO] ------------------------------------------------------------------------
      [ERROR] FATAL ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Failed to resolve artifact.

      GroupId: com.test
      ArtifactId: MyParent
      Version: 1.0-SNAPSHOT

      Reason: System is offline.

      com.test:MyParent:pom:1.0-SNAPSHOT

      NOTE: Maven is executing in offline mode. Any artifacts not already in your local
      repository will be inaccessible.

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Matt Read
          • Votes:
            6 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: