无法理解gradle生成中的错误-Xlint:未选中
我在使用gradle构建hibernate时出错无法理解gradle生成中的错误-Xlint:未选中,gradle,Gradle,我在使用gradle构建hibernate时出错 :hibernate-entitymanager:compileTestJava /home/jsiddharth/workspace/hibernate-orm-master/hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/criteria/paths/SingularAttributeJoinTest.java:128: error: <anonymous org
:hibernate-entitymanager:compileTestJava
/home/jsiddharth/workspace/hibernate-orm-master/hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/criteria/paths/SingularAttributeJoinTest.java:128: error: <anonymous org.hibernate.jpa.test.criteria.paths.SingularAttributeJoinTest$2> is not abstract and does not override abstract method integrate(MetadataImplementor,SessionFactoryImplementor,SessionFactoryServiceRegistry) in Integrator
return new Integrator() {
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
:hibernate-entitymanager:compileTestJava FAILED
FAILURE: Build failed with an exception.
如何运行构建来忽略错误?至于您的问题,
-Xlint
是一个Java编译器选项,与Gradle无关。您可以通过GRADLE\u OPTS
指定这些选项,这是GRADLE向JVM传递参数的方式
具体来说:GRADLE\u OPTS=“-Xlint:deprecation”
无论如何,这不是你的问题。请查看错误:
SingularAttributeJoint$2>不是抽象的,并且不会覆盖Integrator中的抽象方法Integration(MetadataImplementor、SessionFactoryImplementor、SessionFactoryServiceRegistry)
返回新的积分器(){
您在
SingularAttributeJoint
中有一个匿名类,该类声明为实现Integrator
,但未能实现方法Integration
,并且未声明为抽象类。这种错误当然不能通过-Xlint
选项抑制。无法识别的选项:-Xlint:unchecked
FAILURE: Build failed with an exception.
* What went wrong:
Problem configuring task :eclipse from command line. Unknown command-line option '-X'.
> Unknown command-line option '-X'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 16.185 secs