<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- WARNING: Eclipse auto-generated file.
              Any modifications will be overwritten.
              To include a user specific buildfile here, simply create one in the same
              directory with the processing instruction <?eclipse.ant.import?>
              as the first entry and export the buildfile again. -->
<project basedir="." default="build" name="common">
	<property environment="env"/>
	<property file="build.properties" />
	<!--!!! Correct .m2 location for current user -->
	<property name="M2_REPO"  value="C:/Documents and Settings/Administrator/.m2/repository"/>
	<property name="CLOVER" value="${M2_REPO}/com/cenqua/clover/clover/1.3.13/clover-1.3.13.jar" />
	
	 <taskdef resource="com/cenqua/ant/antlib.xml" classpath="cenquatasks.jar"/>
	 <extendclasspath path="${CLOVER}" />
	 <taskdef resource="clovertasks" classpath="${CLOVER}" />
	
	<path id="common.classpath">
        <pathelement location="${CLOVER}"/>
        <pathelement location="target/classes"/>
        <pathelement location="target/test-classes"/>
        <pathelement location="${M2_REPO}/opensymphony/oscache/2.3/oscache-2.3.jar"/>
        <pathelement location="${M2_REPO}/org/richfaces/framework/richfaces-api/3.1.0-SNAPSHOT/richfaces-api-3.1.0-SNAPSHOT.jar"/>
        <pathelement location="${M2_REPO}/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar"/>
        <pathelement location="${M2_REPO}/jaxen/jaxen/1.1-beta-11/jaxen-1.1-beta-11.jar"/>
        <pathelement location="${M2_REPO}/org/ccil/cowan/tagsoup/tagsoup/0.9.7/tagsoup-0.9.7.jar"/>
        <pathelement location="${M2_REPO}/xerces/xmlParserAPIs/2.6.2/xmlParserAPIs-2.6.2.jar"/>
        <pathelement location="${M2_REPO}/org/apache/shale/shale-test/1.0.4/shale-test-1.0.4.jar"/>
        <pathelement location="${M2_REPO}/commons-lang/commons-lang/2.1/commons-lang-2.1.jar"/>
        <pathelement location="${M2_REPO}/jdom/jdom/1.0/jdom-1.0.jar"/>
        <pathelement location="${M2_REPO}/xml-apis/xml-apis/1.3.02/xml-apis-1.3.02.jar"/>
        <pathelement location="${M2_REPO}/javax/el/el-api/1.0/el-api-1.0.jar"/>
        <pathelement location="${M2_REPO}/commons-io/commons-io/1.2/commons-io-1.2.jar"/>
        <pathelement location="${M2_REPO}/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar"/>
        <pathelement location="${M2_REPO}/el-impl/el-impl/1.0/el-impl-1.0.jar"/>
        <pathelement location="${M2_REPO}/xalan/xalan/2.6.0/xalan-2.6.0.jar"/>
        <pathelement location="${M2_REPO}/xerces/xercesImpl/2.6.2/xercesImpl-2.6.2.jar"/>
        <pathelement location="${M2_REPO}/com/ibm/icu/icu4j/2.6.1/icu4j-2.6.1.jar"/>
        <pathelement location="${M2_REPO}/com/sun/facelets/jsf-facelets/1.1.11/jsf-facelets-1.1.11.jar"/>
        <pathelement location="${M2_REPO}/javax/servlet/jstl/1.0/jstl-1.0.jar"/>
        <pathelement location="${M2_REPO}/xom/xom/1.0b3/xom-1.0b3.jar"/>
        <pathelement location="${M2_REPO}/commons-digester/commons-digester/1.5/commons-digester-1.5.jar"/>
        <pathelement location="${M2_REPO}/commons-httpclient/commons-httpclient/3.0.1/commons-httpclient-3.0.1.jar"/>
        <pathelement location="${M2_REPO}/javax/servlet/jsp-api/2.0/jsp-api-2.0.jar"/>
        <pathelement location="${M2_REPO}/org/richfaces/framework/richfaces-impl/3.1.0-SNAPSHOT/richfaces-impl-3.1.0-SNAPSHOT.jar"/>
        <pathelement location="${M2_REPO}/javax/faces/jsf-api/1.1_02/jsf-api-1.1_02.jar"/>
        <pathelement location="${M2_REPO}/nekohtml/nekohtml/0.9.5/nekohtml-0.9.5.jar"/>
        <pathelement location="${M2_REPO}/htmlunit/htmlunit/1.10/htmlunit-1.10.jar"/>
        <pathelement location="${M2_REPO}/commons-beanutils/commons-beanutils/1.6/commons-beanutils-1.6.jar"/>
        <pathelement location="${M2_REPO}/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar"/>
        <pathelement location="${M2_REPO}/junit/junit/3.8.1/junit-3.8.1.jar"/>
        <pathelement location="${M2_REPO}/commons-collections/commons-collections/3.0/commons-collections-3.0.jar"/>
        <pathelement location="${M2_REPO}/commons-codec/commons-codec/1.3/commons-codec-1.3.jar"/>
        <pathelement location="${M2_REPO}/rhino/js/1.6R2/js-1.6R2.jar"/>
        <pathelement location="${M2_REPO}/javax/faces/jsf-impl/1.1_02/jsf-impl-1.1_02.jar"/>
        <pathelement location="${M2_REPO}/com/uwyn/jhighlight/1.0/jhighlight-1.0.jar"/>
    </path>
    <target name="init" depends="clean">
        <mkdir dir="target/clover/classes"/>
		<clover-clean initstring="target/clover/clover.db" keepdb="false"/>
		<clover-setup initstring="target/clover/clover.db" flushpolicy="interval" flushinterval="1000">
            <fileset dir="target/src" includes="**/*.java"/>
    	</clover-setup>
       <copy includeemptydirs="false" todir="target/clover/classes">
            <fileset dir="target/classes" excludes="**/*.launch, **/*.java, **/*.class"/>
        </copy>
       <copy includeemptydirs="false" todir="target/clover/classes">
            <fileset dir="target/src" excludes="**/*.launch, **/*.java"/>
        </copy>
        <copy includeemptydirs="false" todir="target/clover/classes">
            <fileset dir="target/src" excludes="**/*.launch, **/*.java"/>
        </copy>
    </target>
    <target name="clean">
        <delete dir="target/clover/classes"/>
        <delete file="target/clover/richfaces-clovered.jar"/>
    </target>
    <target depends="clean" name="cleanall"/>
    <target depends="build-project" name="build"/>
    <target depends="init" name="build-project">
        <echo message="${ant.project.name}: ${ant.file}"/>
    	
        <javac source="1.4" srcdir="target/src" classpathref="common.classpath" debug="true" debuglevel="source,lines,vars" destdir="target/clover/classes" />
   	
    	<jar destfile="target/clover/richfaces-clovered.jar">
    		<fileset dir="target/clover/classes" />
    	</jar>
    </target>
</project>
