Maven Archetype
  1. Maven Archetype
  2. ARCHETYPE-202

Can't download archetype-catalog.xml via proxy connection

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0-alpha-2
    • Fix Version/s: 2.0
    • Component/s: Generator
    • Labels:
      None
    • Environment:
      Windows XP 2002 SP3, Maven version 2.0.9, Java 1.6.0_06, internet connection via proxy.
    • Number of attachments :
      1

      Description

      According "Your first Cocoon application using Maven 2" (http://cocoon.apache.org/2.2/1159_1_1.html) after execution:

      mvn archetype:generate -DarchetypeCatalog=http://cocoon.apache.org user should enter into dialog about selecting archetype but nothing happen. Error message:
      D:\MySolutions\java\cocoon\demo>mvn archetype:generate -DarchetypeCatalog=http://cocoon.apache.org
      [INFO] Scanning for projects...
      [INFO] Searching repository for plugin with prefix: 'archetype'.
      [INFO] ------------------------------------------------------------------------
      [INFO] Building Maven Default Project
      [INFO]    task-segment: [archetype:generate] (aggregator-style)
      [INFO] ------------------------------------------------------------------------
      [INFO] Preparing archetype:generate
      [INFO] No goals needed for project - skipping
      [INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
      [INFO] Setting property: velocimacro.messages.on => 'false'.
      [INFO] Setting property: resource.loader => 'classpath'.
      [INFO] Setting property: resource.manager.logwhenfound => 'false'.
      [INFO] [archetype:generate]
      [INFO] Generating project in Interactive mode
      [WARNING] Error reading archetype catalog http://cocoon.apache.org
      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.get(StreamWagon.java:68)
              at org.apache.maven.archetype.source.RemoteCatalogArchetypeDataSource.getArchetypeCatalog(RemoteCatalogArchetypeDataSource.java:74)
              at org.apache.maven.archetype.DefaultArchetype.getRemoteCatalog(DefaultArchetype.java:203)
              at org.apache.maven.archetype.ui.DefaultArchetypeSelector.getArchetypesByCatalog(DefaultArchetypeSelector.java:249)
              at org.apache.maven.archetype.ui.DefaultArchetypeSelector.selectArchetype(DefaultArchetypeSelector.java:74)
              at org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute(CreateProjectFromArchetypeMojo.java:180)
              at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:227)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
              at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
              at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
              at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
              at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
              at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
              at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      Caused by: java.net.NoRouteToHostException: No route to host: connect
              at java.net.PlainSocketImpl.socketConnect(Native Method)
              at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
              at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
              at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
              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.http.HttpClient.New(HttpClient.java:323)
              at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:788)
              at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:729)
              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)
              ... 24 more
      [INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
      Choose archetype:
      Choose a number: : Choose archetype:
      Choose a number: : &#1047;&#1072;&#1074;&#1077;&#1088;&#1096;&#1080;&#1090;&#1100; &#1074;&#1099;&#1087;&#1086;&#1083;&#1085;&#1077;&#1085;&#1080;&#1077; &#1087;&#1072;&#1082;&#1077;&#1090;&#1085;&#1086;&#1075;&#1086; &#1092;&#1072;&#1081;&#1083;&#1072; [Y(&#1076;&#1072;)/N(&#1085;&#1077;&#1090;)]? ^C
      
      D:\MySolutions\java\cocoon\demo>mvn --version
      Maven version: 2.0.9
      Java version: 1.6.0_06
      OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
      
      D:\MySolutions\java\cocoon\demo>
      

      It's look like no proxy using for downloading catalog file from cocoon site.

        Activity

        Hide
        Clemens Benden added a comment -

        $ ..\..\maven\bin\mvn --version
        Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
        Java version: 1.6.0_21
        Java home: C:\Program Files\Java\jdk1.6.0_21\jre
        Default locale: de_DE, platform encoding: Cp1252
        OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"

        This problem still exists.

        The workaround from Heath Raftery still works:

        1. download archetype-catalog.xml from http://repo1.maven.org/maven2 with a webbrowser (save link as...)
        2. move file to your local .m2 folder
        3. Use mvn archetype:generate -DarchetypeCatalog=local instead.

            • CAN ANYBODY PLEASE FIX THIS?
              ***

        Please make the workaround more visible in the meantime.

        Google tags:
        Unable to update index for central
        Updating index central
        Unable to download Repository
        maven bug not fixed
        maven proxy firewall
        maven proxy firewall workaround
        maven proxy firewall corporate

        Show
        Clemens Benden added a comment - $ ..\..\maven\bin\mvn --version Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200) Java version: 1.6.0_21 Java home: C:\Program Files\Java\jdk1.6.0_21\jre Default locale: de_DE, platform encoding: Cp1252 OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows" This problem still exists. The workaround from Heath Raftery still works: 1. download archetype-catalog.xml from http://repo1.maven.org/maven2 with a webbrowser (save link as...) 2. move file to your local .m2 folder 3. Use mvn archetype:generate -DarchetypeCatalog=local instead. CAN ANYBODY PLEASE FIX THIS? *** Please make the workaround more visible in the meantime. Google tags: Unable to update index for central Updating index central Unable to download Repository maven bug not fixed maven proxy firewall maven proxy firewall workaround maven proxy firewall corporate
        Hide
        Herve Boutemy added a comment - - edited

        I don't understand: did you try a 2.0-alpha-6-SNAPSHOT after the fix in r952423 and found that it doesn't work?
        or did you try without precise version information, then got a release that we know has the bug (no surprise)?

        In fact, I applied the patch since it looked consistent but didn't really test it (and didn't write an integration test): having some feedback confirming the new snapshot is ok would help

        Show
        Herve Boutemy added a comment - - edited I don't understand: did you try a 2.0-alpha-6-SNAPSHOT after the fix in r952423 and found that it doesn't work? or did you try without precise version information, then got a release that we know has the bug (no surprise)? In fact, I applied the patch since it looked consistent but didn't really test it (and didn't write an integration test): having some feedback confirming the new snapshot is ok would help
        Hide
        Herve Boutemy added a comment -
        Show
        Herve Boutemy added a comment - real user test is ok: http://maven.40175.n5.nabble.com/Archetype-plugin-2-0-alpha-6-release-tp2807769p2837741.html thanks to the reporter
        Hide
        Charles added a comment - - edited

        Herve Boutemy said :
        thanks for the patch: applied in r952423
        don't forget to use a repository manager in Corporate environment

        I need this release IN M2ECLIPSE plugin to work well.
        How can I obtain this ?

        Thx a lot.

        Chris

        Show
        Charles added a comment - - edited Herve Boutemy said : thanks for the patch: applied in r952423 don't forget to use a repository manager in Corporate environment I need this release IN M2ECLIPSE plugin to work well. How can I obtain this ? Thx a lot. Chris
        Hide
        Herve Boutemy added a comment -

        m2e is done at Eclipse now: see http://www.eclipse.org/m2e/ to use their issue tracking

        Show
        Herve Boutemy added a comment - m2e is done at Eclipse now: see http://www.eclipse.org/m2e/ to use their issue tracking

          People

          • Assignee:
            Herve Boutemy
            Reporter:
            Leonid E. Egorov
          • Votes:
            14 Vote for this issue
            Watchers:
            13 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: