Unable to get complete maven archetype list

前端 未结 1 1027
滥情空心
滥情空心 2021-01-19 14:29

I\'m trying generate a Maven project using archetype:generate but I only get a small list of archetypes:

1: internal -> org.apache.maven.arch         


        
相关标签:
1条回答
  • 2021-01-19 15:19

    UPDATE: the problem with Maven Central has been fixed and the temporary work-around provided is this answer is no longer necessary.


    It seems there is an on-going problem with the Maven Central catalog. The file http://repo1.maven.apache.org/maven2/archetype-catalog.xml is currently empty.

    maven-archetype-plugin normally downloads this file and extract all the defined archetypes, which results in, as you experienced in the past, thousands of archetypes. Since Maven Central catalog is empty, the plugin is defaulting to its internal archetypes (and you can see what they are in the source code and notice there is only 10 of them, the result you are getting).

    I reached out at the Maven mailing-list and am currently waiting for a response.

    As a temporary workaround, you can define the following mirror of Maven Central in your settings.xml:

    <mirrors>
        <mirror>
            <id>ibiblio</id>
            <url>http://mirrors.ibiblio.org/pub/mirrors/maven2</url>
            <mirrorOf>central</mirrorOf>
        </mirror>
    </mirrors>
    
    0 讨论(0)
提交回复
热议问题