Lucene - Core
  1. Lucene - Core
  2. LUCENE-717

src builds fail because of no "lib" directory

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: None
    • Component/s: core/other
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      I just downloaded http://mirrors.ibiblio.org/pub/mirrors/apache/lucene/java/lucene-2.0.0-src.tar.gz and noticed that you can't compile and run the tests from that src build because it doesn't inlcude the lib dir (and the build file won't attempt to make it if it doesn't exist) ...

      hossman@coaster:~/tmp/l2$ tar -xzvf lucene-2.0.0-src.tar.gz
      ...
      hossman@coaster:~/tmp/l2$ cd lucene-2.0.0/
      hossman@coaster:~/tmp/l2/lucene-2.0.0$ ant test
      ...
      test:
      [mkdir] Created dir: /home/hossman/tmp/l2/lucene-2.0.0/build/test

      BUILD FAILED
      /home/hossman/tmp/l2/lucene-2.0.0/common-build.xml:169: /home/hossman/tmp/l2/lucene-2.0.0/lib not found.

      (it's refrenced in junit.classpath, but i'm not relaly sure why)

        Issue Links

          Activity

          Hoss Man created issue -
          Hide
          Doron Cohen added a comment -

          That's because junit,jar is required for compiling and running the tests.
          (Guess we can't distribute junit.jar with Lucene.)

          This is from the commn-build.xml:
          ##################################################################
          JUnit not found.
          Please make sure junit.jar is in ANT_HOME/lib, or made available
          to Ant using other mechanisms like -lib or CLASSPATH.
          ##################################################################

          Show
          Doron Cohen added a comment - That's because junit,jar is required for compiling and running the tests. (Guess we can't distribute junit.jar with Lucene.) This is from the commn-build.xml: ################################################################## JUnit not found. Please make sure junit.jar is in ANT_HOME/lib, or made available to Ant using other mechanisms like -lib or CLASSPATH. ##################################################################
          Hide
          Hoss Man added a comment -

          I don't really see what that has to do with it ... I'm not talking about the ANT_HOME/lib, I'm talking about the "lib" directory directly under the root directory you get when checking out hte lucene "trunk" ...

          http://svn.apache.org/viewvc/lucene/java/trunk/lib/

          ...it's empty, and doesn't get included in the source tar balls, but the junit.classpath refrences it, so the build fails if it doesn't exist.

          we should either eliminate it if it's not needed, or include it in the tar balls if we want to leave it as a placeholder for things that may come in the future.

          Show
          Hoss Man added a comment - I don't really see what that has to do with it ... I'm not talking about the ANT_HOME/lib, I'm talking about the "lib" directory directly under the root directory you get when checking out hte lucene "trunk" ... http://svn.apache.org/viewvc/lucene/java/trunk/lib/ ...it's empty, and doesn't get included in the source tar balls, but the junit.classpath refrences it, so the build fails if it doesn't exist. we should either eliminate it if it's not needed, or include it in the tar balls if we want to leave it as a placeholder for things that may come in the future.
          Hide
          Doron Cohen added a comment -

          ...right...

          Mixed up the two because building Lucene with IDE felt wrong to point the IDE to the ant directories for junit.jar, so I placed it under Lucene's lib.

          Anyhow, if lib is to be kept, but not wishing to pack an empty dir, "compile-test" could create it if it does not already exist.

          Show
          Doron Cohen added a comment - ...right... Mixed up the two because building Lucene with IDE felt wrong to point the IDE to the ant directories for junit.jar, so I placed it under Lucene's lib. Anyhow, if lib is to be kept, but not wishing to pack an empty dir, "compile-test" could create it if it does not already exist.
          Hide
          Doron Cohen added a comment -

          "compile-test" target verifies that a lib dir exists.

          Show
          Doron Cohen added a comment - "compile-test" target verifies that a lib dir exists.
          Doron Cohen made changes -
          Field Original Value New Value
          Attachment common-build.xml.patch.txt [ 12345862 ]
          Doron Cohen made changes -
          Lucene Fields [New] [New, Patch Available]
          Hide
          Otis Gospodnetic added a comment -

          I almost committed this, but.... I'm for rm -rfing that lib dir and fixing junit.classpath, since we don't need it, instead of just mkdiring it, just to make the build pass.

          Something like this:
          Index: build.xml
          ===================================================================
          — build.xml (revision 479793)
          +++ build.xml (working copy)
          @@ -32,9 +32,11 @@
          <pathelement location="$

          {build.dir}/classes/test"/>
          <pathelement location="${build.dir}

          /classes/java"/>
          <pathelement location="$

          {build.dir}

          /classes/demo"/>
          + <!--
          <fileset dir="lib">
          <include name="*.jar"/>
          </fileset>
          + -->
          <pathelement path="$

          {java.class.path}

          "/>
          </path>

          Show
          Otis Gospodnetic added a comment - I almost committed this, but.... I'm for rm -rfing that lib dir and fixing junit.classpath, since we don't need it, instead of just mkdiring it, just to make the build pass. Something like this: Index: build.xml =================================================================== — build.xml (revision 479793) +++ build.xml (working copy) @@ -32,9 +32,11 @@ <pathelement location="$ {build.dir}/classes/test"/> <pathelement location="${build.dir} /classes/java"/> <pathelement location="$ {build.dir} /classes/demo"/> + <!-- <fileset dir="lib"> <include name="*.jar"/> </fileset> + --> <pathelement path="$ {java.class.path} "/> </path>
          Hide
          Doron Cohen added a comment -

          I'm ok with this...

          Show
          Doron Cohen added a comment - I'm ok with this...
          Otis Gospodnetic committed 480191 (2 files)
          Reviews: none

          - LUCENE-717: Avoid build failure when (unused) lib directory does not exist

          Hide
          Otis Gospodnetic added a comment -

          Fixed by removing a few lines from build.xml that check for lib/*.jar.
          I left the directory in CVS for now. Should I svn remove it, or is there a reason to keep it?

          Show
          Otis Gospodnetic added a comment - Fixed by removing a few lines from build.xml that check for lib/*.jar. I left the directory in CVS for now. Should I svn remove it, or is there a reason to keep it?
          Otis Gospodnetic made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          Hoss Man made changes -
          Link This issue is duplicated by LUCENE-787 [ LUCENE-787 ]
          Mark Thomas made changes -
          Workflow jira [ 12389898 ] Default workflow, editable Closed status [ 12562446 ]
          Mark Thomas made changes -
          Workflow Default workflow, editable Closed status [ 12562446 ] jira [ 12583423 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Hoss Man
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development