lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <>
Subject RE: Output class folders (Eclipse).
Date Wed, 01 Aug 2012 10:06:47 GMT
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 Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen

> -----Original Message-----
> From: Dawid Weiss []
> Sent: Wednesday, August 01, 2012 11:56 AM
> To:
> 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: For additional
> commands, e-mail:

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

View raw message