IDEA通过Maven创建项目一直卡在Running C:\Users\Administrator\AppData\Local\Temp\archetypetmp

一、问题描述

 

出现这种问题的原因很大一部分是由于网络导致的。

 

二、解决方法

 

首先需要看下maven中的配置文件中的私服地址是否改为国内的

    <mirrors>
        <!-- 阿里云仓库 -->
        <mirror>
            <id>alimaven</id>
            <mirrorOf>central</mirrorOf>
            <name>aliyun maven</name>
            <url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
        </mirror>
    
        <!-- *仓库1 -->
        <mirror>
            <id>repo1</id>
            <mirrorOf>central</mirrorOf>
            <name>Human Readable Name for this Mirror.</name>
            <url>http://repo1.maven.org/maven2/</url>
        </mirror>
    
        <!-- *仓库2 -->
        <mirror>
            <id>repo2</id>
            <mirrorOf>central</mirrorOf>
            <name>Human Readable Name for this Mirror.</name>
            <url>http://repo2.maven.org/maven2/</url>
        </mirror>
    </mirrors> 

然后在启动IDEA时,修改配置

IDEA通过Maven创建项目一直卡在Running C:\Users\Administrator\AppData\Local\Temp\archetypetmp

修改vm options为-DarchetypeCatalog=local

IDEA通过Maven创建项目一直卡在Running C:\Users\Administrator\AppData\Local\Temp\archetypetmp

这样就可以了。。。