blob: 863782faaccba1bbab022b116ef0e41d821c43e8 [file] [log] [blame]
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
XML file for launching Jasper applications using the Launcher.
To run any of the applications in the JDB debugger, execute the Launcher with
a "-Ddebug=true" argument.
To run any of the applications in JPDA mode, execute the Launcher with a
"-Djpda=true" argument.
-->
<project name="Jasper Launcher" default="jspc" basedir=".">
<!-- Set the application home to the parent directory of this directory -->
<property name="jasper.home" location="${basedir}/.."/>
<!-- Import the user's custom properties -->
<property file="${jasper.home}/bin/jasper.properties"/>
<!-- Set user configurable properties -->
<property name="jasper.jvm.args" value=""/>
<property name="jasper.source.path" value="${jasper.home}/../../jakarta-servletapi-5/src/share:${jasper.home}/../../jakarta-tomcat-jasper/jasper2/src/share"/>
<!-- Build the classpath relative to the application home -->
<path id="base.class.path">
<fileset dir="${jasper.home}/common/lib" includes="*.jar"/>
<fileset dir="${jasper.home}/common/endorsed" includes="*.jar"/>
<fileset dir="${jasper.home}/shared/lib" includes="*.jar"/>
<pathelement location="${jasper.home}/shared/classes"/>
</path>
<!-- Build the sysproperties relative to the application home -->
<syspropertyset id="base.sys.properties">
<sysproperty key="java.endorsed.dirs" file="${jasper.home}/common/endorsed"/>
<sysproperty key="jasper.home" file="${jasper.home}"/>
</syspropertyset>
<!-- Build the standard jvmargs -->
<jvmargset id="base.jvm.args">
<jvmarg line="${jasper.jvm.args}"/>
<jvmarg value="-Xdebug" if="jpda.settings"/>
<jvmarg value="-Xrunjdwp:${jpda.settings}" if="jpda.settings"/>
<jvmarg value="-sourcepath" if="jdb"/>
<jvmarg path="${jasper.source.path}" if="jdb"/>
</jvmargset>
<!-- Target that sets JDB properties when the "debug" property is set -->
<target name="setjdb" description="Set JDB properties" if="debug">
<property name="jdb" value="true"/>
</target>
<!-- Target that sets JPDA properties when the "jpda" property is set -->
<target name="setjpda" description="Set JPDA properties" if="jpda">
<condition property="jpda.transport" value="dt_shmem">
<os family="windows"/>
</condition>
<condition property="jpda.transport" value="dt_socket">
<not>
<os family="windows"/>
</not>
</condition>
<condition property="jpda.address" value="jdbconn">
<equals arg1="${jpda.transport}" arg2="dt_shmem"/>
</condition>
<condition property="jpda.address" value="8000">
<not>
<equals arg1="${jpda.transport}" arg2="dt_shmem"/>
</not>
</condition>
<property name="jpda.suspend" value="y"/>
<property name="jpda.settings" value="transport=${jpda.transport},address=${jpda.address},server=y,suspend=${jpda.suspend}"/>
</target>
<!-- Target that executes the JSPC compiler-->
<target name="jspc" description="Execute JSPC compiler"
depends="setjdb,setjpda">
<!-- Launch JSPC compiler -->
<launch classname="org.apache.jasper.JspC"
debug="${jdb}"
print="${print}"
usesystemin="false"
requiretools="true">
<jvmargset refid="base.jvm.args"/>
<arg value="jspc"/>
<syspropertyset refid="base.sys.properties"/>
<classpath refid="base.class.path"/>
</launch>
</target>
</project>