zDev - M2E - OSS
  1. zDev - M2E - OSS
  2. MNGECLIPSE-948

Cannot create project from archetype when offline

    Details

    • Global Rank:
      13679

      Description

      When disconnected from internet, you can't create a new project from any archetypes, although they exist in the local repository.

      [ERROR] The desired archetype does not exist (org.apache.maven.archetypes:maven-archetype-quickstart:1.0) The desired archetype does not exist (org.apache.maven.archetypes:maven-archetype-quickstart:1.0)

      Checking "offline" in maven preferences has no effect.

      Eclipse log indicates the problem is in org.apache.maven.archetype :

      org.apache.maven.archetype.downloader.DownloadException: Error downloading.
      at org.apache.maven.archetype.downloader.DefaultDownloader.download(DefaultDownloader.java:58)
      at org.apache.maven.archetype.common.DefaultArchetypeArtifactManager.exists(DefaultArchetypeArtifactManager.java:310)
      at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype(DefaultArchetypeGenerator.java:107)
      at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype(DefaultArchetypeGenerator.java:290)
      at org.apache.maven.archetype.DefaultArchetype.generateProjectFromArchetype(DefaultArchetype.java:75)
      at org.maven.ide.eclipse.internal.project.ProjectConfigurationManager.createArchetypeProject(ProjectConfigurationManager.java:427)
      at org.maven.ide.eclipse.wizards.MavenProjectWizard$5.runInWorkspace(MavenProjectWizard.java:280)
      at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
      Caused by: org.apache.maven.artifact.resolver.ArtifactResolutionException: Error transferring file
      org.apache.maven.archetypes:maven-archetype-quickstart:jar:1.0

      from the specified remote repositories:
      maven-archetype-quickstart-repo (http://repo1.maven.org/maven2/)

      at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:213)
      at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveAlways(DefaultArtifactResolver.java:95)
      at org.apache.maven.archetype.downloader.DefaultDownloader.download(DefaultDownloader.java:54)
      ... 8 more
      Caused by: org.apache.maven.wagon.TransferFailedException: Error transferring file
      at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData(LightweightHttpWagon.java:104)
      at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:94)
      at org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(DefaultWagonManager.java:512)
      at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:418)
      at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:186)
      ... 10 more
      Caused by: java.net.UnknownHostException: repo1.maven.org
      at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
      at java.net.Socket.connect(Socket.java:519)
      at java.net.Socket.connect(Socket.java:469)
      at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
      at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
      at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
      at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)
      at sun.net.www.http.HttpClient.New(HttpClient.java:306)
      at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:795)
      at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:743)
      at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:654)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:977)
      at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData(LightweightHttpWagon.java:83)
      ... 14 more

      Actually this is due to a bug in archetype-common-2.0-alpha-2.jar (ARCHETYPE-169).
      It's resolved when upgrading to archetype-common-2.0-alpha-4.jar.

      If it's ok with you, I can publish the new jar in org.maven.ide.components.archetype-common.

      regards,

      Fred Bricon

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Fred Bricon
              Reporter:
              Fred Bricon
              Last Updated By:
              Brian Fox
            • Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response:

                Time Tracking

                Estimated:
                Original Estimate - 0.5h
                0.5h
                Remaining:
                Remaining Estimate - 0.5h
                0.5h
                Logged:
                Time Spent - Not Specified
                Not Specified