Здравствуйте.При сборке JavaFx приложения в Maven выдает следующее:
Код:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building bank 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ bank ---
[debug] execute contextualize
[WARNING] Using platform encoding (windows-1251 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ bank ---
[WARNING] File encoding has not been set, using platform encoding windows-1251, i.e. build is platform dependent!
[INFO] Compiling 9 source files to E:\Programs Java\BankCourses\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] \Programs Java\BankCourses\src\main\java\com\kotsuba\bank\core\BankInfo.java:[12,4] error: default methods are not supported in -source 1.5
[ERROR] \Programs Java\BankCourses\src\main\java\com\kotsuba\bank\core\BankInfo.java:[14,11] error: try-with-resources is not supported in -source 1.5
[ERROR] \Programs Java\BankCourses\src\main\java\com\kotsuba\bank\core\data\DAO.java:[59,47] error: diamond operator is not supported in -source 1.5
[ERROR] \Programs Java\BankCourses\src\main\java\com\kotsuba\bank\banks\BankInfoNBRB.java:[22,46] error: diamond operator is not supported in -source 1.5
[ERROR] \Programs Java\BankCourses\src\main\java\com\kotsuba\bank\banks\BankInfoNBRB.java:[34,11] error: try-with-resources is not supported in -source 1.5
[ERROR] \Programs Java\BankCourses\src\main\java\com\kotsuba\bank\banks\BankInfoCBR.java:[22,46] error: diamond operator is not supported in -source 1.5
[ERROR] \Programs Java\BankCourses\src\main\java\com\kotsuba\bank\banks\BankInfoCBR.java:[34,11] error: try-with-resources is not supported in -source 1.5
[INFO] 7 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.967s
[INFO] Finished at: Mon Nov 02 23:43:49 GMT+03:00 2015
[INFO] Final Memory: 8M/112M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project bank: Compilation failure: Compilation failure:
[ERROR] \Programs Java\BankCourses\src\main\java\com\kotsuba\bank\core\BankInfo.java:[12,4] error: default methods are not supported in -source 1.5
[ERROR] \Programs Java\BankCourses\src\main\java\com\kotsuba\bank\core\BankInfo.java:[14,11] error: try-with-resources is not supported in -source 1.5
[ERROR] \Programs Java\BankCourses\src\main\java\com\kotsuba\bank\core\data\DAO.java:[59,47] error: diamond operator is not supported in -source 1.5
[ERROR] \Programs Java\BankCourses\src\main\java\com\kotsuba\bank\banks\BankInfoNBRB.java:[22,46] error: diamond operator is not supported in -source 1.5
[ERROR] \Programs Java\BankCourses\src\main\java\com\kotsuba\bank\banks\BankInfoNBRB.java:[34,11] error: try-with-resources is not supported in -source 1.5
[ERROR] \Programs Java\BankCourses\src\main\java\com\kotsuba\bank\banks\BankInfoCBR.java:[22,46] error: diamond operator is not supported in -source 1.5
[ERROR] \Programs Java\BankCourses\src\main\java\com\kotsuba\bank\banks\BankInfoCBR.java:[34,11] error: try-with-resources is not supported in -source 1.5
[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/d...ilureException
Как видно по данным ошибкам, Maven ругается на внедрения JDK 8 .
pom.xml
Код:
<groupId>com.kotsuba</groupId>
<artifactId>bank</artifactId>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<groupId>com.zenjava</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>8.1.0</version>
<configuration>
<mainClass>com.kotsuba.bank.MyApplication</mainClass>
</configuration>
</plugin>
</plugins>
</build>
Может кто сталкивался с данной проблемой прошу помочь.