依次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

GitHub 加速计划 / ma / maven
25
0
下载
Maven: Apache Maven是一个开源的项目管理和构建工具,主要用于Java项目。适合需要自动化项目构建和依赖管理的开发者。特点包括约定优于配置、易于使用和社区驱动。
最近提交(Master分支:3 个月前 )
b99eac72 * Copy edits 21 小时前
a2ee8f8b The UT runs for 60 sec that is unacceptable. This fix returns its runtime to 10+ sec. 21 小时前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