Lucene - Core
  1. Lucene - Core
  2. LUCENE-4747

java7 as a minimum requirement for lucene 5

    Details

    • Type: Task Task
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.0
    • Fix Version/s: 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Spinoff from LUCENE-4746.

      I propose we make this change on trunk only.

      1. LUCENE-4747.patch
        44 kB
        Uwe Schindler
      2. LUCENE-4747.patch
        42 kB
        Robert Muir

        Issue Links

          Activity

          Hide
          Uwe Schindler added a comment -

          +1 for Java 7.

          I would open some issues to update syntax sugar and fix some reflection-based hacks (e.g. IOUtils.addSuppressed). We also need to update Constants.java and so on, reconfigure Policeman Jenkins JDK randomization for trunk jobs,...

          Show
          Uwe Schindler added a comment - +1 for Java 7. I would open some issues to update syntax sugar and fix some reflection-based hacks (e.g. IOUtils.addSuppressed). We also need to update Constants.java and so on, reconfigure Policeman Jenkins JDK randomization for trunk jobs,...
          Hide
          Simon Willnauer added a comment -

          +1

          Show
          Simon Willnauer added a comment - +1
          Hide
          Mark Miller added a comment -

          +1

          Show
          Mark Miller added a comment - +1
          Hide
          Adrien Grand added a comment -

          +1

          Show
          Adrien Grand added a comment - +1
          Hide
          Michael McCandless added a comment -

          +1

          Show
          Michael McCandless added a comment - +1
          Hide
          Robert Muir added a comment -

          An incomplete patch. just did a lot of the boilerplate stuff (and lots of searches thru the codebase for "java6", "java 6", "1.6") etc

          Show
          Robert Muir added a comment - An incomplete patch. just did a lot of the boilerplate stuff (and lots of searches thru the codebase for "java6", "java 6", "1.6") etc
          Hide
          Uwe Schindler added a comment -

          We have the first issue with FSDirectpry implementations that makes the move to Java 7 needed: LUCENE-4848

          I took this issue and will setup the basic Java 7 support with Robert's patch.

          Show
          Uwe Schindler added a comment - We have the first issue with FSDirectpry implementations that makes the move to Java 7 needed: LUCENE-4848 I took this issue and will setup the basic Java 7 support with Robert's patch.
          Hide
          Uwe Schindler added a comment -

          Updated patch (the build fails now when java 6 is used before even compiling). This is now possible by the new Java detection added in Lucene trunk/4.x after this issue was opened and the initial patch was submitted:

          BUILD FAILED
          C:\Users\Uwe Schindler\Projects\lucene\trunk-lusolr3\build.xml:249: The following error occurred while executing this line:
          C:\Users\Uwe Schindler\Projects\lucene\trunk-lusolr3\lucene\build.xml:23: The following error occurred while executing this line:
          C:\Users\Uwe Schindler\Projects\lucene\trunk-lusolr3\lucene\common-build.xml:285: Minimum supported Java version is 1.7.
          
          Total time: 0 seconds
          
          Show
          Uwe Schindler added a comment - Updated patch (the build fails now when java 6 is used before even compiling). This is now possible by the new Java detection added in Lucene trunk/4.x after this issue was opened and the initial patch was submitted: BUILD FAILED C:\Users\Uwe Schindler\Projects\lucene\trunk-lusolr3\build.xml:249: The following error occurred while executing this line: C:\Users\Uwe Schindler\Projects\lucene\trunk-lusolr3\lucene\build.xml:23: The following error occurred while executing this line: C:\Users\Uwe Schindler\Projects\lucene\trunk-lusolr3\lucene\common-build.xml:285: Minimum supported Java version is 1.7. Total time: 0 seconds
          Hide
          Uwe Schindler added a comment -

          I changed all Jenkins instances I had access to. Currently Simonw should disable the flonkins Java 6 Job for Lucene trunk.

          I will commit the patch soon!

          Show
          Uwe Schindler added a comment - I changed all Jenkins instances I had access to. Currently Simonw should disable the flonkins Java 6 Job for Lucene trunk. I will commit the patch soon!
          Hide
          Commit Tag Bot added a comment -

          [trunk commit] Uwe Schindler
          http://svn.apache.org/viewvc?view=revision&revision=1457734

          LUCENE-4747: Move to Java 7 in trunk

          Show
          Commit Tag Bot added a comment - [trunk commit] Uwe Schindler http://svn.apache.org/viewvc?view=revision&revision=1457734 LUCENE-4747 : Move to Java 7 in trunk
          Hide
          Commit Tag Bot added a comment -
          Show
          Commit Tag Bot added a comment - [trunk commit] Uwe Schindler http://svn.apache.org/viewvc?view=revision&revision=1457747 LUCENE-4747 : Fix nocommits
          Hide
          Commit Tag Bot added a comment -

          [trunk commit] Uwe Schindler
          http://svn.apache.org/viewvc?view=revision&revision=1457751

          LUCENE-4747: Remove reflection from IOUtils for supressing caughth Exceptions

          Show
          Commit Tag Bot added a comment - [trunk commit] Uwe Schindler http://svn.apache.org/viewvc?view=revision&revision=1457751 LUCENE-4747 : Remove reflection from IOUtils for supressing caughth Exceptions
          Hide
          Uwe Schindler added a comment -

          The move is done.

          Before resolving the issue I wanted the confirmation by Steven Rowe, if the Maven build is setup correctly (e.g. maven-enforcer-plugin,...).

          Show
          Uwe Schindler added a comment - The move is done. Before resolving the issue I wanted the confirmation by Steven Rowe, if the Maven build is setup correctly (e.g. maven-enforcer-plugin,...).
          Hide
          Uwe Schindler added a comment -

          I have to also investigate the "clover" build. The version of Clover we currently use is not compatible with Java 7, so we might need to upgrade.

          Show
          Uwe Schindler added a comment - I have to also investigate the "clover" build. The version of Clover we currently use is not compatible with Java 7, so we might need to upgrade.
          Hide
          Adrien Grand added a comment -

          Maybe we should fix all places that should use Integer.compare/Long.compare/... too?

          Show
          Adrien Grand added a comment - Maybe we should fix all places that should use Integer.compare/Long.compare/... too?
          Hide
          Uwe Schindler added a comment -

          +1, go ahead!

          Show
          Uwe Schindler added a comment - +1, go ahead!
          Hide
          Steve Rowe added a comment - - edited

          Before resolving the issue I wanted the confirmation by Steven Rowe, if the Maven build is setup correctly (e.g. maven-enforcer-plugin,...).

          Enforcer seems to work fine. forbiddenapis, compilation and enforcer all use the ${java.compat.version} property that you changed to 1.7, so I think the Maven build is all set.

          When I attempt mvn install with Java6, I see this:

          [WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireJavaVersion failed with message:
          Java 1.7+ is required.
          
          ...
          
          [INFO] ------------------------------------------------------------------------
          [INFO] BUILD FAILURE
          [INFO] ------------------------------------------------------------------------
          [INFO] Total time: 3.053s
          [INFO] Finished at: Mon Mar 18 10:21:11 EDT 2013
          [INFO] Final Memory: 17M/81M
          [INFO] ------------------------------------------------------------------------
          [ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.2:enforce (enforce-java-compat-version-and-maven-2.2.1) on project lucene-solr-grandparent: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [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/display/MAVEN/MojoExecutionException
          
          Show
          Steve Rowe added a comment - - edited Before resolving the issue I wanted the confirmation by Steven Rowe, if the Maven build is setup correctly (e.g. maven-enforcer-plugin,...). Enforcer seems to work fine. forbiddenapis, compilation and enforcer all use the ${java.compat.version } property that you changed to 1.7, so I think the Maven build is all set. When I attempt mvn install with Java6, I see this: [WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireJavaVersion failed with message: Java 1.7+ is required. ... [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.053s [INFO] Finished at: Mon Mar 18 10:21:11 EDT 2013 [INFO] Final Memory: 17M/81M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.2:enforce (enforce-java-compat-version-and-maven-2.2.1) on project lucene-solr-grandparent: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [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/display/MAVEN/MojoExecutionException
          Hide
          Uwe Schindler added a comment -

          Thanks!
          I'll close this issue now and we should open followup issues for the remaining tasks.

          Show
          Uwe Schindler added a comment - Thanks! I'll close this issue now and we should open followup issues for the remaining tasks.

            People

            • Assignee:
              Uwe Schindler
              Reporter:
              Robert Muir
            • Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development