maven打包报错:在类路径或引导类路径中找不到程序包 java.lang
刚下了个新项目,跑了下maven报错了:
- E:\workspace\portalframe>mvn clean install
- [INFO] Scanning for projects...
- [WARNING]
- [WARNING] Some problems were encountered while building the effective model for com.migu.reading.portalFrame:ues:war:trunk-SNAPSHOT
- [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: com.portalFrame:commons.mq:jar -> duplicate declaration of version V300R003C20B311 @ line , column
- [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: com.portalFrame:axis:jar -> version 0.0. vs 1.4 @ line , column
- [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: com.portalFrame:com.huawei.uxe.core.render:jar -> version 3.2.21.22 vs 0.0. @ line , column
- [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: com.portalFrame:commons-codec:jar -> duplicate declaration of version 1.3. @ line , column
- [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: com.portalFrame:jdom:jar -> version 1.1 vs 0.0. @ line , column
- [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line , column
- [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\portalframe\target
- [INFO]
- [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ ues ---
- [INFO] Using 'UTF-8' encoding to copy filtered resources.
- [INFO] Copying resources
- [INFO] Copying resources
- [INFO]
- [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ ues ---
- [INFO] Changes detected - recompiling the module!
- [INFO] Compiling source files to E:\workspace\portalframe\target\classes
- 致命错误: 在类路径或引导类路径中找不到程序包 java.lang
- [INFO] -------------------------------------------------------------
- [ERROR] COMPILATION ERROR :
- [INFO] -------------------------------------------------------------
- [ERROR] An unknown compilation problem occurred
- [INFO] error
- [INFO] -------------------------------------------------------------
- [INFO] ------------------------------------------------------------------------
- [INFO] BUILD FAILURE
- [INFO] ------------------------------------------------------------------------
- [INFO] Total time: 14.730 s
- [INFO] Finished at: --25T11::+:
- [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 ues: Compilation failure
- [ERROR] An unknown compilation problem occurred
- [ERROR] -> [Help ]
- [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 ] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
既然是编译错误,那么就考虑下jdk包问题,去看了下pom.xml,发现插件里有这个东西:
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- <encoding>UTF-8</encoding>
- <optimize>false</optimize>
- <debug>false</debug>
- <showDeprecation>false</showDeprecation>
- <showWarnings>true</showWarnings>
- <compilerArguments>
- <bootclasspath>${java.home}/lib/rt.jar:${java.home}/lib/jce.jar</bootclasspath>
- </compilerArguments>
- </configuration>
- </plugin>
看到bootclasspath就觉得很奇怪,为啥是个冒号来分割呢?一查才知道,冒号是用于linux操作系统的,windows下只能改为分号。改完重新跑maven,这次不再出现该问题了。
maven打包报错:在类路径或引导类路径中找不到程序包 java.lang的更多相关文章
- maven打包报错 Fatal error compiling: tools.jar not found: C:\Program Files\Java\jre1.8.0_151\..\lib\tool
maven 打包报错 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:comp ...
- No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? idea maven 打包报错问题解决
mvn clean install -X -Dmaven.test.skip=true -P dev 打包报错:No compiler is provided in this environment. ...
- 设置Maven默认的JDK为1.7,解决Update Maven Project默认为1.5和Maven打包报错2个问题
1.之前,一直遇到这个问题. Update Maven Project的时候,JDK变成了1.5的. 如果项目中有使用"@overdide",程序就会报错,需要手动修改JRE ...
- Maven 打包报错,log4j版本导致
# 在执行打包的时候 mvn clean assembly:assembly # 发生上面的错误 ------------------------------ [INFO] Total time: 2 ...
- Maven打包报错:[WARNING] The POM for xxx is missing, no dependency inform
maven install 或 package 时 ,执行警告报错: [WARNING] The POM for com.xx-base:jar:1.0 is missing, no dependen ...
- [转]maven打包报错:Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.5:test
源文URL:http://blog.csdn.net/caiwenfeng_for_23/article/details/44514947 mvn compile 没有问题,mvn package的 ...
- MAVEN打包报错:com.sun.net.ssl.internal.ssl;sun.misc.BASE64Decoder;程序包 javax.crypto不存在处理办法
以下是pom.xml里面的完整配置,重点是红色的部分,原因是引用的jar是jre下边的,而打包环境用的是jdk下边的jar,所以引用下就OK了.<build> <plugins> ...
- maven打包报错:Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.5:test
mvn package的时候报如下错误: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.5:test ...
- maven打包报错问题解析
1. 场景描述 Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:3.1.0:clean (default-clea ...
随机推荐
- POJ 2891 中国剩余定理的非互质形式
中国剩余定理的非互质形式 任意n个表达式一对对处理,故只需处理两个表达式. x = a(mod m) x = b(mod n) km+a = b (mod n) km = (a-b)(mod n) 利 ...
- Fast Walsh-Hadamard Transform
这玩意最近经常出现额…… FFT解决的问题是\[C_{k}=\sum_{i+j=k}A_i \cdot B_j\] 其中\(A\).\(B\).\(C\)是三个列向量. 而FWHT是将\(\sum\) ...
- Prism 4 文档 ---第8章 导航
作为同用户具有丰富的交互的客户端应用程序,它的用户界面(UI)将会持续不断的更新来反映用户工作的当前的任务和数据.用户界面可以进行一段时间相当大的变化作为用户交互的应用程序中完成各种任务.通过 ...
- bzoj3623
题解: 刚看到题目,还以为是2-sat 可是似乎不对啊... 然后就只能爆搜了 看了网上的题解,woc还真是报搜 然后就ac了 当然爆搜还要随机化 代码: #include<bits/stdc+ ...
- 一些常用的UI控件
让你的 EditText 全部清除: 网址:https://github.com/MrFuFuFu/ClearEditText
- MySQL mha 高可用集群搭建
[mha] MHA作为MySQL故障切换和主从提升的高可用软件,在故障切换过程中,MHA能做到在0~30秒之内自动完成数据库的故障切换操作,并且在进行故障切换的过程中,MHA能在最大程度上保证数据的一 ...
- Easy UI DataGrid 与 分页
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs& ...
- windows下的一些命令
dir 相当于linux下的ls clear 清屏 netstat 活动连接 | 管道命令 findstr 查询类似linux的grep tasklist 查看进程列表 taskkill 杀死进程 d ...
- 初次使用Quartus II 13.0的疑惑及解决方法
初次接触Quartus II 13.0,遇到了很多的问题,把问题总结如下: 1.Quartus II 13.0的安装及破解 下载地址:http://t.cn/Rh2TFcz,密码是:g3gc (参考贴 ...
- GPU编程自学6 —— 函数与变量类型限定符
深度学习的兴起,使得多线程以及GPU编程逐渐成为算法工程师无法规避的问题.这里主要记录自己的GPU自学历程. 目录 <GPU编程自学1 -- 引言> <GPU编程自学2 -- CUD ...