Code Search for Developers
 
 
  

build.xml from PowerStone at Krugle


Show build.xml syntax highlighted

<?xml version="1.0"?>
<project name="equinox" basedir="." default="help">
    <property file="build.properties"/>

    <property name="src.dir" value="src"/>
    <property name="classes.dir" value="classes"/>
    <property name="web.dir" value="dreambike"/>
    <property name="test.src" value="test"/>
    <property name="dist.dir" value="dist"/>
    <property name="build.dir" value="build"/>
    <property name="test.dir" value="build/test"/>
    <property name="xdoclet-lib.dir" value="xdoclet-lib"/>
    <property name="webapp.name" value="DreamBike"/>
    <property environment="env"/>
    <property name="tomcat.home" value="${env.CATALINA_HOME}"/>

    <path id="classpath">
        <fileset dir="${web.dir}/WEB-INF/lib">
            <include name="*.jar"/>
        </fileset>
        <fileset dir="${xdoclet-lib.dir}">
            <include name="*.jar"/>
        </fileset>
        <fileset dir="${tomcat.home}/common/lib">
            <include name="servlet*.jar"/>
        </fileset>
        <pathelement path="${build.dir}"/>
    </path>

    <target name="help">
        <echo message=""/>
        <echo message="${webapp.name} build file"/>
        <echo message="-----------------------------------"/>
        <echo message=""/>
        <echo message="Available targets are:"/>
        <echo message=""/>
        <echo message="compile   --> Compile all Java files"/>
        <echo message="test      --> Runs JUnit tests"/>
        <echo message="war       --> Package as WAR file"/>
        <echo message="deploy    --> Deploy application as directory"/>
        <echo message=""/>
        <echo message="install   --> Install application in Tomcat"/>
        <echo message="remove    --> Remove application from Tomcat"/>
        <echo message="reload    --> Reload application in Tomcat"/>
        <echo message="start     --> Start Tomcat application"/>
        <echo message="stop      --> Stop Tomcat application"/>
        <echo message="list      --> List Tomcat applications"/>
        <echo message=""/>
        <echo message="clean     --> Deletes compiled classes and WAR"/>
        <echo message="hibernate    --> Creates *.hbm.xml"/>

    </target>

    <target name="compile" description="Compile main source tree java files">
        <mkdir dir="${build.dir}/classes"/>
        <javac destdir="${build.dir}/classes" target="${jdk.version}" srcdir="${src.dir}" debug="true"
            deprecation="false" optimize="false" failonerror="true">
            <!--compilerarg value="-Xlint:unchecked"/-->
            <sourcepath path="${src.dir}"/>
            <classpath refid="classpath"/>
        </javac>
        <!-- compile tests -->
        <mkdir dir="${test.dir}/classes"/>
        <javac destdir="${test.dir}/classes" target="${jdk.version}" debug="true"
            deprecation="false" optimize="false" failonerror="true">
            <src path="${test.src}"/>
            <classpath>
                <path refid="classpath"/>
                <path location="${build.dir}/classes"/>
            </classpath>
        </javac>
        <!-- Copy hibernate mapping files to ${build.dir}/classes -->
        <copy todir="${build.dir}/classes">
            <fileset dir="${src.dir}" includes="**/*.hbm.xml"/>
        </copy>
    </target>

    <target name="test" depends="compile,hibernate" description="Runs JUnit tests">
        <!-- Check that junit.jar is in $ANT_HOME/lib -->
        <available classname="junit.framework.TestCase" property="junit.present"/>
        <fail unless="junit.present"
            message="Please copy web/WEB-INF/lib/junit.jar into ${env.ANT_HOME}/lib"/>

        <mkdir dir="${test.dir}/data"/>
        <junit printsummary="yes" fork="true"
            errorProperty="test.failed" failureProperty="test.failed">
            <classpath>
                <path refid="classpath"/>
                <path location="${build.dir}/classes"/>
                <path location="${test.dir}/classes"/>
                <path location="${web.dir}/WEB-INF/classes"/>
                <path location="${web.dir}"/>
            </classpath>
            <formatter type="xml"/>
            <formatter type="brief" usefile="false"/>
            <batchtest todir="${test.dir}/data" if="testcase">
                <fileset dir="${test.dir}/classes">
                    <include name="**/*${testcase}*"/>
                    <exclude name="**/*TestCase.class"/>
                </fileset>
            </batchtest>
            <batchtest todir="${test.dir}/data" unless="testcase">
                <fileset dir="${test.dir}/classes">
                    <include name="**/*Test.class*"/>
                </fileset>
            </batchtest>
        </junit>

        <fail if="test.failed">
          Unit tests failed. For error messages, check the log files in
          ${test.dir}/data or run "ant test-reports"
          to generate reports at ${test.dir}/reports.</fail>
    </target>

    <target name="test-reports" description="Generate test reports">
        <mkdir dir="${test.dir}/reports"/>
        <junitreport todir="${test.dir}">
            <fileset dir="${test.dir}/data">
                <include name="TEST-*.xml"/>
            </fileset>
            <report format="frames" todir="${test.dir}/reports"/>
        </junitreport>
    </target>

    <target name="war" depends="compile" description="Packages app as WAR">
        <mkdir dir="${dist.dir}"/>
        <war destfile="${dist.dir}/${webapp.name}.war"
            webxml="${web.dir}/WEB-INF/web.xml">
            <classes dir="${build.dir}/classes"/>
            <fileset dir="${web.dir}">
                <include name="**/*.*"/>
                <exclude name="**/web.xml"/>
                <exclude name="**/junit.jar"/>
                <exclude name="**/*mock.jar"/>
                <exclude name="**/strutstestcase*.jar"/>
            </fileset>
        </war>
    </target>

    <target name="deploy" depends="compile" description="Deploy application">
        <copy todir="${tomcat.home}/webapps/${webapp.name}" preservelastmodified="true">
            <fileset dir="${web.dir}">
                <include name="**/*.*"/>
                <exclude name="**/junit.jar"/>
                <exclude name="**/*mock.jar"/>
                <exclude name="**/strutstestcase*.jar"/>
            </fileset>
        </copy>
        <copy todir="${tomcat.home}/webapps/${webapp.name}/WEB-INF/classes"
            preservelastmodified="true">
            <fileset dir="${build.dir}/classes"/>
        </copy>
    </target>

    <target name="clean" description="Clean output directories">
        <delete dir="build"/>
        <delete dir="${dist.dir}"/>
    </target>

    <!-- Tomcat Ant Tasks -->
    <taskdef file="tomcatTasks.properties">
        <classpath>
            <pathelement path="${tomcat.home}/server/lib/catalina-ant.jar"/>
        </classpath>
    </taskdef>

    <target name="install" description="Install application in Tomcat"
        depends="war">
        <deploy url="${tomcat.manager.url}"
            username="${tomcat.manager.username}"
            password="${tomcat.manager.password}"
            path="/${webapp.name}"
            war="file:${dist.dir}/${webapp.name}.war"/>
    </target>

    <target name="remove" description="Remove application from Tomcat">
        <undeploy url="${tomcat.manager.url}"
            username="${tomcat.manager.username}"
            password="${tomcat.manager.password}"
            path="/${webapp.name}"/>
    </target>

    <target name="reload" description="Reload application in Tomcat">
        <reload url="${tomcat.manager.url}"
            username="${tomcat.manager.username}"
            password="${tomcat.manager.password}"
            path="/${webapp.name}"/>
    </target>

    <target name="start" description="Start Tomcat application">
        <start url="${tomcat.manager.url}"
            username="${tomcat.manager.username}"
            password="${tomcat.manager.password}"
            path="/${webapp.name}"/>
    </target>

    <target name="stop" description="Stop Tomcat application">
        <stop url="${tomcat.manager.url}"
            username="${tomcat.manager.username}"
            password="${tomcat.manager.password}"
            path="/${webapp.name}"/>
    </target>

    <target name="list" description="List Tomcat applications">
        <list url="${tomcat.manager.url}"
            username="${tomcat.manager.username}"
            password="${tomcat.manager.password}"/>
    </target>

    <taskdef
        name="hibernatedoclet"
        classname="xdoclet.modules.hibernate.HibernateDocletTask"
        classpathref="classpath"
    />
    <target name="hibernate" description="Generate mapping documents">
        <echo>+---------------------------------------------------+</echo>
        <echo>|                                                   |</echo>
        <echo>| R U N N I N G   H I B E R N A T E D O C L E T     |</echo>
        <echo>|                                                   |</echo>
        <echo>+---------------------------------------------------+</echo>
        <hibernatedoclet
            destdir="./src"
            excludedtags="@version,@author,@todo,@see"
            addedtags="@xdoclet-generated at ${TODAY},@copyright The XDoclet Team,@author XDoclet,@version ${version}"
            force="false"
            verbose="true">
            <fileset dir="./src">
                <include name="ps_dreambike/*.java"/>
            </fileset>
            <hibernate version="3.0"/>
        </hibernatedoclet>
    </target>
