Thanks,
I've tried that with no success :( I've added file named
org.apache.tika.parser.Parser to META-INF/services. It only
contains org.apache.tika.parser.xml.myParser and build the jar. Should java
-jar tika-app.jar -list-parsers list it?

 What about my custom-mimetypes.xml?

On Thu, Jan 5, 2012 at 1:54 PM, Uwe Schindler <[email protected]> wrote:

> Hi,****
>
> ** **
>
> Add a service provider file in META-INF/services in your own jar. This
> file would be named like tika’s own, but only list your parser. SPI (the
> technique behind the whole META-INF/services) is collecting all those files
> in the classpath and make all parsers listed in them available.****
>
> ** **
>
> The same happens in Lucene 4.0 (not yet released), it will make it
> possible to plug in any indexing codec just by providing the JAR file with
> the correct SPI metadata.****
>
> ** **
>
> -----****
>
> Uwe Schindler****
>
> H.-H.-Meier-Allee 63, D-28213 Bremen****
>
> http://www.thetaphi.de****
>
> eMail: [email protected]****
>
> ** **
>
> *From:* ola nowak [mailto:[email protected]]
> *Sent:* Thursday, January 05, 2012 1:47 PM
> *To:* [email protected]
> *Subject:* External parser in a jar file****
>
> ** **
>
>  Hi,
> I've created an external parser. I added some classes to
> org.apache.tika.parser.xml package and listed my parser in
> tika-parsers/src/main/resources/META-INF/services/org.apache.tika.parser.Parser
> file and my custom mime type in custom-mimetypes.xml. I builded all and it
> works :)
> Now I have a question if there is a posibility to tell tika to use this
> parser without messing in its sources? I'll be using it in Solr, so I would
> like just to use orginal tika's jars and probably some jar with my classes.
> Is this even possible?
> Regards,
> Alex****
>

Reply via email to