maven 在類路徑或引導類路徑中找不到程式包 java.lang
阿新 • • 發佈:2018-11-01
報錯資訊:
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 470 source files to /Users/baozhichao/workspace/meforlite/target/classes
致命錯誤: 在類路徑或引導類路徑中找不到程式包 java.lang
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] An unknown compilation problem occurred
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.019 s
[INFO] Finished at: 2017-12-21T16:03:44+08:00
[INFO] Final Memory: 29M/270M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project meforlite: 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
最近新換到mac電腦,maven打包時報如上的錯誤,搜尋後發現是pom.xml分隔符的問題,注意第603行,在windows下使用maven 應該使用分號(;)分隔,linux/mac 下使用(:)分隔。