lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Male <gento...@gmail.com>
Subject Re: Output class folders (Eclipse).
Date Wed, 01 Aug 2012 10:20:33 GMT
Couldn't we classpath scan ourselves and detect services rather than
generating the file?

On Wed, Aug 1, 2012 at 10:13 PM, Uwe Schindler <uwe@thetaphi.de> wrote:

> That's Kohsukes Annotation processor:
> http://weblogs.java.net/blog/kohsuke/archive/2009/03/my_project_of_t.html
>
> -----
> Uwe Schindler
> H.-H.-Meier-Allee 63, D-28213 Bremen
> http://www.thetaphi.de
> eMail: uwe@thetaphi.de
>
>
> > -----Original Message-----
> > From: Uwe Schindler [mailto:uwe@thetaphi.de]
> > Sent: Wednesday, August 01, 2012 12:07 PM
> > To: dev@lucene.apache.org
> > Subject: RE: Output class folders (Eclipse).
> >
> > That is unfortunately needed because of SPI. The problem is: If eclipse
> copies
> > all files to one folder, then all META-INF/services/ files that are in
> more than
> > one module will overwrite each other. This is only solvable maybe at a
> later
> > stage, when we will create META-INF files using a javac annotation
> processor
> > (in that case, Eclipse would create one merged META-INF file for all
> modules).
> >
> > I have not yet opened an issue, but the SPI file creation for analyzers
> is error
> > prone (it's easy to miss a new factory), so the idea is to automate
> this. Either:
> > - Each codec or analyzer factory gets a compile-only annotation and a
> javac
> > annotation processor will put the class name into META-INF (that would
> solve
> > the Eclipse issue). There are 2 packages available that can do this
> (itself loaded
> > by SPI into javac/eclipse, haha): One from Jenkin's Kohsuke and another
> one.
> > The downside is: You have to mark each Codec/Postigsformat/Analysis
> Factory
> > with an annotation: @Provider or similar
> > - The 2nd option: Use ASM to find all classes in output folder that
> extend a base
> > class (e.g., Codec) or interface and generate META-INF/services/oal.Codec
> > files. Downside: Would not work with eclipse at all, as it must be run
> by ANT.
> >
> > Uwe
> >
> > -----
> > Uwe Schindler
> > H.-H.-Meier-Allee 63, D-28213 Bremen
> > http://www.thetaphi.de
> > eMail: uwe@thetaphi.de
> >
> >
> > > -----Original Message-----
> > > From: Dawid Weiss [mailto:dawid.weiss@gmail.com]
> > > Sent: Wednesday, August 01, 2012 11:56 AM
> > > To: dev@lucene.apache.org
> > > Subject: Output class folders (Eclipse).
> > >
> > > The template file separates output folders for class files into many
> > > bin.* folders at the root level:
> > >
> > > output="bin.analysis-kuromoji"
> > >
> > > Is this intentional? It's annoying, I'd rather move it under one
> > > folder or even put it into a single folder (since at Eclipse level
> > > there's no distinction of modules anyway).
> > >
> > > Dawid
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For
> > > additional commands, e-mail: dev-help@lucene.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional
> > commands, e-mail: dev-help@lucene.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>


-- 
Chris Male | Open Source Search Developer | elasticsearch |
www.e<http://www.dutchworks.nl>
lasticsearch.com

Mime
View raw message