uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marshall Schor <...@schor.com>
Subject Re: Referring to file resources
Date Wed, 02 Mar 2011 14:54:14 GMT
re: using $main_root - this is part of "Pear" packaging.  The Pear installation
process, after unpacking a Pear file to some install point, scans files for this
string and replaces it with where the Pear was installed.

So - it will only work for Pears, and then, only if you run the Pear installer
to install the Pear.

-Marshall

On 3/2/2011 4:29 AM, Greg Holmberg wrote:
> Hi UIMA users--
>
>
> So, it seems like I should put configuration files for my primitive annotator in "conf".
>
> Then, in the descriptor, I created an externalResourceDependency to represent the path
to the directory containing the configuration files, and an externalResource:
>
>     <externalResourceDependency>
>       <key>configDir</key>
>       <description/>
>       <optional>false</optional>
>     </externalResourceDependency>
> ...
>     <externalResource>
>       <name>com.foo.bar.configDir</name>
>       <description/>
>       <fileResourceSpecifier>
>         <fileUrl>X</fileUrl>
>       </fileResourceSpecifier>
>     </externalResource>
> ...
>     <externalResourceBinding>
>       <key>configDir</key>
>       <resourceName>com.foo.bar.configDir</resourceName>
>     </externalResourceBinding>
>
> I've tried a lot of values for X, trying to get it to point to the conf dir.  For example,
file:///../conf and file:///$main_root/conf    Nothing works except a full, absolute path:
file:/C:/Users/Greg/workspace/MyAnnotator/conf
>
> But I don't want to hard-code that path since it only works for user "Greg".
>
> How can I set a value points to the annotator's "conf" dir and works for all users?
>
> Or is there a better way for my annotator to find its "conf" dir?
>
> Thanks,
>
>
> Greg Holmberg
>
>

Mime
View raw message