Hello, Jens!
In order to solve the problem, I've created a bash script named
executor.bat where I've added the following lines:
@set UIMA_CLASSPATH=%UIMA_CLASSPATH%; <path_to_my_third_party_libraries>
deployAsyncService.cmd <my_deployment_descriptor_for_as.xml>
I've put this script in a folder my_project/deploy/as/ and then I've set up
the <path_to_my_third_party_libraries>
with the relatives paths to the lib and bin folders of the project:
i.e.
@set UIMA_CLASSPATH=%UIMA_CLASSPATH%;../../lib;../../bin
The structure of the project after installing the pear file will look like
this:
installed
I
I-uima-pipeline
I-bin
I-deploy
I-as
I-executor.bat (from here we will execute the script)
I-lib
I-third_party_library.jar
I-descriptors
I-metadata
I-resources
I don't know that the above is a solution, but it worked for me.
Therefore, I have the following question:
How can I use the variables set up in install.xml and setenv.txt in my
executor.bat script?
I'll look forward for your answer,
Thank you.
Regards,
Florin
On Tue, Nov 15, 2011 at 4:21 PM, Jens Grivolla <[email protected]> wrote:
> On 11/15/2011 02:55 PM, Spico Florin wrote:
>
>> Hello!
>> I have an UIMA AS application that is using third party libraries. I
>> would like to know the following:
>> 1. Where (location) we can add these third libraries such that the
>> deployed application to be aware of them and not throwing
>> "ClassNotFoundException"?
>> A brute force solution for me, was to add them directly in the UIMA AS
>> "lib/" folder, but this solution was just for testing and is not
>> acceptable
>> in production.
>> 2. How can be set up this third party libraries when generating PEAR file
>> in a such a way that deploying the application will consider them and
>> won't
>> be necessary to manually add them to the classpath?
>>
>
> UIMA AS doesn't directly support PEAR files. You will have to install the
> pear and set the classpath when you deploy it to UIMA AS.
>
> Where to put libraries so they will be correctly referenced in the PEAR
> (i.e. they are included in the install.xml and setenv.txt) depends on how
> you build the PEAR. You may need to include the libraries in your Eclipse
> build path, or put them in a directory that your Maven configuration
> includes when building the PEAR.
>
> HTH,
> Jens
>
>