<project name="strutstest" default="deploy">
    <property name="war" value="test168.war"/>
    <property name="src" value="src"/>
    <property name="bin" value="bin"/>
    <property name="descrip" value="descrip"/>
    <property name="lib" value="lib"/>
    <property name="jsp" value="jsp"/>
    <property name="j2eeroot" value="C:/SUNJava/j2sdkee1.3.1"/>
    <property name="plutoroot" value="C:/jakarta/pluto-1.0.1-rc2"/>
    <property name="tomcatroot" value="C:/Jakarta/tomcat-5.5.9"/>
    <property name="mysqldriver" value="C:/DivJava/mysql-connector-java-3.1.7/mysql-connector-java-3.1.7-bin.jar"/>
    <target name="compile">
        <javac debug="true" classpath="${j2eeroot}/lib/j2ee.jar;${plutoroot}/shared/lib/portlet-api-1.0.jar" srcdir="${src}" destdir="${bin}"/>
    </target>
    <target name="build" depends="compile">
        <war warfile="${war}" webxml="${descrip}/web.xml">
            <classes dir="${bin}"/>
            <lib dir="${lib}"/>
            <fileset dir="${jsp}"/>
            <webinf dir="${descrip}" excludes="web.xml"/>
        </war>
    </target>
    <target name="deploy" depends="build">
        <copy file="${war}" todir="${tomcatroot}/webapps"/>
    </target>
    <target name="inittomcat">
        <copy todir="${tomcatroot}/webapps/pluto">
            <fileset dir="${plutoroot}/webapps/pluto"/>
        </copy>
        <copy todir="${tomcatroot}/common/endorsed">
            <fileset dir="${plutoroot}/common/endorsed"/>
        </copy>
        <copy todir="${tomcatroot}/shared/lib">
            <fileset dir="${plutoroot}/shared/lib"/>
        </copy>
        <copy todir="${tomcatroot}/conf/catalina/localhost">
            <fileset dir="${plutoroot}/conf/catalina/localhost"/>
        </copy>
        <copy file="${mysqldriver}" todir="${plutoroot}/shared/lib"/>
        <copy file="portletcontexts.txt" todir="${tomcatroot}/webapps/pluto/WEB-INF/data"/>
        <copy file="portletentityregistry.xml" todir="${tomcatroot}/webapps/pluto/WEB-INF/data"/>
        <copy file="pageregistry.xml" todir="${tomcatroot}/webapps/pluto/WEB-INF/data"/>
    </target>
</project>