3 Replies Latest reply on Sep 17, 2014 7:12 AM by Tomaz Cerar

    9.1.0.Alpha1: Compilation error with Java 8

    Juergen Zimmermann Master

      I set these 2 properties in pom.xml in the root directory:

      <maven.compiler.target>1.8</maven.compiler.target>

      <maven.compiler.source>1.8</maven.compiler.source>

       

      Then I got this error (without the 2 additional props the compilation works fine):

      ...

      [INFO] ------------------------------------------------------------------------

      [INFO] Building WildFly: EE 9.0.0.Alpha1

      [INFO] ------------------------------------------------------------------------

      [INFO]

      [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ wildfly-ee ---

      [INFO]

      [INFO] --- maven-enforcer-plugin:1.3.1:enforce (ban-bad-dependencies) @ wildfly-ee ---

      [INFO]

      [INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-java-version) @ wildfly-ee ---

      [INFO]

      [INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-maven-version) @ wildfly-ee ---

      [INFO]

      [INFO] --- buildnumber-maven-plugin:1.3:create-timestamp (get-build-timestamp) @ wildfly-ee ---

      [INFO]

      [INFO] --- buildnumber-maven-plugin:1.3:create (get-scm-revision) @ wildfly-ee ---

      [INFO]

      [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ wildfly-ee ---

      [INFO] Using 'UTF-8' encoding to copy filtered resources.

      [INFO] Copying 8 resources

      [INFO]

      [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ wildfly-ee ---

      [INFO] Changes detected - recompiling the module!

      [INFO] Compiling 214 source files to C:\temp\wildfly-9.0.0.Alpha1\ee\target\classes

      [INFO] -------------------------------------------------------------

      [WARNING] COMPILATION WARNING :

      [INFO] -------------------------------------------------------------

      [WARNING] /C:/temp/wildfly-9.0.0.Alpha1/ee/src/main/java/org/jboss/as/ee/subsystem/EeExtension.java:[100,20] isRegisterTransformers() in org.jboss.as.controller.ExtensionContext has been deprecated

      [WARNING] /C:/temp/wildfly-9.0.0.Alpha1/ee/src/main/java/org/jboss/as/ee/component/deployers/ResourceReferenceProcessor.java: Some input files use unchecked or unsafe operations.

      [WARNING] /C:/temp/wildfly-9.0.0.Alpha1/ee/src/main/java/org/jboss/as/ee/component/deployers/ResourceReferenceProcessor.java: Recompile with -Xlint:unchecked for details.

      [WARNING] Some messages have been simplified; recompile with -Xdiags:verbose to get full output

      [INFO] 4 warnings

      [INFO] -------------------------------------------------------------

      [INFO] -------------------------------------------------------------

      [ERROR] COMPILATION ERROR :

      [INFO] -------------------------------------------------------------

      [ERROR] /C:/temp/wildfly-9.0.0.Alpha1/ee/src/main/java/org/jboss/as/ee/component/ServiceInjectionSource.java:[53,23] no suitable method found for addDependency(org.jboss.msc.service.ServiceName,java.lang.Class<capture#1 of ?>,ManagedRef[...]ctor))

          method org.jboss.msc.service.ServiceBuilder.addDependency(org.jboss.msc.service.ServiceBuilder.DependencyType,org.jboss.msc.service.ServiceName,org.jboss.msc.inject.Injector<java.lang.Object>) is not applicable

            (argument mismatch; org.jboss.msc.service.ServiceName cannot be converted to org.jboss.msc.service.ServiceBuilder.DependencyType)

          method org.jboss.msc.service.ServiceBuilder.<I>addDependency(org.jboss.msc.service.ServiceName,java.lang.Class<I>,org.jboss.msc.inject.Injector<I>) is not applicable

            (inferred type does not conform to equality constraint(s)

              inferred: org.jboss.as.naming.ManagedReferenceFactory

              equality constraints(s): org.jboss.as.naming.ManagedReferenceFactory,capture#1 of ?)

          method org.jboss.msc.service.ServiceBuilder.<I>addDependency(org.jboss.msc.service.ServiceBuilder.DependencyType,org.jboss.msc.service.ServiceName,java.lang.Class<I>,org.jboss.msc.inject.Injector<I>) is not applicable

            (cannot infer type-variable(s) I

              (actual and formal argument lists differ in length))