You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Debbie Zhang <de...@gmail.com> on 2014/04/09 11:29:56 UTC

Incude third party libraries in a PEAR file

Hi,

I would like to ask the best way to include third party libraries in a PEAR
file. If I don't include the .jar files when I generate a PEAR file, I will
get NoClassDefFound exception unless I add the .jar files in the classpath.
If I put the .jar files to the lib folder of UIMA structure, I get
java.lang.reflect.InvocationTargetException when I generate the PEAR file.
Therefore, I want to know how to include third party libraries in a PEAR
file so I don't have the above problems. Thank you.

Regards,

Debbie


Re: Incude third party libraries in a PEAR file

Posted by Jens Grivolla <j+...@grivolla.net>.
Hi Debbie,

putting the .jar files in the lib folder of your annotator project is the
right way to go (or alternatively including them as maven dependencies).

Are you saying that you can generate a PEAR file when lib/ is empty, but
get InvocationTargetException when there is any file in lib/? How do you
manage to compile your own annotator without having the dependencies in
lib/?

If you put your project somewhere for download, I may be able to take a
look (although I can't promise anything)...

Best,
Jens


On Wed, Apr 9, 2014 at 11:29 AM, Debbie Zhang <de...@gmail.com>wrote:

> Hi,
>
> I would like to ask the best way to include third party libraries in a PEAR
> file. If I don't include the .jar files when I generate a PEAR file, I will
> get NoClassDefFound exception unless I add the .jar files in the classpath.
> If I put the .jar files to the lib folder of UIMA structure, I get
> java.lang.reflect.InvocationTargetException when I generate the PEAR file.
> Therefore, I want to know how to include third party libraries in a PEAR
> file so I don't have the above problems. Thank you.
>
> Regards,
>
> Debbie
>
>