Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-4725

Use Animal-Sniffer ANT task to enforce JDK compatibility

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.1
    • None
    • general/build
    • None
    • New

    Description

      While developing the fork of the forbidden-apis check, I recogized another very useful task to execute (in fact its similar to the forbidden-apis task, it just does the opposite - it only allows specific signatures).

      The problem is in general: If the developer has a newer JDK version installed and builds Lucene/Solr against it, he can accidentally use method signatures or classes not available in the compile target java version (in our case 1.6). This is especially useful for Mac users, who are enforced to use the JDK version shipped with the operating system.

      The Animal-Sniffer ANT plugin can handle this for us (http://mojo.codehaus.org/animal-sniffer/animal-sniffer-ant-tasks/), available via IVY. The corresponding signatures are also available via IVY: http://mojo.codehaus.org/signatures/java16/

      Like the forbidden APIs scanner it scans the byte code and fails the build if any signature is used that is not shipped with the compiler target JDK.

      Attachments

        Issue Links

          Activity

            People

              uschindler Uwe Schindler
              uschindler Uwe Schindler
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: