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

  1. E:\workspace\portalframe>mvn clean install
  2. [INFO] Scanning for projects...
  3. [WARNING]
  4. [WARNING] Some problems were encountered while building the effective model for com.migu.reading.portalFrame:ues:war:trunk-SNAPSHOT
  5. [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: com.portalFrame:commons.mq:jar -> duplicate declaration of version V300R003C20B311 @ line , column
  6. [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: com.portalFrame:axis:jar -> version 0.0. vs 1.4 @ line , column
  7. [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
  8. [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: com.portalFrame:commons-codec:jar -> duplicate declaration of version 1.3. @ line , column
  9. [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: com.portalFrame:jdom:jar -> version 1.1 vs 0.0. @ line , column
  10. [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line , column
  11. [WARNING]
  12. [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
  13. [WARNING]
  14. [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
  15. [WARNING]
  16. [INFO]
  17. [INFO] ------------------------------------------------------------------------
  18. [INFO] Building ues trunk-SNAPSHOT
  19. [INFO] ------------------------------------------------------------------------
  20. [INFO]
  21. [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ ues ---
  22. [INFO] Deleting E:\workspace\portalframe\target
  23. [INFO]
  24. [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ ues ---
  25. [INFO] Using 'UTF-8' encoding to copy filtered resources.
  26. [INFO] Copying resources
  27. [INFO] Copying resources
  28. [INFO]
  29. [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ ues ---
  30. [INFO] Changes detected - recompiling the module!
  31. [INFO] Compiling source files to E:\workspace\portalframe\target\classes
  32. 致命错误: 在类路径或引导类路径中找不到程序包 java.lang
  33. [INFO] -------------------------------------------------------------
  34. [ERROR] COMPILATION ERROR :
  35. [INFO] -------------------------------------------------------------
  36. [ERROR] An unknown compilation problem occurred
  37. [INFO] error
  38. [INFO] -------------------------------------------------------------
  39. [INFO] ------------------------------------------------------------------------
  40. [INFO] BUILD FAILURE
  41. [INFO] ------------------------------------------------------------------------
  42. [INFO] Total time: 14.730 s
  43. [INFO] Finished at: --25T11::+:
  44. [INFO] Final Memory: 40M/637M
  45. [INFO] ------------------------------------------------------------------------
  46. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project ues: Compilation failure
  47. [ERROR] An unknown compilation problem occurred
  48. [ERROR] -> [Help ]
  49. [ERROR]
  50. [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  51. [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  52. [ERROR]
  53. [ERROR] For more information about the errors and possible solutions, please read the following articles:
  54. [ERROR] [Help ] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

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

  1. <plugin>
  2. <groupId>org.apache.maven.plugins</groupId>
  3. <artifactId>maven-compiler-plugin</artifactId>
  4. <configuration>
  5. <source>1.8</source>
  6. <target>1.8</target>
  7. <encoding>UTF-8</encoding>
  8. <optimize>false</optimize>
  9. <debug>false</debug>
  10. <showDeprecation>false</showDeprecation>
  11. <showWarnings>true</showWarnings>
  12. <compilerArguments>
  13. <bootclasspath>${java.home}/lib/rt.jar:${java.home}/lib/jce.jar</bootclasspath>
  14. </compilerArguments>
  15. </configuration>
  16. </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 2891 中国剩余定理的非互质形式

    中国剩余定理的非互质形式 任意n个表达式一对对处理,故只需处理两个表达式. x = a(mod m) x = b(mod n) km+a = b (mod n) km = (a-b)(mod n) 利 ...

  2. Fast Walsh-Hadamard Transform

    这玩意最近经常出现额…… FFT解决的问题是\[C_{k}=\sum_{i+j=k}A_i \cdot B_j\] 其中\(A\).\(B\).\(C\)是三个列向量. 而FWHT是将\(\sum\) ...

  3. Prism 4 文档 ---第8章 导航

        作为同用户具有丰富的交互的客户端应用程序,它的用户界面(UI)将会持续不断的更新来反映用户工作的当前的任务和数据.用户界面可以进行一段时间相当大的变化作为用户交互的应用程序中完成各种任务.通过 ...

  4. bzoj3623

    题解: 刚看到题目,还以为是2-sat 可是似乎不对啊... 然后就只能爆搜了 看了网上的题解,woc还真是报搜 然后就ac了 当然爆搜还要随机化 代码: #include<bits/stdc+ ...

  5. 一些常用的UI控件

    让你的 EditText 全部清除: 网址:https://github.com/MrFuFuFu/ClearEditText

  6. MySQL mha 高可用集群搭建

    [mha] MHA作为MySQL故障切换和主从提升的高可用软件,在故障切换过程中,MHA能做到在0~30秒之内自动完成数据库的故障切换操作,并且在进行故障切换的过程中,MHA能在最大程度上保证数据的一 ...

  7. Easy UI DataGrid 与 分页

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs& ...

  8. windows下的一些命令

    dir 相当于linux下的ls clear 清屏 netstat 活动连接 | 管道命令 findstr 查询类似linux的grep tasklist 查看进程列表 taskkill 杀死进程 d ...

  9. 初次使用Quartus II 13.0的疑惑及解决方法

    初次接触Quartus II 13.0,遇到了很多的问题,把问题总结如下: 1.Quartus II 13.0的安装及破解 下载地址:http://t.cn/Rh2TFcz,密码是:g3gc (参考贴 ...

  10. GPU编程自学6 —— 函数与变量类型限定符

    深度学习的兴起,使得多线程以及GPU编程逐渐成为算法工程师无法规避的问题.这里主要记录自己的GPU自学历程. 目录 <GPU编程自学1 -- 引言> <GPU编程自学2 -- CUD ...