Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: Dev Tools
    • Labels:
      None

      Description

      When using a fresh 6.2 plugins sdk (I was using a 6.2.5 GA6 sdk) to compile a new project, you're likely to run into a Java compiler compliance issue if you're using JDK 8.

      For example, you'll get this kind of compilation error unless you change the default Plugins SDK Java compiler properties:

      ant war
      Buildfile: .../liferay-plugins-sdk-6.2/portlets/test-portlet/build.xml
      
      war:
          [javac] Compiling 1 source file to.../liferay-plugins-sdk-6.2/portlets/test-portlet/docroot/WEB-INF/classes
          [javac] Annotation processing got disabled, since it requires a 1.6 compliant JVM
          [javac] ----------
          [javac] 1. ERROR in .../liferay-plugins-sdk-6.2/portlets/test-portlet/docroot/WEB-INF/src/com/liferay/test/TestPortlet.java (at line 1)
          [javac] 	package com.liferay.test;
          [javac] 	^
          [javac] The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files
          [javac] ----------
          [javac] 1 problem (1 error)
      

      The issue was resolved when I set

          ant.build.javac.source=1.8
          ant.build.javac.target=1.8
      

      in my build.<username>.properties file. (The default values of these properties are 1.6.)

      It would probably be helpful to add this note to https://dev.liferay.com/develop/tutorials/-/knowledge_base/6-2/using-the-plugins-sdk

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: