maven执行install时出现错误:
[ERROR] [源文件的搜索路径: E:\project\IdeaProjects\weixin\leimingtech-core\src\main\java]
[ERROR] [类文件的搜索路径: F:\Program Files\Java\jdk1.8.0_71\jre\lib\rt.jar:F:\Program Files\Java\jdk1.8.0_71\jre\lib\jce.jar,F:\Program Files\Java\jdk1.8.0_71\jre\lib\ext\access-bridge-64.jar,F:\Program Files\Java\jdk1.8.0_71\jre\lib\ext\cldrdata.jar,F:\Program Files\Java\jdk1.8.0_71\jre\lib\ext\dnsns.jar,F:\Program Files\Java\jdk1.8.0_71\jre\lib\ext\jaccess.jar,F:\Program Files\Java\jdk1.8.0_71\jre\lib\ext\jfxrt.jar,F:\Program Files\Java\jdk1.8.0_71\jre\lib\ext\localedata.jar,F:\Program Files\Java\jdk1.8.0_71\jre\lib\ext\nashorn.jar,F:\Program Files\Java\jdk1.8.0_71\jre\lib\ext\sunec.jar,F:\Program Files\Java\jdk1.8.0_71\jre\lib\ext\sunjce_provider.jar,F:\Program Files\Java\jdk1.8.0_71\jre\lib\ext\sunmscapi.jar,F:\Program Files\Java\jdk1.8.0_71\jre\lib\ext\sunpkcs11.jar,F:\Program Files\Java\jdk1.8.0_71\jre\lib\ext\zipfs.jar,
[ERROR] 致命错误: 在类路径或引导类路径中找不到程序包 java.lang
[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
Process finished with exit code 1
错误原因是由于开发环境改变造成的,之前是用linux开发环境,现在改为windows开发环境
解决办法
找到工程pom文件中下面这段,将${java.home}/jre/lib/rt.jar和${java.home}/jre/lib/jce.jar中间的冒号改为分号,linux开发环境用冒号连接,windows开发环境下用分号链接
<bootclasspath>${java.home}/jre/lib/rt.jar:${java.home}/jre/lib/jce.jar</bootclasspath>
转载于:https://blog.51cto.com/liuzhenlife/1895849