在Intellij idea里使用Maven导入spring-boot-maven-plugin解决一直downloading问题

依次clean,package后

"C:\Program Files\Java\jdk1.8.0_131\bin\java.exe" -Dmaven.multiModuleProjectDirectory=F:\ideacode\springboothelloworld -Dmaven.home=E:\maven-3.6.1\apache-maven-3.6.1 -Dclassworlds.conf=E:\maven-3.6.1\apache-maven-3.6.1\bin\m2.conf "-javaagent:E:\idea\IntelliJ IDEA 2018.1.4\lib\idea_rt.jar=61903:E:\idea\IntelliJ IDEA 2018.1.4\bin" -Dfile.encoding=UTF-8 -classpath E:\maven-3.6.1\apache-maven-3.6.1\boot\plexus-classworlds-2.6.0.jar org.codehaus.classworlds.Launcher -Didea.version=2018.1.4 -s E:\maven-3.6.1\apache-maven-3.6.1\conf\settings.xml package -f pom.xml
[ERROR] Error executing Maven.
[ERROR] 2 problems were encountered while building the effective settings
[FATAL] Non-parseable settings E:\maven-3.6.1\apache-maven-3.6.1\conf\settings.xml: in comment after two dashes (--) next character must be > not   (position: END_TAG seen ...</mirror>\n\n        <!-- ... @164:14)  @ E:\maven-3.6.1\apache-maven-3.6.1\conf\settings.xml, line 164, column 14
[FATAL] Non-parseable settings E:\maven-3.6.1\apache-maven-3.6.1\conf\settings.xml: in comment after two dashes (--) next character must be > not   (position: END_TAG seen ...</mirror>\n\n        <!-- ... @164:14)  @ E:\maven-3.6.1\apache-maven-3.6.1\conf\settings.xml, line 164, column 14


Process finished with exit code 1

对setting.xml的mirror进行修改,并更改默认配置

<mirrors>
        <mirror>
            <id>alimaven</id>
            <mirrorOf>central</mirrorOf>
            <name>aliyun maven</name>
            <url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
        </mirror>
        <mirror>
            <id>alimaven</id>
            <name>aliyun maven</name>
            <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
            <mirrorOf>central</mirrorOf>
        </mirror>
        <mirror>
            <id>central</id>
            <name>Maven Repository Switchboard</name>
            <url>http://repo1.maven.org/maven2/</url>
            <mirrorOf>central</mirrorOf>
        </mirror>
        <mirror>
            <id>repo2</id>
            <mirrorOf>central</mirrorOf>
            <name>Human Readable Name for this Mirror.</name>
            <url>http://repo2.maven.org/maven2/</url>
        </mirror>
        <mirror>
            <id>ibiblio</id>
            <mirrorOf>central</mirrorOf>
            <name>Human Readable Name for this Mirror.</name>
            <url>http://mirrors.ibiblio.org/pub/mirrors/maven2/</url>
        </mirror>
        <mirror>
            <id>jboss-public-repository-group</id>
            <mirrorOf>central</mirrorOf>
            <name>JBoss Public Repository Group</name>
            <url>http://repository.jboss.org/nexus/content/groups/public</url>
        </mirror>
        <mirror>
            <id>google-maven-central</id>
            <name>Google Maven Central</name>
            <url>https://maven-central.storage.googleapis.com
            </url>
            <mirrorOf>central</mirrorOf>
        </mirror>
        <!-- 中央仓库在中国的镜像 -->
        <mirror>
            <id>maven.net.cn</id>
            <name>oneof the central mirrors in china</name>
            <url>http://maven.net.cn/content/groups/public/</url>
            <mirrorOf>central</mirrorOf>
        </mirror>
    </mirrors>

"C:\Program Files\Java\jdk1.8.0_131\bin\java.exe" -Dmaven.multiModuleProjectDirectory=F:\ideacode\springboot01helloworld -Dmaven.home=E:\maven-3.6.1\apache-maven-3.6.1 -Dclassworlds.conf=E:\maven-3.6.1\apache-maven-3.6.1\bin\m2.conf "-javaagent:E:\idea\IntelliJ IDEA 2018.1.4\lib\idea_rt.jar=62513:E:\idea\IntelliJ IDEA 2018.1.4\bin" -Dfile.encoding=UTF-8 -classpath E:\maven-3.6.1\apache-maven-3.6.1\boot\plexus-classworlds-2.6.0.jar org.codehaus.classworlds.Launcher -Didea.version=2018.1.4 -s E:\maven-3.6.1\apache-maven-3.6.1\conf\settings.xml package -f pom.xml
[WARNING] 
[WARNING] Some problems were encountered while building the effective settings
[WARNING] expected START_TAG or END_TAG not TEXT (position: TEXT seen ...ion\n   |       variables for plugins in the POM.\n   |\n   |-->\n  <p... @222:5)  @ E:\maven-3.6.1\apache-maven-3.6.1\conf\settings.xml, line 222, column 5
[WARNING] expected START_TAG or END_TAG not TEXT (position: TEXT seen ...ion\n   |       variables for plugins in the POM.\n   |\n   |-->\n  <p... @222:5)  @ E:\maven-3.6.1\apache-maven-3.6.1\conf\settings.xml, line 222, column 5
[WARNING] 
[INFO] Scanning for projects...
[INFO] 
[INFO] ---------------< com.cnstrong:spring-boot-01-helloworld >---------------
[INFO] Building spring-boot-01-helloworld 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ spring-boot-01-helloworld ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] Copying 0 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ spring-boot-01-helloworld ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to F:\ideacode\springboot01helloworld\target\classes
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ spring-boot-01-helloworld ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory F:\ideacode\springboot01helloworld\src\test\resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ spring-boot-01-helloworld ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ spring-boot-01-helloworld ---
[INFO] No tests to run.
[INFO] 
[INFO] --- maven-jar-plugin:2.6:jar (default-jar) @ spring-boot-01-helloworld ---
[INFO] Building jar: F:\ideacode\springboot01helloworld\target\spring-boot-01-helloworld-1.0-SNAPSHOT.jar
[INFO] 
[INFO] --- spring-boot-maven-plugin:1.5.9.RELEASE:repackage (default) @ spring-boot-01-helloworld ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  4.441 s
[INFO] Finished at: 2019-08-26T17:32:23+08:00
[INFO] ------------------------------------------------------------------------

Process finished with exit code 0

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值