在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)