You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by Jay Jarman <ja...@va.gov> on 2010/02/09 17:22:05 UTC

Creating PEAR Files

I have a component I have created and need to create a PEAR in order to deploy
it to some other people.  This component basically wraps a Java component.  I
want to deploy the Java component's JAR file with the PEAR so I put the JAR in
the lib directory of my UIMA component.  I have added the UIMA nature (using
eclipse) like the directions say.  When I generate the PEAR file it doesn't
include the JAR file.  I can see the JAR file in the directory using Windows
Explorer but I can't see the JAR file in the directory in Eclipse.  How do I add
a JAR file to PEAR?  Do I need to use Eclipse somehow to add the JAR to the lib
directory rather than Windows Explorer?


Re: Creating PEAR Files

Posted by Jay Jarman <ja...@va.gov>.
Pablo Duboue <pa...@...> writes:

> 
> Have you tried refreshing the folder from within eclipse? (F5 keybinding)

I did that and that fixed my problem.  Now I have a new problem.

My AE has a parameter which is a relative file path "/resources/lookup
/mytext.txt"

I use the following two lines of code to get the absolute filename to pass to a
method:

   phrasesFile = (String) uimaContext.getConfigParameterValue(PHRASES_FILE);
   phrasesFile = getClass().getResource(phrasesFile).getFile();

This works fine as long as I have the annotators folder in the classpath for the
CPE manager when I run it.

I created a PEAR and deploy it to another machine and get an error on the first
line of code above.  It says it successfully deployed the annotator and when I
look at it in Window Explorer, everything is in the proper place.  It seems kind
of kluggy that I would have to add to the classpath of the PEAR Installer in
order to install an AE.  Is there a way to get rid of the errors when it
installs the PEAR?  Or a way to turn off it trying to run the initialize method
of my AE when installing the PEAR?



Re: Creating PEAR Files

Posted by Pablo Duboue <pa...@gmail.com>.
Have you tried refreshing the folder from within eclipse? (F5 keybinding)

Re: Creating PEAR Files

Posted by Jay Jarman <ja...@va.gov>.
> 
> Do you mean, the generated PEAR file, after you "install" it (which
> unzips it), does not have the Jar in the <install-directory>/lib/ ?

That's exactly what I mean.  The lib directory isn't created by the PEAR process.

> > I can see the JAR file in the directory using Windows
> > Explorer
> 
> Which directory do you see it in? 

When I use Windows Explorer, it is in the lib directory 


Jay




Re: Creating PEAR Files

Posted by Marshall Schor <ms...@schor.com>.
Jay Jarman wrote:
> I have a component I have created and need to create a PEAR in order to deploy
> it to some other people.  This component basically wraps a Java component.  I
> want to deploy the Java component's JAR file with the PEAR so I put the JAR in
> the lib directory of my UIMA component.  I have added the UIMA nature (using
> eclipse) like the directions say.  When I generate the PEAR file it doesn't
> include the JAR file.  

Do you mean, the generated PEAR file, after you "install" it (which
unzips it), does not have the Jar in the <install-directory>/lib/ ?
> I can see the JAR file in the directory using Windows
> Explorer

Which directory do you see it in? 

-Marshall
>  but I can't see the JAR file in the directory in Eclipse.  How do I add
> a JAR file to PEAR?  Do I need to use Eclipse somehow to add the JAR to the lib
> directory rather than Windows Explorer?
>
>
>
>