報錯:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1


錯誤現象:

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project cjj: Compilation failure -> [Help 1]

官方幫助文檔:

Unlike many other errors, this exception is not generated by the Maven core itself but by a plugin. As a rule of thumb, plugins use this error to signal a failure of the build because there is something wrong with the dependencies or sources of a project, e.g. a compilation or a test failure.

The concrete meaning of the exception depends on the plugin so please have a look at its documentation. The documentation for many common Maven plugins can be reached via our plugin index.

翻譯:

與許多其他錯誤不同,此異常不是由Maven核心本身生成的,而是由插件生成的。 根據經驗,插件使用此錯誤來表示構建失敗,因為項目的依賴項或源代碼存在問題,例如: 編譯或測試失敗。

異常的具體含義取決於插件,所以請查看其文檔。 可以通過我們的插件索引訪問許多常見Maven插件的文檔。

解決:

在我遇到的情況下,是這樣解決的,更換jdk的版本號即可。

如果不行,加上下買呢內容:

         <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.6.1</version>
                    <configuration>
                        <source>1.6</source>
                        <target>1.6</target>
                    </configuration>
                </plugin>

 

 

 

 

 

 

 

 

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM