lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Quail <>
Subject Re: two versioning problems with Lucene
Date Wed, 08 Dec 2004 02:41:49 GMT
>> (1) the manifest file may not be available (the class files may be
>> re-packaged in another app which didn't know to copy the Lucene
>> manifest stuff, or unpacked)
> I'd like to hear others weigh in on this repackaging issue.  Is this a 
> common practice?

There is one area where this is very common practice: Java WebStart.

WebStart (in certain configurations) requires .jars to be signed. I have
in the past either a) just signed 3rdparty jars myself, or b) included
contents of 3rd party jars into my own .jar (easy to do in ant), and
then just sign my jar.

Also, in this code:
>  String url = ClassLoader.getSystemClassLoader().getResource("org/apache/lucene/util/Constants.class").toExternalForm();
>  if (url.startsWith("jar:")) {
>     URI u = new URI(url.substring(4, url.indexOf("!")));

This basically fails if lucene is not in a classloader that "describes"
its url using the jar: protocol. This can happen quite often (various
J2EE contains do funny things with classloaders, etc).

My 2c is to use a org.apache.lucene.VERSION class as described by Bill
Janssen (but I would spell it Version, or better LuceneVersion). (And I
would change the canWorkWith() to take a Directory as well as a File?)

It is easy enough to get Ant to inject version numbers into code (I can
help hack this up if necessary).


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message