Lucene - Core
  1. Lucene - Core
  2. LUCENE-5249

All Lucene/Solr modules should use the same dependency versions

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.6, 6.0
    • Component/s: general/build
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      Mark Miller wrote on the dev list:

      I'd like it for some things if we actually kept the versions somewhere else - for instance, Hadoop dependencies should match across the mr module and the core module.

      Perhaps we could define versions for dependencies across multiple modules that should probably match, in a prop file or ant file and use sys sub for them in the ivy files.

      For something like Hadoop, that would also make it simple to use Hadoop 1 rather than 2 with a single sys prop override. Same with some other depenencies.

        Issue Links

          Activity

          Hide
          Steve Rowe added a comment -

          Patch implementing the idea.

          Introduces lucene/ivy-versions.properties, included in lucene/ivy-settings.xml, where all dependency versions are stored as properties of the form: /org/name = rev, e.g. /commons-io/commons-io = 2.1. There are two shared revs: jetty.version and hadoop.version, which are included in and interpolated as revs in lucene/ivy-versions.properties.

          I thought about using Maven coordinate-style syntax, with a colon between the dependency's org and its name, but colons have to be escaped in property file syntax, since the colon a metachar equivalent to '=', so it looked clunky. The path-ish slash style works everywhere I tried it, including as cmdline sysprops. And it provides a sort of namespace for these properties.

          I also switched to loading lucene/ivy-versions.properties in the -check-forbidden-java-apis target in solr/build.xml, to access the commons-io:commons-io version, used in locating the appropriate definitions file.

          This patch also effectively upgrades the httpcomponents dependencies in the lucene/replicator module to the versions used in Solr; the required checksums are swapped in under lucene/licenses/.

          ant precommit and ant test both pass after I rm $(find . -name '*.jar').

          I'll commit in a day or so if there are no objections.

          Show
          Steve Rowe added a comment - Patch implementing the idea. Introduces lucene/ivy-versions.properties , included in lucene/ivy-settings.xml , where all dependency versions are stored as properties of the form: /org/name = rev , e.g. /commons-io/commons-io = 2.1 . There are two shared revs: jetty.version and hadoop.version , which are included in and interpolated as revs in lucene/ivy-versions.properties . I thought about using Maven coordinate-style syntax, with a colon between the dependency's org and its name, but colons have to be escaped in property file syntax, since the colon a metachar equivalent to '=', so it looked clunky. The path-ish slash style works everywhere I tried it, including as cmdline sysprops. And it provides a sort of namespace for these properties. I also switched to loading lucene/ivy-versions.properties in the -check-forbidden-java-apis target in solr/build.xml , to access the commons-io:commons-io version, used in locating the appropriate definitions file. This patch also effectively upgrades the httpcomponents dependencies in the lucene/replicator module to the versions used in Solr; the required checksums are swapped in under lucene/licenses/ . ant precommit and ant test both pass after I rm $(find . -name '*.jar') . I'll commit in a day or so if there are no objections.
          Hide
          Robert Muir added a comment -

          +1 I like it, seems like it would prevent lots of mistakes

          Show
          Robert Muir added a comment - +1 I like it, seems like it would prevent lots of mistakes
          Hide
          ASF subversion and git services added a comment -

          Commit 1528215 from Steve Rowe in branch 'dev/trunk'
          [ https://svn.apache.org/r1528215 ]

          LUCENE-5249: All Lucene/Solr modules should use the same dependency versions

          Show
          ASF subversion and git services added a comment - Commit 1528215 from Steve Rowe in branch 'dev/trunk' [ https://svn.apache.org/r1528215 ] LUCENE-5249 : All Lucene/Solr modules should use the same dependency versions
          Hide
          ASF subversion and git services added a comment -

          Commit 1528222 from Steve Rowe in branch 'dev/branches/branch_4x'
          [ https://svn.apache.org/r1528222 ]

          LUCENE-5249: All Lucene/Solr modules should use the same dependency versions (merged trunk r1528215)

          Show
          ASF subversion and git services added a comment - Commit 1528222 from Steve Rowe in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1528222 ] LUCENE-5249 : All Lucene/Solr modules should use the same dependency versions (merged trunk r1528215)
          Hide
          Steve Rowe added a comment -

          Committed to trunk and branch_4x.

          Show
          Steve Rowe added a comment - Committed to trunk and branch_4x.
          Hide
          ASF subversion and git services added a comment -

          Commit 1529249 from Steve Rowe in branch 'dev/trunk'
          [ https://svn.apache.org/r1529249 ]

          LUCENE-5257: merge CHANGES.txt entry with LUCENE-5249's entry

          Show
          ASF subversion and git services added a comment - Commit 1529249 from Steve Rowe in branch 'dev/trunk' [ https://svn.apache.org/r1529249 ] LUCENE-5257 : merge CHANGES.txt entry with LUCENE-5249 's entry
          Hide
          ASF subversion and git services added a comment -

          Commit 1529250 from Steve Rowe in branch 'dev/branches/branch_4x'
          [ https://svn.apache.org/r1529250 ]

          LUCENE-5257: merge CHANGES.txt entry with LUCENE-5249's entry (merged trunk r1529249)

          Show
          ASF subversion and git services added a comment - Commit 1529250 from Steve Rowe in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1529250 ] LUCENE-5257 : merge CHANGES.txt entry with LUCENE-5249 's entry (merged trunk r1529249)

            People

            • Assignee:
              Steve Rowe
              Reporter:
              Steve Rowe
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development