lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: [GUMP@brutus]: Project lucene-java (in module lucene-java) failed
Date Tue, 10 May 2005 13:10:59 GMT
On Tue, 10 May 2005, Erik Hatcher <erik@ehatchersolutions.com> wrote:

> I can (and probably will) change it such that <jjdoc> is not run if
> JavaCC is not present and adjust it so that the check for JavaCC is
> only done on the targets that truly need it (but are not part of the
> main build path).

This may be tricky, given the way the task works.

The task checks whether it finds javacc.jar or JavaCC.zip in a
specific location relative to the javacchome attribute.  In Gump you
can't trust this alone since Gump will make Ant ignore the internal
classpath of the task.

Given that there really is a lot of convulted logic involved because
the task supports four different versions with three different
classnames and three different archive locations (and no, there is no
one to one mapping of classname to archive location), you are probably
best of creating a condition yourself.

The <available> logic would be something like

<or>
  <and>
    <!-- JavaCC 1.x or 2.x -->
    <or>
      <available file="${javacchome}/JavaCC.zip"/>
      <available file="${javacchome}/bin/lib/JavaCC.zip"/>
    </or>
    <available classname="COM.sun.labs.jjdoc.JJDocMain">
      <classpath>
        <pathelement location="${javacchome}/JavaCC.zip"/>
        <pathelement location="${javacchome}/bin/lib/JavaCC.zip"/>
      </classpath>
    </available>
  </and>
  <and>
    <!-- JavaCC 3.x -->
    <or>
      <available file="${javacchome}/bin/lib/javacc.jar"/>
      <!-- JPackage RPM of 3.x -->
      <available file="${javacchome}/javacc.jar"/>
    </or>
    <or>
      <!-- JavaCC 3.0 -->
      <available classname="org.netbeans.javacc.jjdoc.JJDocMain">
        <classpath>
          <pathelement location="${javacchome}/bin/lib/javacc.jar"/>
          <pathelement location="${javacchome}/javacc.jar"/>
        </classpath>
      </available>
      <!-- JavaCC 3.1 -->
      <available classname="org.javacc.jjdoc.JJDocMain">
        <classpath>
          <pathelement location="${javacchome}/bin/lib/javacc.jar"/>
          <pathelement location="${javacchome}/javacc.jar"/>
        </classpath>
      </available>
    </or>
  </and>
</or>

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message