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 ...
随机推荐
- maven-surefire-plugin的forkMode分析
Maven运行测试用例时,是通过调用maven的surefire插件并fork一个子进程来执行用例的.forkmode属性中指明是要为每个测试创建一个进程,还是所有测试在同一个进程中完成. <p ...
- python 连接操作 各类数据库
转载自MySQL Loners 一,python 操作 MySQL:详情见:这里 #!/bin/env python # -*- encoding: utf-8 -*- #-------------- ...
- NPOI:初次操作(新建Excel)
1. 由于在某些电脑上没有安装office,或者有权限限制,使用COM组件进行读写Excel的话会出现问题, 为此,NPOI是一个很好的选择,NPOI可以在上述环境中满足Office的操作需求,并且功 ...
- bat文件执行cmd命令 进入文件夹不退出
@echo offe:cd E:\ChanJoy-ChangJianBao\前端部分\chanjoy\ChanjoyWebfontgulp watchcmd /k
- wget 认知及常用命令【转载】
https://www.cnblogs.com/lxz88/p/6278268.html https://www.cnblogs.com/cindy-cindy/p/6847502.html
- 【html】META http-equiv 大全
meta是html语言head区的一个辅助性标签.几乎所有的网页里,我们可以看到类似下面这段的html代码: <head><meta http-equiv="content ...
- 剑指offer--45.二叉树的深度
时间限制:1秒 空间限制:32768K 热度指数:139716 题目描述 输入一棵二叉树,求该树的深度.从根结点到叶结点依次经过的结点(含根.叶结点)形成树的一条路径,最长路径的长度为树的深度. -- ...
- echarts-detail---散点图
data4 = [{ xAxis: result.AvgEvaluate, seriesId: ', name: '基干360综合分' }, { yAxis: evalue, seriesId: ', ...
- MFC CListControl 点击列头排序的实现
SetItemData可以为每一行绑定一个DWORD类型的变量.用GetItemData可以获得这个变量.举个例子,假设CListCtrl中你需要显示某个数据表中的记录,该表有个流水号主键ID,一般这 ...
- kubeadm搭建kubernetes集群之一:构建标准化镜像
使用docker可以批量管理多个容器,但都是在同一台电脑内进行的,这在实际生产环境中是不够用的,如何突破单机的限制?让多个电脑上的容器可以像单机上的docker-compose.yml管理的那样方便呢 ...