maven package failure, package not exist!

1、maven package 打包失败,报错一些包不存在。

 

[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ selenium ---

[INFO] Deleting D:\Program Files (x86)\java\eclipse\workspace\webauto\target
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.247 s
[INFO] Finished at: 2017-03-29T13:41:24+08:00
[INFO] Final Memory: 8M/309M
[INFO] ------------------------------------------------------------------------
[WARNING]
[WARNING] Some problems were encountered while building the effective settings
[WARNING] Unrecognised tag: 'id' (position: START_TAG seen ...<profiles>\r\n  <i
d>... @194:7)  @ D:\Program Files (x86)\java\apache-maven\bin\..\conf\settings.x
ml, line 194, column 7
[WARNING]
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for
com.nd.qa:selenium:jar:0.0.1-SNAPSHOT
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be
 unique: com.alibaba:fastjson:jar -> version 1.2.15 vs 1.1.37 @ line 74, column
15
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be
 unique: org.apache.httpcomponents:httpclient:jar -> version 4.5.2 vs 4.3.4 @ li
ne 100, column 15
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be
 unique: log4j:log4j:jar -> version 1.2.12 vs 1.2.17 @ line 127, column 15
[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 selenium 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The artifact jexcelapi:jxl:jar:2.6 has been relocated to net.sourcefor
ge.jexcelapi:jxl:jar:2.6
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ selenium -
--
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory D:\Program Files (x86)\java\eclipse\w
orkspace\webauto\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ selenium ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 50 source files to D:\Program Files (x86)\java\eclipse\workspac
e\webauto\target\classes
[INFO] -------------------------------------------------------------
[WARNING] COMPILATION WARNING :
[INFO] -------------------------------------------------------------
[WARNING] /D:/Program Files (x86)/java/eclipse/workspace/webauto/src/main/java/c
om/nd/qa/selenium/jenkins/PreemptiveAuth.java: 某些输入文件使用或覆盖了已过时的

API。

[ERROR] /D:/Program Files (x86)/java/eclipse/workspace/webauto/src/main/java/co
/nd/qa/selenium/Eye_Compatibility.java:[12,23] 程序包junit.framework不存在
[ERROR] /D:/Program Files (x86)/java/eclipse/workspace/webauto/src/main/java/co
/nd/qa/selenium/Eye_Compatibility.java:[14,40] 找不到符号
  符号: 类 TestCase
[ERROR] /D:/Program Files (x86)/java/eclipse/workspace/webauto/src/main/java/co
/nd/qa/selenium/Nose_Compatibility.java:[12,23] 程序包junit.framework不存在
[ERROR] /D:/Program Files (x86)/java/eclipse/workspace/webauto/src/main/java/co
/nd/qa/selenium/Nose_Compatibility.java:[14,41] 找不到符号
  符号: 类 TestCase
[ERROR] /D:/Program Files (x86)/java/eclipse/workspace/webauto/src/main/java/co
/nd/qa/selenium/Mouth_Compatibility.java:[12,23] 程序包junit.framework不存在
[ERROR] /D:/Program Files (x86)/java/eclipse/workspace/webauto/src/main/java/co
/nd/qa/selenium/Mouth_Compatibility.java:[14,42] 找不到符号

 

 

 

2、但是如果先使用eclipse clean之后,  在打包却可以成功。

 

 

 

结果原因: pom文件中,该包的<scope>test</scope>错误,修改或去掉即可

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值