Lucene - Core
  1. Lucene - Core
  2. LUCENE-4758

'ant jar', 'ant compile' and 'ant compile-test' should recurse

    Details

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

      Description

      Right now, 'ant compile' at the top level compiles Lucene core, all non-test Solr sources, and all Lucene modules on which Solr depends. lucene/codecs/, e.g., doesn't get compiled, because 'ant compile' is an alias for 'ant compile-core' under lucene/.

      Similarly for 'ant jar' (except there is no top-level target for this right now), with some problems under solr/.

      There is no top-level 'ant compile-test'.

      All these targets should recurse at all levels.

      Under lucene/ and solr/, 'ant jar-core' and 'ant compile-core' should be aliased to running the operation under core/.

      1. LUCENE-4758.patch
        8 kB
        Steve Rowe
      2. LUCENE-4758.patch
        5 kB
        Steve Rowe

        Activity

        Hide
        Robert Muir added a comment -

        +1, man is this confusing.

        It should be dead simple to compile all the code and make jars for lucene. compile in /lucene/ should NOT be a alias for compile-core (imo), instead it should recurse across all modules. Same with jar (not an alias for jar-core).

        Separately the confusion a user has when they run 'ant -p' (e.g. from lucene): there is a huge list of targets but which one should i use to just compile stuff or make jars? some of these should probably be hidden (separate issue: LUCENE-4416). But we can fix this separately of course!

        Show
        Robert Muir added a comment - +1, man is this confusing. It should be dead simple to compile all the code and make jars for lucene. compile in /lucene/ should NOT be a alias for compile-core (imo), instead it should recurse across all modules. Same with jar (not an alias for jar-core). Separately the confusion a user has when they run 'ant -p' (e.g. from lucene): there is a huge list of targets but which one should i use to just compile stuff or make jars? some of these should probably be hidden (separate issue: LUCENE-4416 ). But we can fix this separately of course!
        Hide
        Steve Rowe added a comment -

        Patch.

        Show
        Steve Rowe added a comment - Patch.
        Hide
        Robert Muir added a comment -

        In the new lucene/build.xml in the patch, does 'compile' actually compile test-framework?

        the 'jar' target seems more clear that everything is jar'ed (including test-framework)

        Show
        Robert Muir added a comment - In the new lucene/build.xml in the patch, does 'compile' actually compile test-framework? the 'jar' target seems more clear that everything is jar'ed (including test-framework)
        Hide
        Steve Rowe added a comment -

        In the new lucene/build.xml in the patch, does 'compile' actually compile test-framework?

        No, it doesn't. I intentionally left it out - it seems pretty clear to me that test-framework belongs in the same bucket as */src/test/**, which gets compiled via 'ant compile-test'. (I should go test that assumption ).

        the 'jar' target seems more clear that everything is jar'ed (including test-framework)

        Yeah, test-framework jar is externally consumable, so excluding it from 'ant jar' seemed wrong.

        Show
        Steve Rowe added a comment - In the new lucene/build.xml in the patch, does 'compile' actually compile test-framework? No, it doesn't. I intentionally left it out - it seems pretty clear to me that test-framework belongs in the same bucket as */src/test/** , which gets compiled via 'ant compile-test'. (I should go test that assumption ). the 'jar' target seems more clear that everything is jar'ed (including test-framework) Yeah, test-framework jar is externally consumable, so excluding it from 'ant jar' seemed wrong.
        Hide
        Robert Muir added a comment -

        OK: in any case I just wanted to make sure it was intentional. Maybe just add a comment?

        +1 to commit this though.

        Show
        Robert Muir added a comment - OK: in any case I just wanted to make sure it was intentional. Maybe just add a comment? +1 to commit this though.
        Hide
        Steve Rowe added a comment -

        [...] test-framework belongs in the same bucket as */src/test/**, which gets compiled via 'ant compile-test'. (I should go test that assumption )

        'ant compile-test' under lucene/ recurses properly, and triggers compilation of test-framework; similarly under solr/. But there is no top-level 'ant compile-test'. I'll add it.

        OK: in any case I just wanted to make sure it was intentional. Maybe just add a comment?

        Good idea, I'll do that.

        Show
        Steve Rowe added a comment - [...] test-framework belongs in the same bucket as */src/test/** , which gets compiled via 'ant compile-test'. (I should go test that assumption ) 'ant compile-test' under lucene/ recurses properly, and triggers compilation of test-framework; similarly under solr/. But there is no top-level 'ant compile-test'. I'll add it. OK: in any case I just wanted to make sure it was intentional. Maybe just add a comment? Good idea, I'll do that.
        Hide
        Steve Rowe added a comment -

        Patch: 'ant compile-test' enabled at top-level; and comments added above 'compile' targets noting test-framework(s) compilation exclusion.

        Committing shortly.

        Show
        Steve Rowe added a comment - Patch: 'ant compile-test' enabled at top-level; and comments added above 'compile' targets noting test-framework(s) compilation exclusion. Committing shortly.
        Hide
        Commit Tag Bot added a comment -

        [trunk commit] Steven Rowe
        http://svn.apache.org/viewvc?view=revision&revision=1443094

        LUCENE-4758: 'ant jar', 'ant compile' and 'ant compile-test' should recurse

        Show
        Commit Tag Bot added a comment - [trunk commit] Steven Rowe http://svn.apache.org/viewvc?view=revision&revision=1443094 LUCENE-4758 : 'ant jar', 'ant compile' and 'ant compile-test' should recurse
        Hide
        Steve Rowe added a comment -

        Committed to trunk and branch_4x.

        Thanks for the review Robert!

        Show
        Steve Rowe added a comment - Committed to trunk and branch_4x. Thanks for the review Robert!
        Hide
        Commit Tag Bot added a comment -

        [branch_4x commit] Steven Rowe
        http://svn.apache.org/viewvc?view=revision&revision=1443110

        LUCENE-4758: 'ant jar', 'ant compile' and 'ant compile-test' should recurse (merged trunk r1443094)

        Show
        Commit Tag Bot added a comment - [branch_4x commit] Steven Rowe http://svn.apache.org/viewvc?view=revision&revision=1443110 LUCENE-4758 : 'ant jar', 'ant compile' and 'ant compile-test' should recurse (merged trunk r1443094)
        Hide
        Uwe Schindler added a comment -

        Closed after release.

        Show
        Uwe Schindler added a comment - Closed after release.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development