刚下了个新项目,跑了下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的更多相关文章

  1. 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 ...

  2. 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. ...

  3. 设置Maven默认的JDK为1.7,解决Update Maven Project默认为1.5和Maven打包报错2个问题

    1.之前,一直遇到这个问题. Update Maven Project的时候,JDK变成了1.5的.    如果项目中有使用"@overdide",程序就会报错,需要手动修改JRE ...

  4. Maven 打包报错,log4j版本导致

    # 在执行打包的时候 mvn clean assembly:assembly # 发生上面的错误 ------------------------------ [INFO] Total time: 2 ...

  5. 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 ...

  6. [转]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的 ...

  7. MAVEN打包报错:com.sun.net.ssl.internal.ssl;sun.misc.BASE64Decoder;程序包 javax.crypto不存在处理办法

    以下是pom.xml里面的完整配置,重点是红色的部分,原因是引用的jar是jre下边的,而打包环境用的是jdk下边的jar,所以引用下就OK了.<build> <plugins> ...

  8. 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 ...

  9. maven打包报错问题解析

    1. 场景描述 Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:3.1.0:clean (default-clea ...

随机推荐

  1. poj 1724 ROADS 很水的dfs

    题意:给你N个城市和M条路和K块钱,每条路有话费,问你从1走到N的在K块钱内所能走的最短距离是多少 链接:http://poj.org/problem?id=1724 直接dfs搜一遍就是 代码: # ...

  2. 014PHP基础知识——流程控制(二)

    <?php /** *switch 分支语句: * switch(表达式){ * case 值1: * ... * break; * * case 值2: * ... * break; * de ...

  3. 【zznu-2060】 Minsum Plus(最小正子段和)

    题目描述 题意简单到令人发指! 序列A由N个整数组成,从中选出一个连续的子序列,使得这个子序列的和为正数,且和为所有和大于零的子序列中的最小值. 将这个值输出,若无解,输出no solution. 输 ...

  4. 关于javascript严格模式下七种禁止使用的写法

    分享至javascript语言精髓与编程实践 开启严格模式(”use strict"): 在全局代码的开始处加入 在eval代码的开始处加入 在函数声明代码处加入 在new Function ...

  5. 记 fastjson泛型转对象 第一次可以正常转,第二次就变成JSONArray 问题

    在解析json数据的时候,在使用泛型对象的时候即: public class ResultMsgDto<E> implements Serializable { private stati ...

  6. JS中关于把函数作为另一函数的参数的几点小总结

    //JS中关于把函数作为函数的参数来传递的问题的小总结//第一,最简单的形式无参函数,直接形式函数的函数名放到括号中,再在执行部分这个函数即可.//当然调用时要穿另一个真正的定义好的函数/*funct ...

  7. vue-parcel打包入门

    what 快速,零配置的 Web 应用程序打包器 why 快捷,配置比较少 使用 Parcel 打包的 vue HelloWorld 应用.GitHub 地址: https://github.com/ ...

  8. Android程序员学WEB前端(8)-CSS(3)-盒子内联块级定位浮动-Sublime

    转载请注明出处:http://blog.csdn.net/iwanghang/article/details/76618473 觉得博文有用,请点赞,请评论,请关注,谢谢!~ 盒子模型: <!D ...

  9. Android响应式UI教程

    原文:Responsive UI Tutorial for Android 作者:James Nocentini 译者:kmyhy 2017/5/4 更新说明: 由 James Nocentini 更 ...

  10. 轻量级网络 - PVANet & SuffleNet

    一. PVANet 论文:PVANET: Deep but Lightweight Neural Networks for Real-time Object Detection    [点击下载] C ...