Solr
  1. Solr
  2. SOLR-3725

package-local-src-tgz target is pulling in non-source jars, dist/** and package/**

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0-ALPHA
    • Fix Version/s: 4.0, 6.0
    • Component/s: Build
    • Labels:
      None

      Description

      package-local-src-tgz generates a 141M archive which contains a bunch of non-source jars:

      tar tfz apache-solr-4.0-SNAPSHOT-src.tgz  | grep -E '(war|jar)$' | wc -l
      134
      

      It looks like we're expecting dist/** and package/** to be excluded:

      <tarfileset dir="." prefix="${fullnamever}/solr"
                          excludes="build ${package.dir}/** ${dist}/**
                                   example/webapps/*.war example/exampledocs/post.jar
                                   lib/README.committers.txt **/data/ **/logs/*
                                   **/*.sh **/bin/ scripts/
                                   .idea/ **/*.iml **/pom.xml" />
      

      The issue is that package.dir and dist refer to absolute paths; excludes assumes relative paths.

      It's also pulling in all the contrib/**/lib/ and example/lib/ jars.

      1. SOLR-3725.patch
        2 kB
        Michael Dodsworth

        Activity

        Hide
        Michael Dodsworth added a comment -

        it's also including everything from solr/build and solr/lib/

        Show
        Michael Dodsworth added a comment - it's also including everything from solr/build and solr/lib/
        Hide
        Michael Dodsworth added a comment -

        generated archive is now 31M

        Show
        Michael Dodsworth added a comment - generated archive is now 31M
        Hide
        Robert Muir added a comment -

        Thanks Michael! I ran package-src-tgz versus package-local-src-tgz a few times and compared the file list in the tar output,
        actually it should be 30M but includes some unnecessary .jars. I iterated until these were equal, and came up with this simpler
        pattern for the .jars

        -                  excludes="build ${package.dir}/** ${dist}/**
        -                            example/webapps/*.war example/exampledocs/post.jar
        +                  excludes="build/** ${package.dir.rel}/** ${dist.rel}/**
        +                            example/webapps/*.war example/lib/**
        +                            **/*.jar 
        

        I'll commit your patch soon (with this tweak).

        Show
        Robert Muir added a comment - Thanks Michael! I ran package-src-tgz versus package-local-src-tgz a few times and compared the file list in the tar output, actually it should be 30M but includes some unnecessary .jars. I iterated until these were equal, and came up with this simpler pattern for the .jars - excludes="build ${package.dir}/** ${dist}/** - example/webapps/*.war example/exampledocs/post.jar + excludes="build/** ${package.dir.rel}/** ${dist.rel}/** + example/webapps/*.war example/lib/** + **/*.jar I'll commit your patch soon (with this tweak).
        Hide
        Michael Dodsworth added a comment -

        Excellent. Thanks, Robert.

        Show
        Michael Dodsworth added a comment - Excellent. Thanks, Robert.
        Hide
        Commit Tag Bot added a comment -

        [trunk commit] Erik Hatcher
        http://svn.apache.org/viewvc?view=revision&revision=1426716

        SOLR-3725: Relocate the example mime-to-extension mapping, and upgrade Velocity Engine to 1.7

        Show
        Commit Tag Bot added a comment - [trunk commit] Erik Hatcher http://svn.apache.org/viewvc?view=revision&revision=1426716 SOLR-3725 : Relocate the example mime-to-extension mapping, and upgrade Velocity Engine to 1.7
        Hide
        Commit Tag Bot added a comment -

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

        SOLR-3725: Update velocity also in Maven

        Show
        Commit Tag Bot added a comment - [trunk commit] Uwe Schindler http://svn.apache.org/viewvc?view=revision&revision=1426839 SOLR-3725 : Update velocity also in Maven
        Hide
        Uwe Schindler added a comment -

        Closed after release.

        Show
        Uwe Schindler added a comment - Closed after release.

          People

          • Assignee:
            Unassigned
            Reporter:
            Michael Dodsworth
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development