java打包类路径填写_maven打包报错:在类路径或引导类路径中找不到程序包 java.lang...

刚下了个新项目,跑了下maven报错了:

E:\workspace\wlf>mvn clean install

[INFO] Scanning for projects...

[WARNING]

[WARNING] Some problems were encountered while building the effective model for com.wlf.Hello:msg:war:trunk-SNAPSHOT

[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: com.wlf:commons.mq:jar -> duplicate declaration of version V300R003C20B311 @ line 1031, column 17

[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: com.wlf:axis:jar -> version 0.0.1 vs 1.4 @ line 1164, column 17

[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: com.wlf:commons-codec:jar -> duplicate declaration of version 1.3.2 @ line 1483, column 17

[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: com.wlf:jdom:jar -> version 1.1 vs 0.0.1 @ line 1982, column 17

[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 2915, column 15

[WARNING]

[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.

[WARNING]

[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.

[WARNING]

[INFO]

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

[INFO] Building ues trunk-SNAPSHOT

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

[INFO]

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

[INFO] Deleting E:\workspace\wlf\target

[INFO]

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

[INFO] Using 'UTF-8' encoding to copy filtered resources.

[INFO] Copying 2 resources

[INFO] Copying 352 resources

[INFO]

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

[INFO] Changes detected - recompiling the module!

[INFO] Compiling 4791 source files to E:\workspace\wlf\target\classes

致命错误: 在类路径或引导类路径中找不到程序包 java.lang

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

[ERROR] COMPILATION ERROR :

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

[ERROR] An unknown compilation problem occurred

[INFO] 1 error

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

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

[INFO] BUILD FAILURE

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

[INFO] Total time: 14.730 s

[INFO] Finished at: 2019-01-25T11:37:58+08:00

[INFO] Final Memory: 40M/637M

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

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project msg: Compilation failure

[ERROR] An unknown compilation problem occurred

[ERROR] -> [Help 1]

[ERROR]

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

[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 read the following articles:

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

既然是编译错误,那么就考虑下jdk包问题,去看了下pom.xml,发现插件里有这个东西:

org.apache.maven.plugins

maven-compiler-plugin

1.8

1.8

UTF-8

false

false

false

true

${java.home}/lib/rt.jar:${java.home}/lib/jce.jar

看到bootclasspath就觉得很奇怪,为啥是个冒号来分割呢?一查才知道,冒号是用于linux操作系统的,windows下只能改为分号。改完重新跑maven,这次不再出现该问题了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值