[ 
https://issues.apache.org/jira/browse/ARCHETYPE-539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17227010#comment-17227010
 ] 

Jesse Glick commented on ARCHETYPE-539:
---------------------------------------

This is particular painful when a Nexus mirror is configured; for some reason 
seems to be much slower, taking ~2m to generate one project from archetype.

I would think that if the GAV are all defined, then this should work offline; 
and if the GA are defined, and {{version}} is set to {{LATEST}} or {{RELEASE}}, 
then it should merely need to download {{maven-metadata.xml}} for that GA. The 
full catalog should only be necessary if you are running in interactive mode 
and browsing available archetypes.

> Maven archetype:generate hangs on retrieval of archetype-catalog.xml even on 
> offline mode
> -----------------------------------------------------------------------------------------
>
>                 Key: ARCHETYPE-539
>                 URL: https://issues.apache.org/jira/browse/ARCHETYPE-539
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Generator
>    Affects Versions: 3.0.1
>         Environment: macOS High Sierra v10.13.1
> java version "1.8.0_121"
> Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
> Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
> Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 
> 2017-10-18T15:58:13+08:00)
> Maven home: /opt/maven/active
> Java version: 1.8.0_121, vendor: Oracle Corporation
> Java home: 
> /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "mac os x", version: "10.13.1", arch: "x86_64", family: "mac"
>            Reporter: Franz Allan Valencia See
>            Priority: Major
>         Attachments: build.log
>
>
> *Steps to reproduce* 
> 1.a Have slow connection 
> 1.b.Alternatively, simulate slow connection with 
> [crapify|https://www.npmjs.com/package/crapify]
> 1.b.1. Install crapify - {{npm install crapify -g}}
> 1.b.2. Run crapify - {{crapify --port=5000 --speed=1 start}}
> 1.b.3. Configure {{~/.m2/settings.xml}} to use crapify
> {code:xml}
> <settings>
> ...
>    <proxies>
>        <proxy>
>            <id>crapify-proxy</id>
>            <active>true</active>
>            <protocol>http</protocol>
>            <host>localhost</host>
>            <port>5000</port>
>        </proxy>
>     </proxies>
> ...
> </settings>{code}
>  
> 2. Execute 
> {code:bash}
> $ mvn archetype:generate -DgroupId=com.example -DartifactId=example 
> -Dversion=1.0-SNAPSHOT -o
> {code}
>   
> *Expected Behaviour:*
> The list of available archetypes would be shown to the user. 
> _Note: I believe in older versions, only the basic archetypes are shown like 
> quickstart_
>  
> *Actual Behaviour:*
> Maven command hangs in this last last line:
> {code:bash}
> [DEBUG] Searching for remote catalog: 
> https://repo.maven.apache.org/maven2/archetype-catalog.xml
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to