Maven
  1. Maven
  2. MNG-2433

Maven looks for snapshots in offline mode

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Duplicate
    • Affects Version/s: 2.0.5
    • Fix Version/s: None
    • Component/s: Dependencies
    • Labels:
      None
    • Complexity:
      Intermediate
    • Number of attachments :
      0

      Description

      It seems that sometimes Maven2 is looking for snapshots in offline mode (this happens for example in the Cocoon project). here is an output that might help:
      :\dev\workspace\cocoon-2.2\core\cocoon-webapp>mvn -o -Dmaven.test.skip=true coc
      oon:deploy
      [INFO]
      NOTE: Maven is executing in offline mode. Any artifacts not already in your loca
      l
      repository will be inaccessible.

      [INFO] Scanning for projects...
      [INFO] Searching repository for plugin with prefix: 'cocoon'.
      [INFO] org.apache.maven.plugins: checking for updates from snapshots
      [INFO] org.apache.maven.plugins: checking for updates from mortbay-repo
      [INFO] org.codehaus.mojo: checking for updates from snapshots
      [INFO] org.codehaus.mojo: checking for updates from mortbay-repo
      [INFO] snapshot org.apache.cocoon:cocoon-deployer-plugin:1.0.0-SNAPSHOT: checkin
      g for updates from snapshots
      [INFO] snapshot org.apache.cocoon:cocoon-deployer-plugin:1.0.0-SNAPSHOT: checkin
      g for updates from mortbay-repo
      [INFO] snapshot org.apache.cocoon:cocoon-deployer-plugin:1.0.0-SNAPSHOT: checkin
      g for updates from central
      [INFO] snapshot org.apache.cocoon:cocoon-deployer-plugin:1.0.0-SNAPSHOT: checkin
      g for updates from apache.snapshot
      [INFO] snapshot org.apache.cocoon:cocoon-deployer-plugin:1.0.0-SNAPSHOT: checkin
      g for updates from apache-cvs
      [INFO] snapshot org.apache.cocoon:cocoon-deployer-plugin:1.0.0-SNAPSHOT: checkin
      g for updates from apache.snapshots
      [INFO] snapshot org.apache.cocoon:cocoon-deployer:1-SNAPSHOT: checking for updat
      es from snapshots
      [INFO] snapshot org.apache.cocoon:cocoon-deployer:1-SNAPSHOT: checking for updat
      es from mortbay-repo
      [INFO] snapshot org.apache.cocoon:cocoon-deployer:1-SNAPSHOT: checking for updat
      es from central
      [INFO] snapshot org.apache.cocoon:cocoon-deployer:1-SNAPSHOT: checking for updat
      es from apache.snapshot
      [INFO] snapshot org.apache.cocoon:cocoon-deployer:1-SNAPSHOT: checking for updat
      es from apache-cvs
      [INFO] snapshot org.apache.cocoon:cocoon-deployer:1-SNAPSHOT: checking for updat
      es from apache.snapshots
      [INFO] snapshot org.apache.cocoon:cocoon-tools-modules:1-SNAPSHOT: checking for
      updates from snapshots
      [INFO] snapshot org.apache.cocoon:cocoon-tools-modules:1-SNAPSHOT: checking for
      updates from mortbay-repo
      [INFO] snapshot org.apache.cocoon:cocoon-tools-modules:1-SNAPSHOT: checking for
      updates from central
      [INFO] snapshot org.apache.cocoon:cocoon-tools-modules:1-SNAPSHOT: checking for
      updates from apache.snapshot
      [INFO] snapshot org.apache.cocoon:cocoon-tools-modules:1-SNAPSHOT: checking for
      updates from apache-cvs
      [INFO] snapshot org.apache.cocoon:cocoon-tools-modules:1-SNAPSHOT: checking for
      updates from apache.snapshots
      [INFO] snapshot org.apache.cocoon:cocoon:1-SNAPSHOT: checking for updates from s
      napshots
      [INFO] snapshot org.apache.cocoon:cocoon:1-SNAPSHOT: checking for updates from m
      ortbay-repo
      [INFO] snapshot org.apache.cocoon:cocoon:1-SNAPSHOT: checking for updates from c
      entral
      [INFO] snapshot org.apache.cocoon:cocoon:1-SNAPSHOT: checking for updates from a
      pache.snapshot
      [INFO] snapshot org.apache.cocoon:cocoon:1-SNAPSHOT: checking for updates from a
      pache-cvs
      [INFO] snapshot org.apache.cocoon:cocoon:1-SNAPSHOT: checking for updates from a
      pache.snapshots

        Issue Links

          Activity

          Hide
          Alphonse Bendt added a comment -

          we're also seeing the problem with maven 2.0.9. so please re-open the issue!
          Note we're using a company wide maven repository (artifactory)

          $ mvn --version
          Maven version: 2.0.9
          Java version: 1.5.0_13
          OS name: "mac os x" version: "10.5.2" arch: "i386" Family: "unix"

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

          [INFO] Scanning for projects...
          [INFO] ------------------------------------------------------------------------
          [INFO] Building Embedded JBoss Tests
          [INFO] task-segment: [test]
          [INFO] ------------------------------------------------------------------------
          [INFO] [resources:resources]
          [INFO] Using default encoding to copy filtered resources.
          [INFO] [compiler:compile]
          [INFO] Nothing to compile - all classes are up to date
          [INFO] [resources:testResources]
          [INFO] Using default encoding to copy filtered resources.
          [INFO] ------------------------------------------------------------------------
          [ERROR] BUILD ERROR
          [INFO] ------------------------------------------------------------------------
          [INFO] Failed to resolve artifact.

          Missing:
          ----------
          1) org.jboss.embedded:jboss-embedded:jar:beta3-SNAPSHOT

          Try downloading the file manually from the project website.

          Then, install it using the command:
          mvn install:install-file -DgroupId=org.jboss.embedded -DartifactId=jboss-embedded -Dversion=beta3-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file

          Alternatively, if you host your own repository you can deploy the file there:
          mvn deploy:deploy-file -DgroupId=org.jboss.embedded -DartifactId=jboss-embedded -Dversion=beta3-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

          Path to dependency:
          1) akquinet:embedded-tests:jar:1.7-SNAPSHOT
          2) org.jboss.embedded:jboss-embedded-all:jar:beta3
          3) org.jboss.embedded:jboss-embedded:jar:beta3-SNAPSHOT

          ----------
          1 required artifact is missing.

          for artifact:
          akquinet:embedded-tests:jar:1.7-SNAPSHOT

          from the specified remote repositories:
          akquinet (http://192.168.1.1:8080/artifactory/akquinet),
          akquinet.snapshots (http://192.168.1.1:8080/artifactory/libs-snapshots)

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

          [INFO] ------------------------------------------------------------------------
          [INFO] For more information, run Maven with the -e switch
          [INFO] ------------------------------------------------------------------------
          [INFO] Total time: 2 seconds
          [INFO] Finished at: Wed May 28 10:13:47 CEST 2008
          [INFO] Final Memory: 7M/13M
          [INFO] ------------------------------------------------------------------------

          the artifact maven complains about
          seems to be existing in the local repository:

          $ ls ~/.m2/repository/org/jboss/embedded/jboss-embedded/beta3-SNAPSHOT/
          jboss-embedded-beta3-SNAPSHOT.jar
          jboss-embedded-beta3-SNAPSHOT.pom.sha1
          maven-metadata-repository.jboss.org.xml
          jboss-embedded-beta3-SNAPSHOT.jar.sha1
          maven-metadata-cellactive.snapshots.xml
          maven-metadata-snapshots.jboss.org.xml
          jboss-embedded-beta3-SNAPSHOT.pom
          maven-metadata-cellactive.snapshots.xml.sha1
          maven-metadata-snapshots.jboss.org.xml.sha1

          Show
          Alphonse Bendt added a comment - we're also seeing the problem with maven 2.0.9. so please re-open the issue! Note we're using a company wide maven repository (artifactory) $ mvn --version Maven version: 2.0.9 Java version: 1.5.0_13 OS name: "mac os x" version: "10.5.2" arch: "i386" Family: "unix" $ mvn -o test [INFO] NOTE: Maven is executing in offline mode. Any artifacts not already in your local repository will be inaccessible. [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building Embedded JBoss Tests [INFO] task-segment: [test] [INFO] ------------------------------------------------------------------------ [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:compile] [INFO] Nothing to compile - all classes are up to date [INFO] [resources:testResources] [INFO] Using default encoding to copy filtered resources. [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Failed to resolve artifact. Missing: ---------- 1) org.jboss.embedded:jboss-embedded:jar:beta3-SNAPSHOT Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=org.jboss.embedded -DartifactId=jboss-embedded -Dversion=beta3-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=org.jboss.embedded -DartifactId=jboss-embedded -Dversion=beta3-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl= [url] -DrepositoryId= [id] Path to dependency: 1) akquinet:embedded-tests:jar:1.7-SNAPSHOT 2) org.jboss.embedded:jboss-embedded-all:jar:beta3 3) org.jboss.embedded:jboss-embedded:jar:beta3-SNAPSHOT ---------- 1 required artifact is missing. for artifact: akquinet:embedded-tests:jar:1.7-SNAPSHOT from the specified remote repositories: akquinet ( http://192.168.1.1:8080/artifactory/akquinet ), akquinet.snapshots ( http://192.168.1.1:8080/artifactory/libs-snapshots ) NOTE: Maven is executing in offline mode. Any artifacts not already in your local repository will be inaccessible. [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2 seconds [INFO] Finished at: Wed May 28 10:13:47 CEST 2008 [INFO] Final Memory: 7M/13M [INFO] ------------------------------------------------------------------------ the artifact maven complains about seems to be existing in the local repository: $ ls ~/.m2/repository/org/jboss/embedded/jboss-embedded/beta3-SNAPSHOT/ jboss-embedded-beta3-SNAPSHOT.jar jboss-embedded-beta3-SNAPSHOT.pom.sha1 maven-metadata-repository.jboss.org.xml jboss-embedded-beta3-SNAPSHOT.jar.sha1 maven-metadata-cellactive.snapshots.xml maven-metadata-snapshots.jboss.org.xml jboss-embedded-beta3-SNAPSHOT.pom maven-metadata-cellactive.snapshots.xml.sha1 maven-metadata-snapshots.jboss.org.xml.sha1
          Hide
          Jose M Beas added a comment -

          We have the same problem here. We are migrating from an old environment (with direct connection to the central repositories) to a new one that uses artifactory to proxy all the repositories. We were using Maven 2.0.7 in the old environment and Maven 2.0.8 in the new one. By the way, all the default plugins appear in:

          http://svn.apache.org/viewvc/maven/components/tags/maven-2.0.9/maven-project/src/main/resources/org/apache/maven/project/pom-4.0.0.xml?view=markup

          but not in

          http://svn.apache.org/viewvc/maven/components/tags/maven-2.0.8/maven-project/src/main/resources/org/apache/maven/project/pom-4.0.0.xml?view=markup

          Please, reopen the bug.

          Best regards,
          JMB

          Show
          Jose M Beas added a comment - We have the same problem here. We are migrating from an old environment (with direct connection to the central repositories) to a new one that uses artifactory to proxy all the repositories. We were using Maven 2.0.7 in the old environment and Maven 2.0.8 in the new one. By the way, all the default plugins appear in: http://svn.apache.org/viewvc/maven/components/tags/maven-2.0.9/maven-project/src/main/resources/org/apache/maven/project/pom-4.0.0.xml?view=markup but not in http://svn.apache.org/viewvc/maven/components/tags/maven-2.0.8/maven-project/src/main/resources/org/apache/maven/project/pom-4.0.0.xml?view=markup Please, reopen the bug. Best regards, JMB
          Hide
          Philip Wu added a comment -

          I have maven version 2.0.9 and I am having the same issue.

          doing "mvn install -Dmaven.test.skip" works fine, but when I use
          "mvn install -Dmaven.test.skip -o" (the offline mode) it doesn't work and I double checked that the jar is in my local repo!
          It's painfully slow to do a build trying to download all the dependencies and POM files everytime!

          Show
          Philip Wu added a comment - I have maven version 2.0.9 and I am having the same issue. doing "mvn install -Dmaven.test.skip" works fine, but when I use "mvn install -Dmaven.test.skip -o" (the offline mode) it doesn't work and I double checked that the jar is in my local repo! It's painfully slow to do a build trying to download all the dependencies and POM files everytime!
          Hide
          Benjamin Francisoud added a comment - - edited

          I have the same issue with apache rampart and it's related to some invalid version describe in the pom.xml (https://issues.apache.org/jira/browse/RAMPART-195)

          Might be the same problem here.

          as a side note: I don't think maven handle this kind of situation gracefully

          Show
          Benjamin Francisoud added a comment - - edited I have the same issue with apache rampart and it's related to some invalid version describe in the pom.xml ( https://issues.apache.org/jira/browse/RAMPART-195 ) Might be the same problem here. as a side note: I don't think maven handle this kind of situation gracefully
          Hide
          Benjamin Bentmann added a comment -

          IT for MNG-3314 confirms issue was still existent.

          Show
          Benjamin Bentmann added a comment - IT for MNG-3314 confirms issue was still existent.

            People

            • Assignee:
              Benjamin Bentmann
              Reporter:
              Carsten Ziegeler
            • Votes:
              6 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: