Thanks, and glad to serve as an example of what crazy ideas
people get making assumptions about PEARs!

Marshall Schor (JIRA) wrote:
[ https://issues.apache.org/jira/browse/UIMA-1222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644123#action_12644123 ]
Marshall Schor commented on UIMA-1222:
--------------------------------------

Clarification: metadata/setenv.txt is not read by the UIMA framework anywhere - 
it's a write-only file :-)  It's there for use by non-UIMA application code if 
that code wants to set environment variables.

One such application could be UIMA Repositories. But those applications are more likely perhaps to read the PEAR XML descriptor directly and perhaps set environment variables from that specification.
The metadata/setenv.txt is just a "convenience" file duplicating what's in the 
xml.

The setenv.txt file has 2 special variables: the CLASSPATH and the PATH. The CLASSPATH is computed from any supplied CLASSPATH environment variable, plus the jars that are configured in the PEAR structure, including subcomponents. The PATH is similarly computed, using any supplied PATH environment variable plus it includes the "bin" subdirectory of the PEAR structure, if it exists.
See the code in uimaj-core, 
src/main/java/org/apache/uima/pear/tools/InstallationController.java.  Look for 
"setenv".



PEAR Installer: environment variables
-------------------------------------

                Key: UIMA-1222
                URL: https://issues.apache.org/jira/browse/UIMA-1222
            Project: UIMA
         Issue Type: Improvement
         Components: Documentation
   Affects Versions: 2.2.2
        Environment: all
           Reporter: Eric Riebling
           Priority: Minor
  Original Estimate: 0.17h
 Remaining Estimate: 0.17h

Some users may believe that if they add variables to those that end up in 
metadata/setenv.txt, that they become available to Components packaged within a 
PEAR.  As it turns out, they are available only if the Component explicitly 
looks in metadata/setenv.txt.  But I understand they ARE available as 
properties.  Perhaps some text explaining this could be added to the PEAR 
Packager documentation to help clarify.


--
Eric Riebling  NSH 4623,  LTI,   SCS,  CMU
412.268.9872   http://www.cs.cmu.edu/~er1k

Reply via email to