maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Scholte (JIRA)" <>
Subject [jira] [Closed] (ARCHETYPE-572) Archetype Repository not set early enough
Date Fri, 26 Jul 2019 15:53:00 GMT


Robert Scholte closed ARCHETYPE-572.
    Resolution: Not A Problem
      Assignee: Robert Scholte

If you think documentation can be improved, please go the page you want to improve. There
should be an edit icon left in the navigation bar, which brings you to the right page at Github.
This you you can easily create a PR.

> Archetype Repository not set early enough
> -----------------------------------------
>                 Key: ARCHETYPE-572
>                 URL:
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Plugin
>    Affects Versions: 3.0.0, 3.0.1, 3.1.0, 3.1.1
>            Reporter: Thomas Repnik
>            Assignee: Robert Scholte
>            Priority: Major
> As of archetype 3.0 it is not possible anymore to specify the repository via the command
line (with {{_-DarchetypeRepository_}}). But there is an option with specifiying a special
"archetype" repository in settings.xml.
> After migrating from 2.4 to 3.x we found out that the whole archetype process takes minutes
instead of seconds! The reason for that is, that 3.x always tries to download the whole archetype-catalog.xml
from our public repository.
> It seems the following Code in archetype 3.x is buggy:
> {code:java}
> //FILE:
> if ( definition.isDefined() && StringUtils.isNotEmpty( request.getArchetypeRepository()
) )
> {
>      //There is no way this lines ever get called
>      getLogger().info( "Archetype defined by properties" );
>      return;
> }
> //This method call is very expensive. It can take minutes.
> Map<String, List<Archetype>> archetypes = getArchetypesByCatalog( request.getProjectBuildingRequest(),
catalogs );
> ...
> {code}
> _request.getArchetypeRepository()_ is always NULL, because in archetype 3.x the property
was removed and the archetype repository (in settings.xml) will be set much later.
> Therefore the expensive lookup _getArchetypesByCatalog_ can not be prevented.
> Due to this archetype 3.x is unusable now because every usage will take minutes in our

This message was sent by Atlassian JIRA

View raw message