</project>




See more files for this project here

PowerStone

PowerStone is an open source java WorkFlow Management System,based on Spring and Hibernate.The system is composed of an engine(processing xpdl documents edited with Enhydra JaWE),a flow management console,a worklist and an identity management module.

Project homepage: http://sourceforge.net/projects/powerstone
Programming language(s): Java,JSP,XML
License: other

  dreambike/
    WEB-INF/
      classes/
        dreambike_database.properties
        log4j.xml
        messages.properties
        oscache.properties
        ps_database.properties
      jsps/
        dataAccessFailure.jsp
        emailReceiveNoteForm.jsp
        emailRefuseForm.jsp
        orderConfirmForm.jsp
        orderForm.jsp
        planProduceForm.jsp
        planPurchForm.jsp
        priceForm.jsp
        stockForm.jsp
        techForm.jsp
      lib/
        META-INF/
        Tidy.jar
        activation.jar
        antlr-2.7.5H3.jar
        asm-attrs.jar
        asm.jar
        c3p0-0.9.0.jar
        cglib-2.1.2.jar
        commons-beanutils.jar
        commons-cli-1.0.jar
        commons-collections.jar
        commons-dbcp.jar
        commons-digester.jar
        commons-el.jar
        commons-fileupload.jar
        commons-lang.jar
        commons-logging.jar
        commons-pool.jar
        commons-validator.jar
        concurrent-1.3.2.jar
        dom4j-1.4.jar
        ehcache-0.7.jar
        hibernate3.jar
        jakarta-oro.jar
        jaxen-full.jar
        jdom.jar
        jgroups-2.2.7.jar
        jotm.jar
        jotm_iiop_stubs.jar
        jotm_jrmp_stubs.jar
        jsp-api.jar
        jstl.jar
        jta.jar
        jtds-1.2.jar
        junit.jar
        log4j-1.2.9.jar
        mail.jar
        mysql-connector-java-3.1.10-bin.jar
        objectweb-datasource.jar
        odmg-3.0.jar
        oscache-2.0.1.jar
        ow_carol.jar
        p6spy.jar
        powerstone_lib.jar
        quartz.jar
        saxpath.jar
        spring-mock.jar
        spring-sandbox.jar
        spring.jar
        springmodules-validator-0.2.jar
        standard.jar
        struts.jar
        unittest.jar
        xapool.jar
        xercesImpl.jar
        xmlParserAPIs.jar
      c-rt.tld
      c.tld
      dreambike-servlet.xml
      dreambike_context.xml
      fmt-rt.tld
      fmt.tld
      powerstone-ca.tld
      ps_hibernate_context.xml
      spring-beans.dtd
      spring-commons-validator.tld
      spring.tld
      struts-bean.tld
      struts-config.xml
      struts-logic.tld
      web.xml
      workflow_ca_context.xml
      workflow_engine_context.xml
      workflow_service_context.xml
    img/
      default/
      PowerStone.css
      Thumbs.db
      add.gif
      blank.gif
      body.jpg
      chclose.gif
      chopen.gif
      chplus.gif
      circle1.gif
      close.gif
      da.jpg
      delete.gif
      edit.gif
      image556.gif
      loginbg.jpg
      plus.gif
      pointblue.gif
      spacer.gif
      tabletop_bg.gif
    hasNoRight.jsp
    index.jsp
    successSubmit.jsp
  src/
    ps_dreambike/
  test/
    ps_dreambike/
  xdoclet-lib/
    xdoclet-1.2.2.jar
    xdoclet-apache-module-1.2.2.jar
    xdoclet-ejb-module-1.2.2.jar
    xdoclet-hibernate-module-1[1].2.2.h3.for142.jar
    xdoclet-spring-module-1.2.2.jar
    xdoclet-web-module-1.2.2.jar
    xdoclet-xdoclet-module-1.2.2.jar
    xjavadoc-1.1.jar
  .classpath
  .project
  build.properties
  build.xml
  tomcatTasks.properties