亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

mvn test執行報錯

Microsoft Windows [版本 6.1.7601]

版權所有 (c) 2009 Microsoft Corporation。保留所有權利。


C:\Users\Administrator>mvn -v

Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T00:41:4

7+08:00)

Maven home: C:\apache-maven-3.3.9

Java version: 1.8.0_60, vendor: Oracle Corporation

Java home: C:\Java\jdk1.8.0_60\jre

Default locale: zh_CN, platform encoding: GBK

OS name: "windows 7", version: "6.1", arch: "x86", family: "dos"


C:\Users\Administrator>F:


F:\>cd F:\MavenTest\code\maven01


F:\MavenTest\code\maven01>mvn compile

[INFO] Scanning for projects...

[WARNING]

[WARNING] Some problems were encountered while building the effective model for

com.imooc.maven01:maven01-model:jar:0.0.1SNAPSHOT

[WARNING] 'version' uses an unsupported snapshot version format, should be '*-SN

APSHOT' instead. @ line 11, column 11

[WARNING]

[WARNING] It is highly recommended to fix these problems because they threaten t

he stability of your build.

[WARNING]

[WARNING] For this reason, future Maven versions might no longer support buildin

g such malformed projects.

[WARNING]

[INFO]

[INFO] ------------------------------------------------------------------------

[INFO] Building maven01-model 0.0.1SNAPSHOT

[INFO] ------------------------------------------------------------------------

[INFO]

[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ maven01-mo

del ---

[WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e

. build is platform dependent!

[INFO] skip non existing resourceDirectory F:\MavenTest\code\maven01\src\main\re

sources

[INFO]

[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ maven01-model -

--

[INFO] Nothing to compile - all classes are up to date

[INFO] ------------------------------------------------------------------------

[INFO] BUILD SUCCESS

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 0.658 s

[INFO] Finished at: 2016-10-10T08:27:15+08:00

[INFO] Final Memory: 7M/16M

[INFO] ------------------------------------------------------------------------


F:\MavenTest\code\maven01>mvn test

[INFO] Scanning for projects...

[WARNING]

[WARNING] Some problems were encountered while building the effective model for

com.imooc.maven01:maven01-model:jar:0.0.1SNAPSHOT

[WARNING] 'version' uses an unsupported snapshot version format, should be '*-SN

APSHOT' instead. @ line 11, column 11

[WARNING]

[WARNING] It is highly recommended to fix these problems because they threaten t

he stability of your build.

[WARNING]

[WARNING] For this reason, future Maven versions might no longer support buildin

g such malformed projects.

[WARNING]

[INFO]

[INFO] ------------------------------------------------------------------------

[INFO] Building maven01-model 0.0.1SNAPSHOT

[INFO] ------------------------------------------------------------------------

[WARNING] The POM for org.apache.maven.plugins:maven-surefire-plugin:jar:2.12.4

is invalid, transitive dependencies (if any) will not be available, enable debug

?logging for more details

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 0.184 s

[INFO] Finished at: 2016-10-10T08:27:26+08:00

[INFO] Final Memory: 5M/15M

[INFO] ------------------------------------------------------------------------

[ERROR] Plugin org.apache.maven.plugins:maven-surefire-plugin:2.12.4 or one of i

ts dependencies could not be resolved: Failed to read artifact descriptor for or

g.apache.maven.plugins:maven-surefire-plugin:jar:2.12.4: 1 problem was encounter

ed while building the effective model

[ERROR] [FATAL] Non-parseable POM C:\Users\Administrator\.m2\repository\org\apac

he\maven\plugins\maven-surefire-plugin\2.12.4\maven-surefire-plugin-2.12.4.pom:

in comment after two dashes (--) next character must be > not e (position: START

_TAG seen ...gin",uname+"|"+pass);\r\n} else {\r\n\tdelCookie("tj_login");\r\n}\

r\n//--e... @184:6) ?@ line 184, column 6

[ERROR] -> [Help 1]

[ERROR]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit

ch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions, please rea

d the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResoluti

onException


F:\MavenTest\code\maven01>


正在回答

2 回答

你把0.0.1SNAPSHOT 改成0.0.1-SNAPSHOT,試試,看看還報這個問題嗎?

0 回復 有任何疑惑可以回復我~
#1

一個哇塞的小伙 提問者

非常感謝!
2016-10-19 回復 有任何疑惑可以回復我~

是不是,你第一次安裝maven而且沒有聯網。

試試在聯網的情況下,運行 mvn ?compile。

0 回復 有任何疑惑可以回復我~
#1

一個哇塞的小伙 提問者

問題已經解決 謝謝 并不是你說的原因 我一直連著網在看慕課網視頻 照著做的。而且我也不可能運行一次失敗了就跑來問
2016-10-19 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消
項目管理利器——maven
  • 參與學習       173031    人
  • 解答問題       789    個

使用maven來構建和管理Java項目,從環境配置,到maven核心知識

進入課程

mvn test執行報錯

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號