Maven 编译出错

一. maven 编写出错及解决办法:

     出错信息如下:

Fatal Error: Unable to find package java.lang in classpath or bootclasspath
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] An unknown compilation problem occurred
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.145 s
[INFO] Finished at: 2018-10-09T16:26:39+08:00
[INFO] Final Memory: 33M/322M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile (default-compile) on project xdf_grow: Compilation failure
[ERROR] An unknown compilation problem occurred
[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

   主要有2点错误信息:

        1. Fatal Error: Unable to find package java.lang in classpath or bootclasspath

        2. Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile (default-compile) on project xdf_grow: Compilation failure


    解决查询:

        修改 目录下 pos.xml 文件,具体内容如下:

        这里是查找PATH 路径,window改为分号,linux改为冒号

       图片.png


猜你喜欢

转载自blog.51cto.com/5766902/2296364