Opened 5 years ago

#951 new defect

CATALINA.OPTS property initialisation in build.xml

Reported by: ak19 Owned by: nobody
Priority: moderate Milestone:
Component: Collection Building Severity: major
Keywords: Cc:

Description

In the derby-start-tomcat and force-start-tomcat targets in build.xml, there is no working windows equivalent for setting catalina.opts. The current version uses unix style variables and would thus never have worked on Windows.

If correcting this for Windows, how should the $GSDL3HOME variable usage in the CATALINA.OPTS property declaration be dealt with if the gsdl3home path contains spaces? Is it sufficient to do:

-DGSDL3HOME="%GSDL3HOME%"

Should the quotes go outside the -D part rather than after the = sign?

Initial attempt (untested):

<else>

<if><bool><istrue value="${current.os.iswindows}"/></bool>

<property name="catalina.opts" value="-Djava.util.prefs.syncInterval=2000000 -DGSDL3HOME=&quot;%GSDL3HOME%&quot; -DGSDLOS=%GSDLOS% -DPATH=$PATH -Xmx800M -Dcantaloupe.config=&quot;${basedir}/cantaloupe.properties&quot; ${readonly.catalina.opts}"/> <else>

<property name="catalina.opts" value="-Djava.util.prefs.syncInterval=2000000 -DGSDL3HOME=$GSDL3HOME -DGSDLOS=$GSDLOS -DPATH=$PATH -Xmx800M -Dcantaloupe.config=&quot;${basedir}/cantaloupe.properties&quot; ${readonly.catalina.opts}"/>

</else>

</if>

</else>

Need to check the usage of GSDL3HOME inside our Java code, see where System.getProperties()/System.getString() is used to obtain GSDL3HOME. And then check which way of writing the CATALINA.OPTS definition ensures a GSDL3HOME value containing spaces is correctly transferred into the Java code.

Change History (0)

Note: See TracTickets for help on using tickets.