Revision: 14566
http://gate.svn.sourceforge.net/gate/?rev=14566&view=rev
Author: johann_p
Date: 2011-11-17 14:15:57 +0000 (Thu, 17 Nov 2011)
Log Message:
-----------
Document the option to store URLs relative to a resources
home directory and how to set this directory when
invoking gate via gate.sh
Modified Paths:
--------------
userguide/trunk/developer.tex
userguide/trunk/gettingstarted.tex
Modified: userguide/trunk/developer.tex
===================================================================
--- userguide/trunk/developer.tex 2011-11-17 14:14:49 UTC (rev 14565)
+++ userguide/trunk/developer.tex 2011-11-17 14:15:57 UTC (rev 14566)
@@ -1193,32 +1193,60 @@
For the parameters of type URL (which are typically used to
select external resources such as grammars or rules files) a transformation is
-applied so that
-%% johann_p: commented out text would apply to how it would work when we
-%% change things so that URLs within the gate homedirectory get stored relative
-%% to the GATE home dir, using $gatehome$ instead of $relpath$
-%% all
-the paths
-%% which are
-%% inside the GATE home directory
-%% are stored relative to the GATE home directory and all other paths
-are stored
-relative to the location of the file used to
-store the state. This means that the resource files which are not part of GATE
-and used by an application do
-not need to be in the same location as when the application was initially
-created but rather in the same \emph{location relative to the location of the
-application file}. It also means that the resource files which are part of GATE
-should be found correctly no matter where GATE is installed.
-This allows the creation and deployment of portable
+applied so that
+the paths are are stored relative to either the location of the saved
application
+state file, the GATE home directory, or a special user resources home
directory,
+according to the following rules:
+\begin{itemize}
+\item If the resource is inside the GATE home directory, but the the
application
+ state file is saved to a location outside the GATE home directory, the path
+ is stored relative to the GATE home directory and the path marker
+ \verb=$gatehome$=
+ is used.
+\item If the property \texttt{gate.user.resourceshome} is set to the path of
+ a directory and the resource
+ is located inside that directory but the state file is saved to a location
+ outside of this directory, the path is stored relative to this directory
+ and the path marker \verb=$resourceshome$= is used.
+\item in all other situations, the path is stored relative to the location of
+ the application state file location and the the path marker \verb=$relpath$=
+ is used.
+\end{itemize}
+
+In this way, all resource files that are part of GATE are always used corretly,
+no matter where GATE is installed. Resource files which are not part of GATE
+and used by an application do not need to be in the same location as when the
+application was initially created but rather in the same \emph{location
relative
+to the location of the application file}.
+In addition if your application uses a project-specific location for global
+resources or project specific plugins, the java property
\texttt{gate.user.resourceshome}
+can be set to this location and the application will be stored so that this
+location will also always be used correctly, no matter where the application
state
+file is copied to. To set the resources home directory, the \texttt{-rh
location}
+option for the Linux script \texttt{gate.sh} to start GATE can be used.
+The combination of these features allows the creation and deployment of
portable
applications by keeping the application file and the resource files used by the
application together.
-GATE uses the keyword \$relpath\$ for paths relative to the location of the
-gapp file. There exists other keywords that can be interesting in some
+
+Note that GATE resources that are used by your application may change
+between different releases of GATE. If your application depends on a specific
+version of resources that come with the GATE distribution, consider copying
them
+to your project directory in order to ensure the correct version is used.
+The option "Export for GATECloud.net" (see
+Section~\ref{sec:developer:export})
+ supports this by creating a ZIP file that
+contains a copy all GATE resources used by the application, including GATE
plugins.
+
+When an application is restored from an application state file,
+GATE uses the keyword \verb=$relpath$= for paths relative to the location of
the
+gapp file, \verb=$gatehome$= for paths relative to the GATE home installation
directory
+and \verb=$resourceshom$= for paths relative to the the location the property
+\texttt{gate.user.resourceshome} is set.
+There exists other keywords that can be interesting in some
cases. You will need to edit the gapp file manually. The keywords are
-\$gatehome\$, \$gateplugins\$ and \$sysprop:...\$. The latter is a java
-system property, for example \$sysprop:user.home\$.
+\verb=$gateplugins$= and \verb=$sysprop:...$=. The latter is any java
+system property, for example \verb=$sysprop:user.home$=.
If you want to save your application along with all the resources it requires
you can use the `Export for GATECloud.net' option (see
Modified: userguide/trunk/gettingstarted.tex
===================================================================
--- userguide/trunk/gettingstarted.tex 2011-11-17 14:14:49 UTC (rev 14565)
+++ userguide/trunk/gettingstarted.tex 2011-11-17 14:15:57 UTC (rev 14566)
@@ -148,6 +148,12 @@
then use it instead of the default (\verb|GATE_HOME/bin/log4j.properties|)
to
configure logging. Alternately, you can specify any log4j configuration
file
by setting the \texttt{log4j.configuration} property explicitly (see
below).
+ \item[-rh \emph{location}] set the resources home directory to the location
provided.
+ If a resources home location is provided, the URLs in a saved application
are
+ saved relative to this location instead of relative to the application
state file
+ (see section~\ref{sec:developer:savestate}).
+ This is equivalent to setting the property
\texttt{gate.user.resourceshome} to
+ this location.
\item[\emph{all other parameters}] are passed on to the \texttt{ant}
command.
This can be used to e.g. set properties using the \texttt{ant} option
\texttt{-D}. For
example to set the maximum amount of heap memory to be used when running
GATE
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs