<?xml version="1.0" encoding="utf-8"?>
<project name="XEMELIOS" default="usage" basedir=".">
    <description>Builds, tests, and runs the project XEMELIOS.</description>
    <property file="${user.home}/.ant.properties"/>
    <property name="compile.debug" value="true"/>
    <property file="build.properties"/>

    <path id="pmd.classpath">
        <fileset dir="${pmd.location}/lib" includes="*.jar"/>
    </path>
        
    <target name="usage">
	<echo>
	    Using ${ant.version}
	    
	    These are targets supported by this ANT build script:
	    
	    compile       - compile all .java files, except
	                    thoses in ./tmp folder.
	    clean         - deletes all compiled and generated
	                    files and resources.
	    jars          - build jar files.
	    apidocs       - generate javadoc API documentation.
	    deploy        - copy files to deploy dir to build setup.
        </echo>
    </target>
    
    <target name="compile" depends="compile-starter,
                        compile-core,
                        compile-batch,
                        compile-xemelios-core,
                        compile-mysql-persistence,
                        compile-auth-aphm,
                        compile-auth-basic,
                        compile-auth-dgcp,
                        compile-auth-ldap,
                        compile-auth-std-db,
                        compile-quittancement,
                        compile-cfg-paye"
                description="lance la compilation des classes de Xemelios">
    </target>
    
    <target name="compile-starter" depends="mk-output-dirs">
	    <ant dir="src/starter" target="compile"/>
    </target>
    <target name="compile-batch" depends="compile-core,compile-import-batch,compile-mysql-persistence">
	    <ant dir="src/batch" target="compile"/>
    </target>
    <target name="compile-core" depends="mk-output-dirs,compile-starter,compile-xml-marshall">
	    <ant dir="src/core" target="compile"/>
    </target>
    <target name="compile-xemelios-core" depends="mk-output-dirs,compile-starter,compile-xml-marshall,compile-core">
	    <ant dir="src/xemelios-core" target="compile"/>
    </target>
    <target name="compile-mysql-persistence" depends="mk-output-dirs,compile-core,compile-xemelios-core">
	    <ant dir="src/mysql-persistence" target="compile"/>
    </target>
    <target name="compile-auth-aphm" depends="mk-output-dirs,compile-xemelios-core,compile-mysql-persistence,compile-core">
	    <ant dir="src/auth-aphm" target="compile"/>
    </target>
    <target name="compile-auth-basic" depends="mk-output-dirs,compile-xemelios-core,compile-mysql-persistence,compile-core,compile-auth-std-db">
	    <ant dir="src/auth-basic" target="compile"/>
    </target>
    <target name="compile-auth-dgcp" depends="mk-output-dirs,compile-xemelios-core,compile-mysql-persistence,compile-core">
	    <ant dir="src/auth-dgcp" target="compile"/>
    </target>
    <target name="compile-auth-ldap" depends="mk-output-dirs,compile-xemelios-core,compile-core">
	    <ant dir="src/auth-ldap" target="compile"/>
    </target>
    <target name="compile-auth-std-db" depends="mk-output-dirs,compile-core,compile-xemelios-core,compile-auth-dgcp">
	    <ant dir="src/auth-std-db" target="compile"/>
    </target>
    <target name="compile-import-batch" depends="mk-output-dirs,compile-xemelios-core,compile-core">
	    <ant dir="src/import-batch" target="compile"/>
    </target>
    <target name="compile-dp-directe" depends="mk-output-dirs,jars-xemelios-core,jars-mysql-persistence">
	    <ant dir="src/dp-directe" target="compile"/>
    </target>
    <target name="compile-demande-achat" depends="mk-output-dirs,jars-xemelios-core,jars-mysql-persistence">
	    <ant dir="src/demande-achat" target="compile"/>
    </target>
    <target name="compile-drop-users" depends="mk-output-dirs,jars-xemelios-core,jars-mysql-persistence">
	    <ant dir="src/drop-users" target="compile"/>
    </target>
    <target name="compile-cfg-paye" depends="mk-output-dirs,compile-core,compile-mysql-persistence">
	    <ant dir="src/cfg-paye" target="compile"/>
    </target>
    <target name="compile-cg-colloc" depends="mk-output-dirs,compile-core,compile-mysql-persistence">
	    <ant dir="src/cg-colloc" target="compile"/>
    </target>
    <target name="compile-cg-etat" depends="mk-output-dirs,compile-core,compile-mysql-persistence">
	    <ant dir="src/cg-etat" target="compile"/>
    </target>
    <target name="compile-etat-frais" depends="mk-output-dirs,compile-core,compile-mysql-persistence">
        <ant dir="src/etat-frais" target="compile"/>
    </target>
    <target name="compile-etat-frais-spl" depends="mk-output-dirs,compile-core,compile-mysql-persistence,compile-etat-frais">
        <ant dir="src/etat-frais-spl" target="compile"/>
    </target>
    <target name="compile-pes-aller" depends="mk-output-dirs,compile-core">
	    <ant dir="src/pes-aller" target="compile"/>
    </target>
    <target name="compile-quittancement" depends="mk-output-dirs,compile-core">
        <ant dir="src/quittancement" target="compile"/>
    </target>
    <target name="compile-ref-collec-spl" depends="mk-output-dirs,compile-core">
        <ant dir="src/ref-collec-spl" target="compile"/>
    </target>
    <target name="compile-rsa" depends="mk-output-dirs,compile-core">
        <ant dir="src/rsa" target="compile"/>
    </target>
    <target name="compile-build-tools" depends="mk-output-dirs,compile-core">
        <ant dir="src/build-tools" target="compile"/>
    </target>
    <target name="compile-xml-marshall" depends="mk-output-dirs">
	    <ant dir="src/xml-marshall" target="compile"/>
    </target>
    <target name="compile-plugin-generator-pes-pjs" depends="compile-core,compile-xemelios-core">
        <ant dir="src/plugin-generator-pes-pjs" target="compile"/>
    </target>
	<target name="compile-plugin-generator-edmn" depends="compile-core,compile-xemelios-core">
        <ant dir="src/plugin-generator-edmn" target="compile"/>
    </target>
    <target name="compile-plugin-signature-pes" depends="compile-core,compile-xemelios-core">
        <ant dir="src/plugin-signature-pes" target="compile"/>
    </target>
    <target name="compile-plugin-signerfichier-pes" depends="compile-core,compile-xemelios-core">
        <ant dir="src/plugin-signerfichier-pes" target="compile"/>
    </target>
    <target name="compile-service-fait" depends="mk-output-dirs,jars-xemelios-core,jars-mysql-persistence">
        <ant dir="src/service-fait" target="compile"/>
    </target>
    <target name="compile-sorties-directes-stock" depends="mk-output-dirs,jars-xemelios-core,jars-mysql-persistence">
        <ant dir="src/sorties-directes-stock" target="compile"/>
    </target>
    
    <target name="compile-edmn" depends="jars-xemelios-core">
        <ant dir="src/edmn" target="compile"/>
    </target>
    <target name="compile-entrees-directes-stock" depends="jars-xemelios-core">
        <ant dir="src/entrees-directes-stock" target="compile"/>
    </target>
    <target name="compile-erar" depends="jars-xemelios-core">
        <ant dir="src/erar" target="compile"/>
    </target>
    <target name="compile-ertn" depends="jars-xemelios-core">
        <ant dir="src/ertn" target="compile"/>
    </target>
    <target name="compile-factures-ss-engag-tiers" depends="jars-xemelios-core">
        <ant dir="src/factures-sans-engagement-tiers" target="compile"/>
    </target>

    <target name="jars-starter" depends="mk-output-dirs,compile-starter">
	    <ant dir="src/starter" target="jars"/>
    </target>
    <target name="jars-core" depends="mk-output-dirs,compile-core">
	    <ant dir="src/core" target="jars"/>
    </target>
    <target name="jars-xemelios-core" depends="mk-output-dirs,compile-xemelios-core">
	    <ant dir="src/xemelios-core" target="jars"/>
    </target>
    <target name="jars-xml-marshall" depends="mk-output-dirs,compile-xml-marshall">
	    <ant dir="src/xml-marshall" target="jars"/>
    </target>
    <target name="jars-mysql-persistence" depends="mk-output-dirs,compile-mysql-persistence">
	    <ant dir="src/mysql-persistence" target="jars"/>
    </target>
    <target name="jars-auth-aphm" depends="compile-auth-aphm">
	    <ant dir="src/auth-aphm" target="jars"/>
    </target>
    <target name="jars-auth-basic" depends="compile-auth-basic">
	    <ant dir="src/auth-basic" target="jars"/>
    </target>
    <target name="jars-auth-dgcp" depends="compile-auth-dgcp">
	    <ant dir="src/auth-dgcp" target="jars"/>
    </target>
    <target name="jars-auth-ldap" depends="compile-auth-ldap">
	    <ant dir="src/auth-ldap" target="jars"/>
    </target>
    <target name="jars-auth-std-db" depends="compile-auth-std-db">
	    <ant dir="src/auth-std-db" target="jars"/>
    </target>
    <target name="jars-import-batch" depends="compile-import-batch">
	    <ant dir="src/import-batch" target="jars"/>
    </target>
    <target name="jars-dp-directe" depends="compile-dp-directe">
	    <ant dir="src/dp-directe" target="jars"/>
    </target>
    <target name="jars-demande-achat" depends="compile-demande-achat">
	    <ant dir="src/demande-achat" target="jars"/>
    </target>
    <target name="jars-drop-users" depends="compile-drop-users">
	    <ant dir="src/drop-users" target="jars"/>
    </target>
    <target name="jars-cfg-paye" depends="compile-cfg-paye">
	    <ant dir="src/cfg-paye" target="jars"/>
    </target>
    <target name="jars-cg-colloc" depends="compile-cg-colloc">
	    <ant dir="src/cg-colloc" target="jars"/>
    </target>
    <target name="jars-cg-etat" depends="compile-cg-etat">
	    <ant dir="src/cg-etat" target="jars"/>
    </target>
    <target name="jars-pes-aller" depends="compile-pes-aller">
	    <ant dir="src/pes-aller" target="jars"/>
    </target>
    <target name="jars-quittancement" depends="compile-quittancement">
        <ant dir="src/quittancement" target="jars"/>
    </target>
    <target name="jars-ref-collec-spl" depends="compile-ref-collec-spl">
        <ant dir="src/ref-collec-spl" target="jars"/>
    </target>
    <target name="jars-rsa" depends="compile-rsa">
        <ant dir="src/rsa" target="jars"/>
    </target>
    <target name="jars-batch" depends="compile-batch">
        <ant dir="src/batch" target="jars"/>
    </target>
    <target name="jars-build-tools" depends="compile-build-tools">
        <ant dir="src/build-tools" target="jars"/>
    </target>
    <target name="jars-plugin-generator-pes-pjs" depends="compile-plugin-generator-pes-pjs">
        <ant dir="src/plugin-generator-pes-pjs" target="jars"/>
    </target>
	<target name="jars-plugin-generator-edmn" depends="compile-plugin-generator-edmn">
        <ant dir="src/plugin-generator-edmn" target="jars"/>
    </target>
    <target name="jars-plugin-signature-pes" depends="compile-plugin-signature-pes">
        <ant dir="src/plugin-signature-pes" target="jars"/>
    </target>
    <target name="jars-plugin-signerfichier-pes" depends="compile-plugin-signerfichier-pes">
        <ant dir="src/plugin-signerfichier-pes" target="jars"/>
    </target>
    <target name="jars-edmn" depends="compile-edmn">
        <ant dir="src/edmn" target="jars"/>
    </target>
    <target name="jars-entrees-directes-stock" depends="compile-entrees-directes-stock">
        <ant dir="src/entrees-directes-stock" target="jars"/>
    </target>
    <target name="jars-erar" depends="compile-erar">
        <ant dir="src/erar" target="jars"/>
    </target>
    <target name="jars-ertn" depends="compile-ertn">
        <ant dir="src/ertn" target="jars"/>
    </target>
    <target name="jars-etat-frais" depends="compile-etat-frais">
        <ant dir="src/etat-frais" target="jars"/>
    </target>
    <target name="jars-etat-frais-spl" depends="compile-etat-frais-spl">
        <ant dir="src/etat-frais-spl" target="jars"/>
    </target>
    <target name="jars-service-fait" depends="compile-service-fait">
	    <ant dir="src/service-fait" target="jars"/>
    </target>
    <target name="jars-sorties-directes-stock" depends="compile-sorties-directes-stock">
	    <ant dir="src/sorties-directes-stock" target="jars"/>
    </target>
    <target name="jars-factures-ss-engag-tiers" depends="compile-factures-ss-engag-tiers">
        <ant dir="src/factures-sans-engagement-tiers" target="jars"/>
    </target>

    <target name="config-auth-aphm" depends="jars-auth-aphm">
        <ant dir="src/auth-aphm" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/auth-aphm/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-auth-basic" depends="jars-auth-basic">
        <ant dir="src/auth-basic" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/auth-basic/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-auth-dgcp" depends="jars-auth-dgcp">
        <ant dir="src/auth-dgcp" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/auth-dgcp/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-auth-ldap" depends="jars-auth-ldap">
        <ant dir="src/auth-ldap" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/auth-ldap/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-auth-std-db" depends="jars-auth-std-db">
        <ant dir="src/auth-std-db" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/auth-std-db/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-carte-achat" depends="">
        <ant dir="src/carte-achat" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/carte-achat/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-cfg-paye" depends="jars-cfg-paye">
        <ant dir="src/cfg-paye" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/cfg-paye/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-cg-colloc" depends="jars-cg-colloc">
        <ant dir="src/cg-colloc" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/cg-colloc/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-cg-etat" depends="jars-cg-etat">
        <ant dir="src/cg-etat" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/cg-etat/build/config" includes="**/*"/>
        </copy>
        <antcall target="config-ertn"/>
        <antcall target="config-edmn"/>
    </target>
    <target name="config-dp-directe" depends="jars-dp-directe">
        <ant dir="src/dp-directe" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/dp-directe/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-demande-achat" depends="jars-demande-achat">
        <ant dir="src/demande-achat" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/demande-achat/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-drop-users" depends="jars-drop-users">
        <ant dir="src/drop-users" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/drop-users/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-facture-depense" depends="config-pes-facture">
        <ant dir="src/facture-depense" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/facture-depense/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-facture-recette" depends="config-pes-facture">
        <ant dir="src/facture-recette" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/facture-recette/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-import-batch" depends="jars-import-batch">
        <ant dir="src/import-batch" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/import-batch/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-mysql-persistence" depends="jars-mysql-persistence">
        <ant dir="src/mysql-persistence" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/mysql-persistence/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-pes-aller" depends="jars-pes-aller">
	<ant dir="src/pes-aller" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/pes-aller/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-pes-facture" depends="">
        <ant dir="src/pes-facture" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/pes-facture/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-plugin-generator-pes-pjs" depends="jars-plugin-generator-pes-pjs">
        <ant dir="src/plugin-generator-pes-pjs" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/plugin-generator-pes-pjs/build/config" includes="**/*"/>
        </copy>
    </target>
	<target name="config-plugin-generator-edmn" depends="jars-plugin-generator-edmn">
	        <ant dir="src/plugin-generator-edmn" target="config"/>
	        <copy todir="build/config">
	            <fileset dir="src/plugin-generator-edmn/build/config" includes="**/*"/>
	        </copy>
	    </target>
    <target name="config-plugin-signature-pes" depends="jars-plugin-signature-pes">
        <ant dir="src/plugin-signature-pes" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/plugin-signature-pes/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-plugin-signerfichier-pes" depends="jars-plugin-signerfichier-pes">
        <ant dir="src/plugin-signerfichier-pes" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/plugin-signerfichier-pes/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-quittancement" depends="config-pes-facture,jars-quittancement">
        <ant dir="src/quittancement" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/quittancement/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-ref-collec-spl" depends="jars-ref-collec-spl">
        <ant dir="src/ref-collec-spl" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/ref-collec-spl/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-rsa" depends="jars-rsa">
        <ant dir="src/rsa" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/rsa/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-rapport" depends="">
        <ant dir="src/rapport" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/rapport/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-service-fait" depends="jars-service-fait">
        <ant dir="src/service-fait" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/service-fait/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-sorties-directes-stock" depends="jars-sorties-directes-stock">
        <ant dir="src/sorties-directes-stock" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/sorties-directes-stock/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-starter" depends="jars-starter">
        <ant dir="src/starter" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/starter/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-user-guide">
        <ant dir="src/user-guide" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/user-guide/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-versement" depends="">
        <ant dir="src/versement" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/versement/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-core" depends="compile-core,jars-core">
        <ant dir="src/core" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/core/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-xemelios-core" depends="compile-core,jars-xemelios-core">
        <ant dir="src/xemelios-core" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/xemelios-core/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-xml-marshall" depends="jars-xml-marshall">
        <ant dir="src/xml-marshall" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/xml-marshall/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-edmn" depends="jars-edmn">
        <ant dir="src/edmn" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/edmn/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-entrees-directes-stock" depends="jars-entrees-directes-stock">
        <ant dir="src/entrees-directes-stock" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/entrees-directes-stock/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-erar" depends="jars-erar">
        <ant dir="src/erar" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/erar/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-ertn" depends="jars-ertn">
        <ant dir="src/ertn" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/ertn/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-etat-frais" depends="jars-etat-frais">
        <ant dir="src/etat-frais" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/etat-frais/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-etat-frais-spl" depends="jars-etat-frais-spl,config-etat-frais">
        <ant dir="src/etat-frais-spl" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/etat-frais-spl/build/config" includes="**/*"/>
        </copy>
    </target>
    <target name="config-factures-ss-engag-tiers" depends="jars-factures-ss-engag-tiers">
        <ant dir="src/factures-sans-engagement-tiers" target="config"/>
        <copy todir="build/config">
            <fileset dir="src/factures-sans-engagement-tiers/build/config" includes="**/*"/>
        </copy>
    </target>
    
    <target name="setup-core" depends="jars-core">
        <ant dir="src/core" target="setup"/>
    </target>
    <target name="setup-auth-aphm" depends="jars-auth-aphm">
        <ant dir="src/auth-aphm" target="setup"/>
    </target>
    <target name="setup-auth-basic" depends="jars-auth-basic">
        <ant dir="src/auth-basic" target="setup"/>
    </target>
    <target name="setup-auth-dgcp" depends="jars-auth-dgcp">
        <ant dir="src/auth-dgcp" target="setup"/>
    </target>
    <target name="setup-auth-ldap" depends="jars-auth-ldap">
        <ant dir="src/auth-ldap" target="setup"/>
    </target>
    <target name="setup-auth-std-db" depends="jars-auth-std-db">
        <ant dir="src/auth-std-db" target="setup"/>
    </target>
    <target name="setup-batch" depends="jars-batch, jars-mysql-persistence, jars-core, jars-import-batch, jars-auth-std-db, jars-xml-marshall, jars-starter, jars-xemelios-core, jars-edmn, jars-cg-etat">
        <ant dir="src/batch" target="setup"/>
    </target>
    <target name="setup-carte-achat" depends="">
        <ant dir="src/carte-achat" target="setup"/>
    </target>
    <target name="setup-cfg-paye" depends="jars-cfg-paye">
        <ant dir="src/cfg-paye" target="setup"/>
    </target>
    <target name="setup-cg-colloc" depends="jars-cg-colloc">
        <ant dir="src/cg-colloc" target="setup"/>
    </target>
    <target name="setup-dp-directe" depends="jars-dp-directe">
        <ant dir="src/dp-directe" target="setup"/>
    </target>
    <target name="setup-demande-achat" depends="jars-demande-achat">
        <ant dir="src/demande-achat" target="setup"/>
    </target>
    <target name="setup-drop-users" depends="jars-drop-users">
        <ant dir="src/drop-users" target="setup"/>
    </target>
    <target name="setup-edmn" depends="jars-edmn">
        <ant dir="src/edmn" target="setup"/>
    </target>
    <target name="setup-erar" depends="jars-erar">
        <ant dir="src/erar" target="setup"/>
    </target>
    <target name="setup-etat-frais" depends="jars-etat-frais">
        <ant dir="src/etat-frais" target="setup"/>
    </target>
    <target name="setup-etat-frais-spl" depends="jars-etat-frais,setup-etat-frais">
        <ant dir="src/etat-frais-spl" target="setup"/>
    </target>
    <target name="setup-facture-depense" depends="">
        <ant dir="src/facture-depense" target="setup"/>
    </target>
    <target name="setup-facture-recette" depends="">
        <ant dir="src/facture-recette" target="setup"/>
    </target>
    <target name="setup-import-batch" depends="jars-import-batch">
        <ant dir="src/import-batch" target="setup"/>
    </target>
    <target name="setup-mysql-persistence" depends="jars-mysql-persistence">
        <ant dir="src/mysql-persistence" target="setup"/>
    </target>
    <target name="setup-pes-aller" depends="jars-pes-aller">
        <ant dir="src/pes-aller" target="setup"/>
    </target>
    <target name="setup-pes-facture" depends="">
        <ant dir="src/pes-facture" target="setup"/>
    </target>
    <target name="setup-quittancement" depends="jars-quittancement">
        <ant dir="src/quittancement" target="setup"/>
    </target>
    <target name="setup-rsa" depends="jars-rsa">
        <ant dir="src/rsa" target="setup"/>
    </target>
    <target name="setup-rapport" depends="">
        <ant dir="src/rapport" target="setup"/>
    </target>
    <target name="setup-service-fait" depends="jars-service-fait">
        <ant dir="src/service-fait" target="setup"/>
    </target>
    <target name="setup-starter" depends="jars-starter">
        <ant dir="src/starter" target="setup"/>
    </target>
    <target name="setup-user-guide">
        <ant dir="src/user-guide" target="setup"/>
    </target>
    <target name="setup-versement" depends="">
        <ant dir="src/versement" target="setup"/>
    </target>
    <target name="setup-xemelios-core" depends="jars-xemelios-core">
        <ant dir="src/xemelios-core" target="setup"/>
    </target>
    <target name="setup-xml-marshall" depends="jars-xml-marshall">
        <ant dir="src/xml-marshall" target="setup"/>
    </target>
    <target name="setup-plugin-generator-pes-pjs" depends="jars-plugin-generator-pes-pjs">
        <ant dir="src/plugin-generator-pes-pjs" target="setup"/>
    </target>
    <target name="setup-plugin-generator-edmn" depends="jars-plugin-generator-edmn">
        <ant dir="src/plugin-generator-edmn" target="setup"/>
    </target>
    <target name="setup-plugin-signature-pes" depends="jars-plugin-signature-pes">
        <ant dir="src/plugin-signature-pes" target="setup"/>
    </target>
    <target name="setup-plugin-signerfichier-pes" depends="jars-plugin-signerfichier-pes">
        <ant dir="src/plugin-signerfichier-pes" target="setup"/>
    </target>
    
    <target name="jars" depends="" description="Construit les jars de Xemelios">
        <antcall target="jars-xml-marshall"/>
        <antcall target="jars-core"/>
        <antcall target="jars-batch"/>
        <antcall target="jars-mysql-persistence"/>
        <antcall target="jars-auth-aphm"/>
        <antcall target="jars-auth-basic"/>
        <antcall target="jars-auth-dgcp"/>
        <antcall target="jars-auth-ldap"/>
        <antcall target="jars-auth-std-db"/>

        <antcall target="jars-cfg-paye"/>
        <antcall target="jars-cg-colloc"/>
        <antcall target="jars-cg-etat"/>
        <antcall target="jars-pes-aller"/>
        <antcall target="jars-quittancement"/>
        <antcall target="jars-ref-collec-spl"/>
        <antcall target="jars-rsa"/>
        <antcall target="jars-erar"/>

        <antcall target="jars-starter"/>
        <antcall target="jars-xemelios-core"/>
        <antcall target="jars-plugin-generator-pes-pjs"/>
        <antcall target="jars-plugin-generator-edmn"/>
        <antcall target="jars-plugin-signerfichier-pes"/>
        <antcall target="jars-plugin-signature-pes"/>

        <antcall target="jars-import-batch"/>
        <antcall target="jars-batch"/>
        <antcall target="jars-etat-frais"/>
        <antcall target="jars-etat-frais-spl"/>
    </target>
    <target name="__configs" depends="compile-build-tools">
        <antcall target="config-xml-marshall"/>
        <antcall target="config-core"/>
        <antcall target="config-mysql-persistence"/>
        <antcall target="config-auth-aphm"/>
        <antcall target="config-auth-basic"/>
        <antcall target="config-auth-dgcp"/>
        <antcall target="config-auth-ldap"/>
        <antcall target="config-auth-std-db"/>

        <antcall target="config-carte-achat"/>
        <antcall target="config-cfg-paye"/>
        <antcall target="config-cg-colloc"/>
        <antcall target="config-cg-etat"/>
        <antcall target="config-edmn"/>
        <antcall target="config-erar"/>
        <antcall target="config-ertn"/>
        <antcall target="config-etat-frais"/>
        <antcall target="config-pes-facture"/>
        <antcall target="config-facture-depense"/>
        <antcall target="config-facture-recette"/>
        <antcall target="config-pes-aller"/>
        <antcall target="config-quittancement"/>
        <antcall target="config-rsa"/>
        <antcall target="config-rapport"/>
        <antcall target="config-versement"/>

        <antcall target="config-import-batch"/>

        <antcall target="config-xemelios-core"/>
        <antcall target="config-user-guide"/>

        <antcall target="config-plugin-signature-pes"/>
        <antcall target="config-plugin-signerfichier-pes"/>
        <antcall target="config-plugin-generator-pes-pjs"/>
        <antcall target="config-plugin-generator-edmn"/>

        <antcall target="config-starter"/>
    </target>
    <target name="configs" depends="__configs">
        <antcall target="gen-update"/>
    </target>
    <target name="check-config" depends="compile-build-tools">
        <ant dir="src/carte-achat" target="check-config"/>
        <ant dir="src/cfg-paye" target="check-config"/>
        <ant dir="src/cg-colloc" target="check-config"/>
        <ant dir="src/edmn" target="check-config"/>
        <ant dir="src/erar" target="check-config"/>
        <ant dir="src/etat-frais" target="check-config"/>
        <ant dir="src/pes-facture" target="check-config"/>
        <ant dir="src/facture-depense" target="check-config"/>
        <ant dir="src/facture-recette" target="check-config"/>
        <ant dir="src/pes-aller" target="check-config"/>
        <ant dir="src/quittancement" target="check-config"/>
        <ant dir="src/rapport" target="check-config"/>
        <ant dir="src/versement" target="check-config"/>
    </target>
    <target name="gen-update" depends="compile-build-tools">
        <java classname="fr.gouv.finances.cp.buildtools.Gen" fork="true" failonerror="true">
            <classpath>
                <pathelement path="src/build-tools/build/classes"/>
                <pathelement path="src/xemelios-core/lib/jacksum.jar"/>
            </classpath>
            <arg value="./build/config"/>
            <arg value="update.xml"/>
        </java>
        <xmlvalidate file="build/config/update.xml" lenient="true"/>
    </target>
    <target name="gen-update-private" depends="compile-build-tools">
        <antcall target="__gen-update">
            <param name="target.url" value="http://www.xemelios.org/private/updates33/"/>
        </antcall>
    </target>
    <target name="gen-update-strictly-private" depends="compile-build-tools">
        <antcall target="__gen-update">
            <param name="target.url" value="http://www.xemelios.org/private/strictly/"/>
        </antcall>
    </target>
    <target name="gen-update-erar" depends="compile-build-tools" description="generation d'un fichier de config pour les pilotes ERAR">
        <antcall target="__gen-update">
            <param name="target.url" value="http://xemelios.org/private/erar/"/>
            <param name="foreign.site" value="http://xemelios.org/updates33/update.xml"/>
        </antcall>
    </target>
    <!--target name="gen-update-v4" depends="compile-build-tools">
        <java classname="fr.gouv.finances.cp.buildtools.Gen" output="build/config/update.xml" fork="true" failonerror="true">
            <classpath>
                <pathelement path="src/build-tools/build/classes"/>
                <pathelement path="src/xemelios-core/lib/jacksum.jar"/>
            </classpath>
            <arg value="./build/config"/>
            <arg value="update.xml"/>
            <arg value="http://www.xemelios.org/private/v4/"/>
        </java>
        <xmlvalidate file="build/config/update.xml" lenient="true"/>
    </target-->
    <target name="__gen-update" depends="compile-build-tools">
        <fail message="property target.url not set !" unless="target.url"/>
        <java classname="fr.gouv.finances.cp.buildtools.Gen" fork="true" failonerror="true">    <!-- output="build/config/update.xml"  -->
            <classpath>
                <pathelement path="src/build-tools/build/classes"/>
                <pathelement path="src/xemelios-core/lib/jacksum.jar"/>
            </classpath>
            <arg value="./build/config"/>
            <arg value="update.xml"/>
            <arg value="${target.url}"/>
            <arg value="${foreign.site}"/>
        </java>
        <xmlvalidate file="build/config/update.xml" lenient="true"/>
    </target>
    <target name="setup" depends="setup-core,
                                    setup-auth-dgcp,
                                    setup-auth-ldap,
                                    setup-auth-aphm,
                                    setup-auth-basic,
                                    setup-auth-std-db,
                                    setup-carte-achat,
                                    setup-cfg-paye,
                                    setup-cg-colloc,
                                    setup-edmn,
                                    setup-erar,
                                    setup-etat-frais,
                                    setup-etat-frais-spl,
                                    setup-facture-depense,
                                    setup-facture-recette,
                                    setup-import-batch,
                                    setup-mysql-persistence,
                                    setup-pes-aller,
                                    setup-pes-facture,
                                    setup-quittancement,
                                    setup-rsa,
                                    setup-rapport,
                                    setup-starter,
                                    setup-versement,
                                    setup-user-guide,
                                    setup-xemelios-core,
                                    setup-xml-marshall,
                                    setup-plugin-generator-pes-pjs,
                                    setup-plugin-generator-edmn,
                                    setup-plugin-signature-pes,
                                    setup-plugin-signerfichier-pes,
                                    jars-build-tools"
                description="Prépare l'image du répertoire pour générer le setup">
        <copy todir="build/setup/root">
            <fileset dir="src/resources/templates">
                <include name="authentication.*"/>
                <include name="mysql.properties.*"/>
                <include name="xemelios.bat*"/>
                <include name="xemelios.pr*"/>
                <include name="viewdoc.cmd*"/>
                <include name="CP.bat"/>
            </fileset>
            <fileset dir="src/resources/icons">
                <include name="*"/>
            </fileset>
            <fileset dir=".">
                <exclude name="CVS"/>
                <include name="LICENSE/**/*"/>
            </fileset>
        </copy>
        <java
            classpath="src/build-tools/build/jars/build-tools.jar"
            classname="fr.gouv.finances.cp.buildtools.MakeComponentsFile"
            output="build/setup/root/components.xml">
            <arg value="src/core"/>
            <arg value="src/auth-dgcp"/>
            <arg value="src/auth-ldap"/>
            <arg value="src/auth-aphm"/>
            <arg value="src/auth-basic"/>
            <arg value="src/carte-achat"/>
            <arg value="src/cfg-paye"/>
            <arg value="src/cg-colloc"/>
            <arg value="src/edmn"/>
            <arg value="src/erar"/>
            <arg value="src/etat-frais"/>
            <arg value="src/etat-frais-spl"/>
            <arg value="src/facture-depense"/>
            <arg value="src/facture-recette"/>
            <arg value="src/import-batch"/>
            <arg value="src/mysql-persistence"/>
            <arg value="src/pes-aller"/>
            <arg value="src/pes-facture"/>
            <arg value="src/quittancement"/>
            <arg value="src/rsa"/>
            <arg value="src/rapport"/>
            <arg value="src/starter"/>
            <arg value="src/versement"/>
            <arg value="src/user-guide"/>
            <arg value="src/xemelios-core"/>
            <arg value="src/xml-marshall"/>
            <arg value="src/plugin-generator-pes-pjs"/>
            <arg value="src/plugin-generator-edmn"/>
            <arg value="src/plugin-signature-pes"/>
            <arg value="src/plugin-signerfichier-pes"/>
        </java>
        <xmlvalidate failonerror="true" lenient="true" file="build/setup/root/components.xml"/>
        <java classname="fr.gouv.finances.cp.buildtools.SetupSigner">
            <classpath>
                <pathelement path="src/build-tools/build/classes"/>
                <fileset dir="src/core/lib" includes="*.jar"/>
            </classpath>
            <arg value="build/setup"/>
        </java>

    </target>
    <target name="linux-archive" depends="clean,jars,setup" description="Prépare l'archive pour les install linux">
        <copy todir="build/setup">
            <fileset dir="src/resources/icons">
                <include name="xemelios.xpm"/>
            </fileset>
        </copy>
        <copy file="src/resources/templates/xemelios.properties.template" tofile="build/setup/root/xemelios.properties"/>
        <propertyfile file="build/setup/root/xemelios.properties">
            <entry key="xemelios.dir" value="/opt/Xemelios"/>
            <entry key="xemelios.prg" value="${xemelios.dir}"/>
            <entry key="navigator.url.prefix" value="file://"/>
        </propertyfile>
        <!--copy file="src/resources/templates/mysql.properties.template" tofile="build/setup/mysql.properties"/-->
        <propertyfile file="build/setup/root/mysql.properties">
            <entry key="driver.class" value="com.mysql.jdbc.Driver"/>
            <entry key="database.url" value="jdbc:mysql://localhost/xemelios?jdbcCompliantTruncation=false&amp;dumpQueriesOnException=true"/>
            <entry key="user" value="xemelios"/>
            <entry key="password" value="Am/xL6*::"/>
            <!--entry key="password" value="Am/x/W&lt;4:"/-->
        </propertyfile>
        <copy file="src/resources/templates/authentication.properties.template" tofile="build/setup/root/authentication.properties"/>
        <propertyfile file="build/setup/root/authentication.properties">
            <entry key="authentication.manager" value="fr.gouv.finances.cp.xemelios.auth.basic.mysql.Manager"/>
        </propertyfile>
        <copy file="src/resources/templates/xemelios.sh.template" tofile="build/setup/root/xemelios.sh"/>
        <copy file="src/resources/templates/import-masse.sh" tofile="build/setup/root/import-masse.sh"/>
        <chmod file="build/setup/root/xemelios.sh" perm="a+x"/>
        <chmod file="build/setup/root/import-masse.sh" perm="a+x"/>
        <!--mkdir dir="Xemelios"/-->
        <move file="build/setup" tofile="build/Xemelios"/>
        <!--move file="build/Xemelios/root/doc" tofile="build/Xemelios/doc"/-->
        <property file="src/xemelios-core/component.properties"/>
        <exec executable="tar" osfamily="unix" dir="build">
            <arg value="czvf"/>
            <arg value="xemelios-${component.release}-noarch.tgz"/>
            <arg value="Xemelios/"/>
        </exec>
    </target>
    <target name="mk-output-dirs">
	    <mkdir dir="build/config"/>
            <mkdir dir="build/setup"/>
    </target>
    
    <target name="clean">
        <ant dir="src/auth-aphm" target="clean"/>
        <ant dir="src/auth-basic" target="clean"/>
        <ant dir="src/auth-dgcp" target="clean"/>
        <ant dir="src/auth-ldap" target="clean"/>
        <ant dir="src/auth-std-db" target="clean"/>
        <ant dir="src/batch" target="clean"/>
        <ant dir="src/build-tools" target="clean"/>
        <ant dir="src/carte-achat" target="clean"/>
        <ant dir="src/cfg-paye" target="clean"/>
        <ant dir="src/cg-etat" target="clean"/>
        <ant dir="src/cg-colloc" target="clean"/>
        <ant dir="src/core" target="clean"/>
        <ant dir="src/demande-achat" target="clean"/>
        <ant dir="src/dp-directe" target="clean"/>
        <ant dir="src/drop-users" target="clean"/>
        <ant dir="src/edmn" target="clean"/>
        <ant dir="src/entrees-directes-stock" target="clean"/>
        <ant dir="src/erar" target="clean"/>
        <ant dir="src/ertn" target="clean"/>
        <ant dir="src/etat-frais" target="clean"/>
        <ant dir="src/etat-frais-spl" target="clean"/>
        <ant dir="src/facture-depense" target="clean"/>
        <ant dir="src/facture-recette" target="clean"/>
        <ant dir="src/factures-sans-engagement-tiers" target="clean"/>
        <ant dir="src/import-batch" target="clean"/>
        <ant dir="src/mysql-persistence" target="clean"/>
        <ant dir="src/pes-aller" target="clean"/>
        <ant dir="src/pes-facture" target="clean"/>
        <ant dir="src/plugin-generator-pes-pjs" target="clean"/>
        <ant dir="src/plugin-generator-edmn" target="clean"/>
        <ant dir="src/plugin-signature-pes" target="clean"/>
        <ant dir="src/plugin-signerfichier-pes" target="clean"/>
        <ant dir="src/quittancement" target="clean"/>
        <ant dir="src/ref-collec-spl" target="clean"/>
        <ant dir="src/rsa" target="clean"/>
        <ant dir="src/rapport" target="clean"/>
        <ant dir="src/starter" target="clean"/>
        <ant dir="src/service-fait" target="clean"/>
        <ant dir="src/sorties-directes-stock" target="clean"/>
        <ant dir="src/versement" target="clean"/>
        <ant dir="src/user-guide" target="clean"/>
        <ant dir="src/xemelios-core" target="clean"/>
        <ant dir="src/xml-marshall" target="clean"/>
        <delete dir="build" failonerror="false"/>
        <delete dir="temp" failonerror="false"/>
        <delete file="web.xml" failonerror="false"/>
    </target>

    <target name="run" depends="jars" description="Lance l'execution de Xemelios">
        <property name="navigator.command.line" value="/usr/bin/mozilla"/>
        <property name="xemelios.src.dir" value="."/>
	    <java classname="fr.gouv.finances.cp.xemelios.Splash" fork="true">
                <classpath>
                    <pathelement location="src/starter/build/jars/xemelios.jar"/>
                    <pathelement location="src/xml-marshall/build/jars/xml-marshall.jar"/>
                    <fileset dir="src/xemelios-core/lib" includes="*.jar"/>
                    <fileset dir="src/xemelios-core/build/jars" includes="*.jar"/>
                    <fileset dir="src/core/lib" includes="*.jar"/>
                    <pathelement location="src/auth-dgcp/build/jars/auth-dgcp.jar"/>
                    <pathelement location="src/auth-aphm/build/jars/auth-aphm.jar"/>
                    <pathelement location="src/auth-std-db/build/jars/auth-std-db.jar"/>
                    <pathelement location="src/cfg-paye/build/jars/paye.jar"/>
                    <pathelement location="src/import-batch/build/jars/import-batch.jar"/>
                    <pathelement location="src/core/build/jars/core-xemelios.jar"/>
                    <fileset dir="src/mysql-persistence/lib" includes="*.jar"/>
                    <pathelement location="src/mysql-persistence/build/jars/mysql-data-impl.jar"/>
                    <pathelement location="src/pes-aller/build/jars/controls-pesv2.jar"/>
                <!--pathelement location="src/plugin-generator-pes-pjs/build/jars/plugin-gen-pes-pjs.jar"/>
		    	<pathelement location="src/plugin-generator-pes-pjs/build/jars/plugin-gen-edmn.jar"/-->
                <!--pathelement location="src/plugin-signature-pes/build/jars/globsignvfy.jar"/-->
                    <fileset dir="src/plugin-signature-pes/build/jars">
                        <include name="signature-verifier.jar"/>
		            <!--exclude name="plugin-signature-pes.jar"/-->
                    </fileset>
                    <pathelement location="src/dp-directe/build/jars/dp-directe.jar"/>
                </classpath>
                <jvmarg value="-Dxemelios.mysql.config.filename=${xemelios.src.dir}/conf/mysql.properties"/>
                <jvmarg value="-Dxemelios.log4j.xml=${xemelios.src.dir}/conf/log4j.xml"/>
                <jvmarg value="-Dxemelios.reset.config=true"/>
                <jvmarg value="-Dxemelios.tools.directory=${xemelios.src.dir}/src/plugin-test/build/jars,${xemelios.src.dir}/src/plugin-generator-pes-pjs/build/jars,${xemelios.src.dir}/src/plugin-generator-edmn/build/jars,${xemelios.src.dir}/src/plugin-signature-pes/build/jars"/>
                <jvmarg value="-Dadmin.menu.gc=true"/>
                <jvmarg value="-Dadmin.menu=true"/>
                <jvmarg value="-Dxemelios.skip.update.check=true"/>
                <jvmarg value="-Dxemelios.documents.def.dir=${xemelios.src.dir}/src/carte-achat/conf,${xemelios.src.dir}/src/cfg-paye/conf,${xemelios.src.dir}/src/facture-depense/conf,${xemelios.src.dir}/src/facture-recette/conf,${xemelios.src.dir}/src/pes-aller/conf,${xemelios.src.dir}/src/pes-facture/conf,${xemelios.src.dir}/src/quittancement/conf,${xemelios.src.dir}/src/rapport/conf,${xemelios.src.dir}/src/versement/conf,${xemelios.src.dir}/src/etat-frais/conf,${xemelios.src.dir}/src/dp-directe/conf"/>
                <jvmarg value="-Dxemelios.date.format=dd/MM/yyyy"/>
                <jvmarg value="-Dxemelios.resources.location=${xemelios.src.dir}/src/xemelios-core/res"/>
                <jvmarg value="-Dxemelios.available.datalayers=fr.gouv.finances.cp.xemelios.data.impl.MySqlDataLayer"/>
                <jvmarg value="-Dxemelios.data.impl=mysql"/>
                <jvmarg value="-Dxemelios.authentication.config.filename=${xemelios.src.dir}/conf/authentication.properties"/>
                <jvmarg value="-Dxemelios.navigation.force-reload=true"/>
                <jvmarg value="-Dxemelios.control.skipSchemaValidation=false"/>
                <jvmarg value="-Dxemelios.export.xls=true"/>
                <jvmarg value="-Dxemelios.log.dom.doc=false"/>
                    <!--jvmarg value="-Dxemelios.exporter.class=fr.gouv.finances.cp.xemelios.export.CsvExporter"/-->
                <jvmarg value="-Djava.library.path=lib"/>
                <jvmarg value="-Djavax.xml.xpath.XPathFactory:http://java.sun.com/jaxp/xpath/dom=com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl"/>
                <!--jvmarg value="-Dnavigator.command.line=C:/Program Files/Internet Explorer/IEXPLORE.EXE"/-->
                <jvmarg value="-Dsax.parser.uri=org.apache.xerces.parsers.SAXParser"/>
                    <!--jvmarg value="-Dxemelios.tools.avoid-jar-loading=true"/-->
                <jvmarg value="-Xms400m"/>
                <jvmarg value="-Xmx600m"/>
	    </java>
    </target>

    <target name="run-test-plugin-signature-pes" depends="jars" description="Lance le plugin signature pes">
            <property name="xemelios.src.dir" value="/devel/XEMELIOS"/>
	    <java classname="fr.gouv.finances.cp.xemelios.plugin.signature.DlgGlobalSignature" fork="true">
		    <classpath>
			    <pathelement location="src/starter/build/jars/xemelios.jar"/>
                            <pathelement location="src/xml-marshall/build/jars/xml-marshall.jar"/>
			    <fileset dir="src/xemelios-core/lib" includes="*.jar"/>
			    <fileset dir="src/xemelios-core/build/jars" includes="*.jar"/>
			    <pathelement location="src/auth-dgcp/build/jars/auth-dgcp.jar"/>
                            <pathelement location="src/auth-aphm/build/jars/auth-aphm.jar"/>
			    <pathelement location="src/cfg-paye/build/jars/paye.jar"/>
			    <pathelement location="src/import-batch/build/jars/import-batch.jar"/>
			    <fileset dir="src/mysql-persistence/lib" includes="*.jar"/>
			    <pathelement location="src/mysql-persistence/build/jars/mysql-data-impl.jar"/>
			    <pathelement location="src/pes-aller/build/jars/controls-pesv2.jar"/>
                            <pathelement location="src/plugin-signature-pes/build/jars/signvfy.jar"/>
		    </classpath>
                    <jvmarg value="-Dxemelios.mysql.config.filename=${xemelios.src.dir}/conf/mysql.properties"/>
                    <jvmarg value="-Dxemelios.log4j.xml=${xemelios.src.dir}/conf/log4j.xml"/>
                    <jvmarg value="-Dxemelios.reset.config=true"/>
                    <jvmarg value="-Dxemelios.tools.directory=${xemelios.src.dir}/src/plugin-test/build/jars,${xemelios.src.dir}/src/plugin-generator-pes-pjs/build/jars,${xemelios.src.dir}/src/plugin-generator-edmn/build/jars"/>
                    <jvmarg value="-Dadmin.menu.gc=true"/>
                    <jvmarg value="-Dadmin.menu=true"/>
                    <jvmarg value="-Dxemelios.skip.update.check=true"/>
                    <jvmarg value="-Dxemelios.documents.def.dir=${xemelios.src.dir}/src/carte-achat/conf,${xemelios.src.dir}/src/cfg-paye/conf,${xemelios.src.dir}/src/facture-depense/conf,${xemelios.src.dir}/src/facture-recette/conf,${xemelios.src.dir}/src/pes-aller/conf,${xemelios.src.dir}/src/pes-facture/conf,${xemelios.src.dir}/src/quittancement/conf,${xemelios.src.dir}/src/rapport/conf,${xemelios.src.dir}/src/versement/conf"/>
                    <jvmarg value="-Dxemelios.date.format=dd/MM/yyyy"/>
                    <jvmarg value="-Dxemelios.resources.location=${xemelios.src.dir}/src/xemelios-core/res"/>
                    <jvmarg value="-Dxemelios.available.datalayers=fr.gouv.finances.cp.xemelios.data.impl.MySqlDataLayer"/>
                    <jvmarg value="-Dxemelios.data.impl=mysql"/>
                    <jvmarg value="-Dxemelios.authentication.config.filename=${xemelios.src.dir}/conf/authentication.properties"/>
                    <jvmarg value="-Dxemelios.navigation.force-reload=true"/>
                    <jvmarg value="-Dxemelios.control.skipSchemaValidation=false"/>
                    <jvmarg value="-Dxemelios.export.xls=true"/>
                    <jvmarg value="-Dxemelios.log.dom.doc=false"/>
                    <jvmarg value="-Dxemelios.exporter.class=fr.gouv.finances.cp.xemelios.export.CsvExporter"/>
                    <jvmarg value="-Djava.library.path=src/xemelios-core/lib"/>
                    <jvmarg value="-Djavax.xml.xpath.XPathFactory:http://java.sun.com/jaxp/xpath/dom=com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl"/>
                    <jvmarg value="-Dnavigator.command.line=C:/Program Files/Internet Explorer/IEXPLORE.EXE"/>
                    <jvmarg value="-Dsax.parser.uri=org.apache.xerces.parsers.SAXParser"/>
                    <!--jvmarg value="-Dxemelios.tools.avoid-jar-loading=true"/-->
                    <jvmarg value="-Xms400m"/>
                    <jvmarg value="-Xmx600m"/>
	    </java>
    </target>

    <target name="run-editor-controller" depends="jars" description="Lance l'analyseur autonome">
        <java  classname="fr.gouv.finances.cp.xemelios.controls.editors.StandaloneController" fork="true">
            <classpath>
                <pathelement location="src/starter/build/jars/xemelios.jar"/>
                <pathelement location="src/pes-aller/build/jars/controls-pesv2.jar"/>
                <pathelement location="src/xml-marshall/build/jars/xml-marshall.jar"/>
                <pathelement location="src/core/build/jars/core-xemelios.jar"/>
                <fileset dir="src/core/lib" includes="*.jar"/>
                <fileset dir="src/xemelios-core/lib" includes="*.jar"/>
                <fileset dir="src/xemelios-core/build/jars" includes="*.jar"/>
            </classpath>
            <jvmarg value="-v"/>
            <jvmarg value="-Dxemelios.log4j.xml=${user.dir}/conf/log4j.xml"/>
            <jvmarg value="-Dxemelios.documents.def.dir=${user.dir}/src/pes-aller/conf,${user.dir}/src/rapport/conf"/>
            <!--jvmarg value="-Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl"/-->
            <jvmarg value="-Xms128m"/>
            <jvmarg value="-Xmx256m"/>
        </java>
    </target>

    <target name="make-command-line-controller" depends="jars,setup" description="Cree le package de l'analyseur en ligne de commande">
      <!-- Constituer un repertoire lib temporaire avec tous les jar necessaires -->
      <mkdir dir="commandLineController/lib"/>
      <copy todir="commandLineController/lib">
        <fileset dir="src/starter/build/jars" includes="*.jar"/>
      </copy>
      <copy todir="commandLineController/lib">
        <fileset dir="src/pes-aller/build/jars" includes="*.jar"/>
      </copy>
      <copy todir="commandLineController/lib">
        <fileset dir="src/xml-marshall/build/jars" includes="*.jar"/>
      </copy>
      <copy todir="commandLineController/lib">
        <fileset dir="src/core/lib" includes="*.jar"/>
      </copy>
      <copy todir="commandLineController/lib">
        <fileset dir="src/core/build/jars" includes="*.jar"/>
      </copy>
      <copy todir="commandLineController/lib">
        <fileset dir="src/xemelios-core/lib" includes="*.jar"/>
      </copy>
      <!-- refaire un jar specifique avec classe principale fr.gouv.finances.cp.xemelios.controls.editors.CommandLineController et classpath la librairie ci dessus -->
      <property file="component.properties"/>
      <copy file="src/xemelios-core/manifest/manifestclc.txt" tofile="commandLineController/manifest.txt">
        <filterset>
          <filter token="version" value="${component.release}"/>
          <filter token="name" value="${component.name}"/>
        </filterset>
      </copy>
      <jar destfile="commandLineController/command-line-controller.jar" basedir="src/xemelios-core/build/classes" manifest="commandLineController/manifest.txt"/>
      <copy file="src/resources/templates/commandlinecontroller.bat.template" tofile="commandLineController/commandlinecontroller.bat"/>
      <copy file="src/resources/templates/commandlinecontroller.sh.template" tofile="commandLineController/commandlinecontroller.sh"/>
      <copy todir="commandLineController">
          <fileset dir="build/setup/root" includes="documents-def/**"/>
      </copy>
      <mkdir dir="commandLineController/conf" />
      <copy todir="commandLineController/conf">
          <fileset dir="conf" includes="log4j*"/>
      </copy>
      <!-- preparer une archive avec le jar, la librairie et 2 fichiers de commande .bat et .sh appelant le jar 
      --> 
      <delete file=".zip"/>
      <zip file="build/CommandLineController.zip" basedir="." includes="commandLineController/**/*" excludes="commandLineController/manifest.txt"/>
      <delete dir="commandLineController" />
    </target>

    <target name="run-analyse-flux-pes" depends="jars" description="Lance l'analyseur autonome">
        <java classname="fr.gouv.finances.cp.xemelios.ui.ViewXemeliosDocument" fork="true">
            <classpath>
                <pathelement location="src/starter/build/jars/xemelios.jar"/>
		<pathelement location="src/pes-aller/build/jars/controls-pesv2.jar"/>
                <pathelement location="src/xml-marshall/build/jars/xml-marshall.jar"/>
                <fileset dir="src/xemelios-core/lib" includes="*.jar"/>
                <fileset dir="src/xemelios-core/build/jars" includes="*.jar"/>
            </classpath>
            <!--arg value="${fichierflux}"/-->
            <!--<arg value="PES_Aller"/-->
            <jvmarg value="-Dxemelios.log4j.xml=${user.dir}/conf/log4j.xml"/>
            <jvmarg value="-Dxemelios.documents.def.dir=${user.dir}/src/pes-aller/conf,${user.dir}/src/rapport/conf"/>
            <!--jvmarg value="-Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl"/-->
            <jvmarg value="-Xms128m"/>
            <jvmarg value="-Xmx256m"/>
        </java>
    </target>

    <target name="apidocs" depends="javadoc"/>

    <target name="tag-components" depends="
        tag-auth-aphm,
        tag-auth-basic,
        tag-auth-dgcp,
        tag-auth-ldap,
        tag-auth-std-db,
        tag-batch,
        tag-carte-achat,
        tag-cfg-paye,
        tag-cg-colloc,
        tag-core,
        tag-demande-achat,
        tag-dp-directe,
        tag-drop-users,
        tag-edmn,
        tag-erar,
        tag-ertn,
        tag-etat-frais,
        tag-etat-frais-spl,
        tag-facture-depense,
        tag-facture-recette,
        tag-import-batch,
        tag-mysql-persistence,
        tag-pes-aller,
        tag-pes-facture,
        tag-plugin-generator-edmn,
        tag-plugin-generator-pes-pjs,
        tag-plugin-signature-pes,
        tag-plugin-signerfichier-pes,
        tag-quittancement,
        tag-rsa,
        tag-rapport,
        tag-user-guide,
        tag-service-fait,
        tag-starter,
        tag-versement,
        tag-xemelios-core,
        tag-xemelios-web,
        tag-xml-marshall">
    </target>

    <target name="tag-auth-aphm" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="auth-aphm"/>
        </ant>
    </target>
    <target name="tag-auth-basic" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="auth-basic"/>
        </ant>
    </target>
    <target name="tag-auth-dgcp" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="auth-dgcp"/>
        </ant>
    </target>
    <target name="tag-auth-ldap" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="auth-ldap"/>
        </ant>
    </target>
    <target name="tag-auth-std-db" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="auth-std-db"/>
        </ant>
    </target>
    <target name="tag-batch" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="batch"/>
        </ant>
    </target>
    <target name="tag-carte-achat" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="carte-achat"/>
        </ant>
    </target>
    <target name="tag-cfg-paye" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="cfg-paye"/>
        </ant>
    </target>
    <target name="tag-cg-colloc" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="cg-colloc"/>
        </ant>
    </target>
    <target name="tag-core" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="core"/>
        </ant>
    </target>
    <target name="tag-demande-achat" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="demande-achat"/>
        </ant>
    </target>
    <target name="tag-dp-directe" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="dp-directe"/>
        </ant>
    </target>
    <target name="tag-drop-users" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="drop-users"/>
        </ant>
    </target>
    <target name="tag-edmn" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="edmn"/>
        </ant>
    </target>
    <target name="tag-erar" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="erar"/>
        </ant>
    </target>
    <target name="tag-ertn" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="ertn"/>
        </ant>
    </target>
    <target name="tag-etat-frais" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="etat-frais"/>
        </ant>
    </target>
    <target name="tag-etat-frais-spl" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="etat-frais-spl"/>
        </ant>
    </target>
    <target name="tag-facture-depense" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="facture-depense"/>
        </ant>
    </target>
    <target name="tag-facture-recette" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="facture-recette"/>
        </ant>
    </target>
    <target name="tag-import-batch" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="import-batch"/>
        </ant>
    </target>
    <target name="tag-mysql-persistence" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="mysql-persistence"/>
        </ant>
    </target>
    <target name="tag-pes-aller" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="pes-aller"/>
        </ant>
    </target>
    <target name="tag-pes-facture" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="pes-facture"/>
        </ant>
    </target>
    <target name="tag-plugin-generator-pes-pjs" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="plugin-generator-pes-pjs"/>
        </ant>
    </target>
    <target name="tag-plugin-generator-edmn" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="plugin-generator-edmn"/>
        </ant>
    </target>
    <target name="tag-plugin-signature-pes" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="plugin-signature-pes"/>
        </ant>
    </target>
    <target name="tag-plugin-signerfichier-pes" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="plugin-signerfichier-pes"/>
        </ant>
    </target>
    <target name="tag-quittancement" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="quittancement"/>
        </ant>
    </target>
    <target name="tag-rsa" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="rsa"/>
        </ant>
    </target>
    <target name="tag-rapport" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="rapport"/>
        </ant>
    </target>
    <target name="tag-service-fait" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="service-fait"/>
        </ant>
    </target>
    <target name="tag-starter" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="starter"/>
        </ant>
    </target>
    <target name="tag-user-guide" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="user-guide"/>
        </ant>
    </target>
    <target name="tag-versement" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="versement"/>
        </ant>
    </target>
    <target name="tag-xemelios-core" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="xemelios-core"/>
        </ant>
    </target>
    <target name="tag-xemelios-web" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="xemelios-web"/>
        </ant>
    </target>
    <target name="tag-xml-marshall" depends="jars-build-tools">
        <ant antfile="./build-tag.xml" inheritall="false" inheritrefs="false" target="tag" dir=".">
            <property name="target.component" value="xml-marshall"/>
        </ant>
    </target>
    
    <target name="deploy-setup" depends="setup" if="xemelios.deploy.dir">
        <copy todir="${xemelios.deploy.dir}/Xemelios/doc">
            <fileset dir="build/setup/doc" includes="**/*"/>
        </copy>
        <copy todir="${xemelios.deploy.dir}/Xemelios/root">
            <fileset dir="build/setup">
                <include name="*.*"/>
                <include name="documents-def/**/*"/>
                <include name="lib/**/*"/>
            </fileset>
        </copy>
        <delete file="XemeliosMySql.zip"/>
        <zip file="XemeliosMySql.zip" basedir="${xemelios.deploy.dir}" includes="**/*"/>
    </target>
    
    <target name="check-configs" depends="jars-build-tools,jars-xemelios-core" description="VÃ©rifie la validitÃ© des fichiers de configuration mÃ©tier">
        <java classname="fr.gouv.finances.cp.buildtools.chkconfig.CheckConfigFile">
            <classpath>
                <pathelement location="src/build-tools/build/jars/build-tools.jar"/>
                <fileset dir="src/xemelios-core/lib"><include name="*.jar"/></fileset>
                <pathelement location="src/xml-marshall/build/jars/xml-marshall.jar"/>
                <pathelement location="src/xemelios-core/build/jars/xemelios-core.jar"/>
            </classpath>
            <arg value="src/carte-achat/conf,src/cfg-paye/conf,src/facture-recette/conf,src/facture-depense/conf,src/pes-aller/conf,src/pes-facture/conf,src/quittancement/conf,src/versement/conf,src/rapport/conf,src/etat-frais/conf"/>
        </java>
    </target>

    <target name="build-lgpl" description="Genere l'arborescence LGPL" depends="get-lgpl-dir,jars-build-tools">
        <delete dir="${lgpl.dir.location}" failonerror="false"/>
        <copy todir="${lgpl.dir.location}" includeemptydirs="false">
            <fileset dir="." includes="conf/**/*"/>
            <fileset dir="." includes="defs/**/*"/>
            <fileset dir="." includes="*"/>
            <fileset dir="." includes="src/**">
                <exclude name="**/*.java"/>
                <exclude name="**/build/**"/>
                <exclude name="**/*mysql*"/>
            </fileset>
            <fileset dir="." includes="LICENSE/**"/>
        </copy>
        <replace file="${lgpl.dir.location}/LICENSE/license.txt" token="GNU General" value="GNU Lesser General"/>
        <java classname="fr.gouv.finances.cp.buildtools.LgplConverter" failonerror="true" fork="true">
            <classpath>
                <pathelement path="src/build-tools/build/jars/build-tools.jar"/>
            </classpath>
            <arg value="."/>
            <arg value="${lgpl.dir.location}"/>
        </java>
    </target>

    <target name="war" description="Génère le war de déploiement de l'appli web" depends="jars,__configs">
        <ant dir="src/xemelios-web" target="makeExplodedWar"/>
        <ant dir="src/xemelios-web" target="jars"/>
        <delete dir="./temp"/>
        <mkdir dir="./temp"/>
        <copy todir="./temp">
            <fileset dir="src/xemelios-web/build/xemelios-web">
                <include name="**/*"/>
                <exclude name="**/web.xml"/>
                <exclude name="**/mysql.properties"/>
                <exclude name="**/META-INF"/>
            </fileset>
        </copy>
		<propertyfile file="./temp/WEB-INF/mysql.properties">
			<entry key="jndi.poolname" value="java:/comp/env/jdbc/xemeliosDB"/>
		</propertyfile>
        <mkdir dir="./temp/WEB-INF/documents-def"/>
        <copy todir="./temp/WEB-INF/documents-def">
            <fileset dir="src/cfg-paye/conf">
                <include name="**/*"/>
                <exclude name="**/CVS"/>
            </fileset>
            <fileset dir="src/carte-achat/conf">
                <include name="**/*"/>
                <exclude name="**/CVS"/>
            </fileset>
            <fileset dir="src/cg-colloc/conf">
                <include name="**/*"/>
                <exclude name="**/CVS"/>
            </fileset>
            <fileset dir="src/cg-etat/conf">
                <include name="**/*"/>
                <exclude name="**/CVS"/>
            </fileset>
            <fileset dir="src/edmn/conf">
                <include name="**/*"/>
                <exclude name="**/CVS"/>
            </fileset>
            <fileset dir="src/ertn/conf">
                <include name="**/*"/>
                <exclude name="**/CVS"/>
            </fileset>
            <fileset dir="src/erar/conf">
                <include name="**/*"/>
                <exclude name="**/CVS"/>
            </fileset>
            <fileset dir="src/etat-frais/conf">
                <include name="**/*"/>
                <exclude name="**/CVS"/>
            </fileset>
            <fileset dir="src/facture-depense/conf">
                <include name="**/*"/>
                <exclude name="**/CVS"/>
            </fileset>
            <fileset dir="src/facture-recette/conf">
                <include name="**/*"/>
                <exclude name="**/CVS"/>
            </fileset>
            <fileset dir="src/pes-aller/conf">
                <include name="**/*"/>
                <exclude name="**/CVS"/>
            </fileset>
            <fileset dir="src/pes-facture/conf">
                <include name="**/*"/>
                <exclude name="**/CVS"/>
            </fileset>
            <fileset dir="src/quittancement/conf">
                <include name="**/*"/>
                <exclude name="**/CVS"/>
            </fileset>
            <fileset dir="src/versement/conf">
                <include name="**/*"/>
                <exclude name="**/CVS"/>
            </fileset>
        </copy>
        <mkdir dir="./temp/user-guide"/>
        <copy todir="./temp/user-guide">
            <fileset dir="src/user-guide/doc">
                <include name="**/*"/>
                <exclude name="**/CVS"/>
            </fileset>
        </copy>
        <delete file="./temp/WEB-INF/log4j.xml"/>
        <copy todir="./temp/WEB-INF" file="./src/xemelios-web/clients/log4j.xml"/>
        <!-- preparation du web.xml-->
        <xslt style="src/xemelios-web/webxml-filter.xsl" in="src/xemelios-web/web/WEB-INF/web.xml" out="web.xml"/>
        <war destfile="build/xemelios.war" webxml="web.xml" basedir="./temp"/>
        <!--delete file="web.xml"/-->
    </target>
    <target name="webxml">
        <xslt style="src/xemelios-web/webxml-filter.xsl" in="src/xemelios-web/web/WEB-INF/web.xml" out="web.xml"/>
    </target>
    <target name="war-CdC-spl" depends="war">
        <delete file="build/xemelios.war" />
        <move file="web.xml" tofile="web-origin.xml"/>
        <property name="specific-filename" value="${basedir}/src/xemelios-web/clients/CdC/web.xml"/>
        <xslt style="src/xemelios-web/clients/CdC/webxml-filter.xsl" in="web-origin.xml" out="web.xml">
            <param name="specific-filename" expression="${specific-filename}"/>
        </xslt>
        <move file="./temp/WEB-INF/struts-config.xml" tofile="./temp/WEB-INF/struts-config-origin.xml"/>
        <xslt style="src/xemelios-web/clients/CdC/strutsconfig-filter.xsl" in="./temp/WEB-INF/struts-config-origin.xml" out="./temp/WEB-INF/struts-config.xml"/>
        <delete dir="./temp/WEB-INF/documents-def"/>
        <mkdir dir="./temp/WEB-INF/documents-def"/>
        <copy todir="./temp/WEB-INF/documents-def">
            <fileset dir="src/cfg-paye/conf">
                <include name="**/*"/>
                <exclude name="**/CVS"/>
            </fileset>
            <fileset dir="src/cg-colloc/conf">
                <include name="**/*"/>
                <exclude name="**/CVS"/>
            </fileset>
            <fileset dir="src/pes-aller/conf">
                <include name="**/*"/>
                <exclude name="**/CVS"/>
            </fileset>
        </copy>
<!-- la license JESPA -->
        <mkdir dir="tmp"/>
        <unjar src="src/xemelios-web/lib/jespa-1.0.7.jar" dest="tmp"/>
        <get src="${ccomptes.fr.jespa.license.key.location}" dest="tmp/jespa/license.key"/>
        <jar destfile="./temp/WEB-INF/lib/jespa-1.0.7.jar" basedir="tmp" filesetmanifest="skip" manifest="tmp/META-INF/MANIFEST.MF"/>
        <delete dir="tmp"/>
        <mkdir dir="./temp/META-INF"/>
        <!--copy todir="./temp/META-INF" file="src/xemelios-web/clients/CdC/context.xml"/-->
<!-- l'aide en ligne qui est spécifique -->
        <delete dir="./temp/user-guide"/>
        <mkdir dir="./temp/user-guide"/>
        <copy todir="./temp/user-guide">
            <fileset dir="src/xemelios-web/clients/CdC/aide/doc">
                <include name="**/*"/>
                <exclude name="**/CVS"/>
            </fileset>
        </copy>
        <war destfile="build/xemelios.war" webxml="web.xml" basedir="./temp">
            <exclude name="**/struts-config-origin.xml"/>
        </war>
        <delete dir="./temp/META-INF"/>
        <delete file="web.xml"/>
        <ant target="webxml"/>
        <delete file="./temp/WEB-INF/struts-config.xml"/>
        <move file="./temp/WEB-INF/struts-config-origin.xml" tofile="./temp/WEB-INF/struts-config.xml"/>
    </target>
    <target name="war-CdC-etat" depends="war">
        <delete file="build/xemelios.war" />
        <move file="web.xml" tofile="web-origin.xml"/>
        <property name="specific-filename" value="${basedir}/src/xemelios-web/clients/CdC/web.xml"/>
        <xslt style="src/xemelios-web/clients/CdC/webxml-filter.xsl" in="web-origin.xml" out="web.xml">
            <param name="specific-filename" expression="${specific-filename}"/>
        </xslt>
        <move file="./temp/WEB-INF/struts-config.xml" tofile="./temp/WEB-INF/struts-config-origin.xml"/>
        <xslt style="src/xemelios-web/clients/CdC/strutsconfig-filter.xsl" in="./temp/WEB-INF/struts-config-origin.xml" out="./temp/WEB-INF/struts-config.xml"/>
        <delete dir="./temp/WEB-INF/documents-def"/>
        <mkdir dir="./temp/WEB-INF/documents-def"/>
        <copy todir="./temp/WEB-INF/documents-def">
            <fileset dir="src/edmn/conf">
                <include name="**/*"/>
                <exclude name="**/CVS"/>
            </fileset>
            <fileset dir="src/ertn/conf">
                <include name="**/*"/>
                <exclude name="**/CVS"/>
            </fileset>
            <fileset dir="src/cg-etat/conf">
                <include name="**/*"/>
                <exclude name="**/CVS"/>
            </fileset>
        </copy>
        <copy todir="./temp/WEB-INF/lib">
            <fileset dir="src/edmn/build/jars" includes="*.jar"/>
            <fileset dir="src/cg-etat/build/jars" includes="*.jar"/>
        </copy>
<!-- la license JESPA -->
        <mkdir dir="tmp"/>
        <unjar src="src/xemelios-web/lib/jespa-1.0.7.jar" dest="tmp"/>
        <get src="${ccomptes.fr.jespa.license.key.location}" dest="tmp/jespa/license.key"/>
        <jar destfile="./temp/WEB-INF/lib/jespa-1.0.7.jar" basedir="tmp" filesetmanifest="skip" manifest="tmp/META-INF/MANIFEST.MF"/>
        <delete dir="tmp"/>
        <mkdir dir="./temp/META-INF"/>
        <!--copy todir="./temp/META-INF" file="src/xemelios-web/clients/CdC/context.xml"/-->
<!-- l'aide en ligne qui est spécifique -->
        <delete dir="./temp/user-guide"/>
        <mkdir dir="./temp/user-guide"/>
        <copy todir="./temp/user-guide">
            <fileset dir="src/xemelios-web/clients/CdC/aide/doc">
                <include name="**/*"/>
                <exclude name="**/CVS"/>
            </fileset>
        </copy>
<!-- le lien PDF pour la balance du CG-Etat -->
        <delete file="./temp/WEB-INF/resources/pdf-compteGestionEtat-BalanceGenerale.png"/>
        <copy file="./temp/WEB-INF/resources/pdf.png" tofile="./temp/WEB-INF/resources/pdf-compteGestionEtat-BalanceGenerale.png"/>
        <war destfile="build/xemelios.war" webxml="web.xml" basedir="./temp">
            <exclude name="**/struts-config-origin.xml"/>
        </war>
        <delete dir="./temp/META-INF"/>
        <delete file="web.xml"/>
        <ant target="webxml"/>
        <delete file="./temp/WEB-INF/struts-config.xml"/>
        <move file="./temp/WEB-INF/struts-config-origin.xml" tofile="./temp/WEB-INF/struts-config.xml"/>
    </target>

    <target name="get-lgpl-dir" unless="lgpl.dir.location">
        <input addproperty="lgpl.dir.location" message="Enter LGPL directory location: "/>
    </target>
    
    <target name="get-modified-modules">
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="auth-aphm"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="auth-basic"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="auth-dgcp"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="auth-ldap"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="auth-std-db"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="batch"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="carte-achat"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="cfg-paye"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="cg-colloc"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="cg-etat"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="core"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="dp-directe"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="demande-achat"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="drop-users"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="edmn"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="entrees-directes-stock"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="erar"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="ertn"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="etat-frais"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="etat-frais-spl"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="facture-depense"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="facture-recette"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="factures-sans-engagement-tiers"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="import-batch"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="mysql-persistence"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="pes-aller"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="pes-facture"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="plugin-generator-edmn"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="plugin-generator-pes-pjs"/>
        </ant>
    	<ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="plugin-signerfichier-pes"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="plugin-signature-pes"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="quittancement"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="ref-collec-spl"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="rsa"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="rapport"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="service-fait"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="sorties-directes-stock"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="starter"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="user-guide"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="versement"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="xemelios-core"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="xemelios-web"/>
        </ant>
        <ant antfile="build-tag.xml" target="is.module.modified">
            <property name="target.component" value="xml-marshall"/>
        </ant>
    </target>
    
    <target name="upload-config" description="Publie la mise a jour" depends="doInput,jars-build-tools">
        <available property="update.exists" file="build/config/update.xml"/>
        <java classpath="src/build-tools/build/jars/build-tools.jar" classname="fr.gouv.finances.cp.buildtools.GetDate" outputproperty="current-date"/>
        <echo>Current date is ${current-date}</echo>
        <fail message="build/config/update.xml does not exists, run &gt;ant gen-update before" unless="update.exists"/>
        <scp
            todir="${adullact.user.name}:${adullact.user.passwd}@projets.adullact.net:/var/lib/gforge/chroot/home/groups/xemelios/www/updates33"
            sftp="true">
                <fileset dir="build/config">
                    <include name="**/*"/>
                    <exclude name="**/component.properties"/>
                    <exclude name="update.xml"/>
                </fileset>
        </scp>
        <antcall target="check-upload">
            <param name="url.to.check" value="build/config/update.xml"/>
        </antcall>
        <scp
            todir="${adullact.user.name}:${adullact.user.passwd}@projets.adullact.net:/var/lib/gforge/chroot/home/groups/xemelios/www/updates33"
            sftp="true">
                <fileset dir="build/config">
                    <include name="update.xml"/>
                </fileset>
        </scp>
        <scp
            remoteTofile="${adullact.user.name}:${adullact.user.passwd}@projets.adullact.net:/var/lib/gforge/chroot/home/groups/xemelios/www/updates33/update-${current-date}.xml"
            sftp="true" localFile="build/config/update.xml">
        </scp>
    </target>
    <target name="upload-config-private" description="Publie la mise a jour privee" depends="doInput">
        <antcall target="__upload-config">
            <param name="target.url" value="private/updates33/"/>
        </antcall>
    </target>
    <target name="upload-config-strictly-private" description="Publie la mise a jour privee" depends="doInput,jars-build-tools">
        <antcall target="__upload-config">
            <param name="target.url" value="private/strictly/"/>
        </antcall>
    	<!-- execution du script pour remettre les droits -->
    </target>
    <target name="upload-config-erar" description="Publie la mise a jour ERAR" depends="doInput,jars-build-tools">
        <available property="update.exists" file="build/config/update.xml"/>
        <fail message="build/config/update.xml does not exists, run &gt;ant gen-update-erar before" unless="update.exists"/>
        <scp
            todir="${adullact.user.name}:${adullact.user.passwd}@projets.adullact.net:/var/lib/gforge/chroot/home/groups/xemelios/www/private/erar"
            sftp="true">
                <fileset dir="build/config">
                    <include name="**/*"/>
                    <exclude name="**/component.properties"/>
                    <exclude name="update.xml"/>
                </fileset>
        </scp>
        <antcall target="check-upload">
            <param name="url.to.check" value="build/config/update.xml"/>
        </antcall>
        <scp
            todir="${adullact.user.name}:${adullact.user.passwd}@projets.adullact.net:/var/lib/gforge/chroot/home/groups/xemelios/www/private/erar"
            sftp="true">
                <fileset dir="build/config">
                    <include name="update.xml"/>
                </fileset>
        </scp>
    </target>
    <target name="upload-config-v4" description="Publie la mise a jour V4" depends="doInput,jars-build-tools">
        <available property="update.exists" file="build/config/update.xml"/>
        <fail message="build/config/update.xml does not exists, run &gt;ant gen-update-v4 before" unless="update.exists"/>
        <scp
            todir="${adullact.user.name}:${adullact.user.passwd}@projets.adullact.net:/var/lib/gforge/chroot/home/groups/xemelios/www/private/v4"
            sftp="true">
                <fileset dir="build/config">
                    <include name="**/*"/>
                    <exclude name="**/component.properties"/>
                    <exclude name="update.xml"/>
                </fileset>
        </scp>

        <antcall target="check-upload">
            <param name="url.to.check" value="build/config/update.xml"/>
        </antcall>
        <scp
            todir="${adullact.user.name}:${adullact.user.passwd}@projets.adullact.net:/var/lib/gforge/chroot/home/groups/xemelios/www/private/v4"
            sftp="true">
                <fileset dir="build/config">
                    <include name="update.xml"/>
                </fileset>
        </scp>
    </target>
    <target name="__upload-config" description="Publie la mise a jour V4" depends="doInput,jars-build-tools">
        <java classpath="src/build-tools/build/jars/build-tools.jar" classname="fr.gouv.finances.cp.buildtools.GetDate" outputproperty="current-date"/>
        <fail message="property target.url not set !" unless="target.url"/>
        <available property="update.exists" file="build/config/update.xml"/>
        <fail message="build/config/update.xml does not exists, run &gt;ant gen-update-* before" unless="update.exists"/>
        <scp
            todir="${adullact.user.name}:${adullact.user.passwd}@projets.adullact.net:/var/lib/gforge/chroot/home/groups/xemelios/www/${target.url}"
            sftp="true">
            <fileset dir="build/config">
                <include name="**/*"/>
                <exclude name="**/component.properties"/>
                <exclude name="update.xml"/>
            </fileset>
        </scp>
        
        <antcall target="check-upload">
            <param name="url.to.check" value="build/config/update.xml"/>
        </antcall>
        <scp
            todir="${adullact.user.name}:${adullact.user.passwd}@projets.adullact.net:/var/lib/gforge/chroot/home/groups/xemelios/www/${target.url}"
            sftp="true">
            <fileset dir="build/config">
                <include name="update.xml"/>
            </fileset>
        </scp>
        <scp
            remoteTofile="${adullact.user.name}:${adullact.user.passwd}@projets.adullact.net:/var/lib/gforge/chroot/home/groups/xemelios/www/${target.url}/update-${current-date}.xml"
            file="build/config/update.xml"
            sftp="true"/>
    	<!-- execution du script pour remettre les droits -->
    	<sshexec host="projets.adullact.net" username="${adullact.user.name}" password="${adullact.user.passwd}" command="cd xemelios/www/${target.url}; chown -R $USER:xemelios *; chmod -R g+w *; exit;" failonerror="false"/>
    </target>
    <target name="check-upload" depends="jars-build-tools">
        <fail message="property url.to.check undefined" unless="url.to.check"/>
        <mkdir dir="build/check"/>
        <java classname="fr.gouv.finances.cp.buildtools.UploadChecker" fork="true" failonerror="true" dir="." >
            <classpath>
                <pathelement location="src/xemelios-core/lib/jacksum.jar"/>
                <pathelement location="src/build-tools/build/jars/build-tools.jar"/>
            </classpath>
            <arg value="${url.to.check}"/>
            <arg value="build/check"/>
        </java>
    </target>
    
    <target name="doInput" depends="input-username,input-passwd"/>
	
    <target name="input-username" unless="adullact.user.name">
            <input message="Enter adullact username :" addproperty="adullact.user.name"/>
    </target>
    <target name="input-passwd" unless="adullact.user.passwd">
            <input message="Enter adullact password :" addproperty="adullact.user.passwd"/>
    </target>

    <target name="config-private-etat-frais">
        <antcall target="__gen-update">
            <param name="target.url" value="http://xemelios.org/updates/EtatFrais/"/>
        </antcall>
        <antcall target="__upload-config">
            <param name="target.url" value="updates/EtatFrais/"/>
        </antcall>
    </target>
    <target name="gen-update-private-CdC">
        <property file="src/xemelios-core/component.properties"/>
        <echo>${component.release}</echo>
<!-- le lien PDF pour la balance du CG-Etat -->
        <delete file="build/config/xemelios-core/${component.release}/pdf-compteGestionEtat-BalanceGenerale.png"/>
        <copy file="build/config/xemelios-core/${component.release}/pdf.png" tofile="build/config/xemelios-core/${component.release}/pdf-compteGestionEtat-BalanceGenerale.png"/>
        <antcall target="__gen-update">
            <param name="target.url" value="http://xemelios.org/updates/CdC/"/>
        </antcall>
    </target>
    <target name="gen-update-private-AIFE">
        <antcall target="__gen-update">
            <param name="target.url" value="http://www.xemelios.org/private/updates/AIFE/"/>
        </antcall>
    </target>
    <target name="gen-update-AIFE">
        <antcall target="__gen-update">
            <param name="target.url" value="http://www.xemelios.org/updates/AIFE/"/>
        </antcall>
    </target>
    <target name="gen-update-pour-nous">
        <antcall target="__gen-update">
            <param name="target.url" value="http://xemelios.org/private/pournous/"/>
        </antcall>
    </target>
    <target name="gen-update-cgetat">
        <antcall target="__gen-update">
            <param name="target.url" value="http://xemelios.org/private/cgetat/"/>
        </antcall>
    </target>
    <target name="upload-config-private-CdC">
        <antcall target="__upload-config">
            <param name="target.url" value="updates/CdC/"/>
        </antcall>
    </target>
    <target name="upload-config-AIFE">
        <antcall target="__upload-config">
            <param name="target.url" value="updates/AIFE/"/>
        </antcall>
    </target>
    <target name="upload-config-private-AIFE">
        <antcall target="__upload-config">
            <param name="target.url" value="private/updates/AIFE/"/>
        </antcall>
    </target>
    <target name="upload-config-pour-nous">
        <antcall target="__upload-config">
            <param name="target.url" value="private/pournous/"/>
        </antcall>
    </target>
    <target name="upload-config-cgetat">
        <antcall target="__upload-config">
            <param name="target.url" value="private/cgetat/"/>
        </antcall>
    </target>
    <!-- target name="check-code" if="pmd.location">
        <taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask">
            <classpath refid="pmd.classpath"/>
        </taskdef>
        <pmd targetjdk="1.5" encoding="ISO-8859-1">
            <ruleset>basic</ruleset>
            <fileset dir="src/core/java">
                <include name="**/*.java"/>
                <exclude name="org/**"/>
            </fileset>
            <fileset dir="src/mysql-persistence/java">
                <include name="**/*.java"/>
            </fileset>
            <formatter type="html" toFile="pmd_report.html"/>
        </pmd>
    </target -->

    <target name="deploy-config-common">
        <antcall target="clean"/>
        <antcall target="config-xml-marshall"/>
        <antcall target="config-core"/>
        <antcall target="config-mysql-persistence"/>
        <antcall target="config-auth-aphm"/>
        <antcall target="config-auth-basic"/>
        <antcall target="config-auth-dgcp"/>
        <antcall target="config-auth-ldap"/>
        <antcall target="config-auth-std-db"/>
        <antcall target="config-rapport"/>
        <antcall target="config-starter"/>
        <antcall target="config-user-guide"/>
        <antcall target="config-xemelios-core"/>
        <antcall target="__gen-update">
            <param name="target.url" value="http://Xemelios.org/updates/common/"/>
            <param name="foreign.site" value=""/>
        </antcall>
        <antcall target="__upload-config">
            <param name="target.url" value="updates/common"/>
        </antcall>
    </target>

    <target name="deploy-config-dgfip">
        <antcall target="clean"/>
        <antcall target="config-cfg-paye"/>
        <antcall target="config-carte-achat"/>
        <antcall target="config-cg-colloc"/>
        <antcall target="config-erar"/>
        <antcall target="config-facture-depense"/>
        <antcall target="config-facture-recette"/>
        <antcall target="config-pes-aller"/>
        <antcall target="config-pes-facture"/>
        <antcall target="config-plugin-generator-pes-pj"/>
        <antcall target="config-plugin-signature-pes"/>
        <antcall target="config-plugin-signerfichier-pes"/>
        <antcall target="config-quittancement"/>
        <antcall target="config-rsa"/>
        <antcall target="config-versement"/>
        <antcall target="__gen-update">
            <param name="target.url" value="http://Xemelios.org/updates/dgfip/"/>
            <param name="foreign.site" value="http://xemelios.org/updates/common/update.xml"/>
        </antcall>
        <antcall target="__upload-config">
            <param name="target.url" value="updates/dgfip"/>
        </antcall>
    </target>

    <target name="deploy-config-etat">
        <antcall target="clean"/>
        <antcall target="config-cg-etat"/>
        <!--antcall target="config-dp-directe"/-->
        <antcall target="config-edmn"/>
        <antcall target="config-ertn"/>
        <antcall target="config-etat-frais"/>
        <!--antcall target="config-fen0029a"/-->
        <antcall target="__gen-update">
            <param name="target.url" value="http://Xemelios.org/updates/etat/"/>
            <param name="foreign.site" value="http://xemelios.org/updates/common/update.xml"/>
        </antcall>
        <antcall target="__upload-config">
            <param name="target.url" value="updates/etat"/>
        </antcall>
    </target>

    <target name="deploy-config-cdc">
        <antcall target="clean"/>
        <antcall target="config-edmn"/>
        <antcall target="config-plugin-generator-edmn"/>
        <antcall target="__gen-update">
            <param name="target.url" value="http://Xemelios.org/updates/cdc/"/>
            <param name="foreign.site" value="http://xemelios.org/updates/common/update.xml"/>
        </antcall>
        <antcall target="__upload-config">
            <param name="target.url" value="updates/cdc"/>
        </antcall>
    </target>

    <target name="config-aife" description="Permet de générer une mise à jour pour l'AIFE">
        <antcall target="config-core"/>
        <antcall target="config-auth-basic"/>
        <antcall target="config-auth-std-db"/>
        <antcall target="config-dp-directe"/>
        <antcall target="config-demande-achat"/>
        <antcall target="config-entrees-directes-stock"/>
        <antcall target="config-factures-ss-engag-tiers"/>
        <antcall target="config-etat-frais"/>
        <antcall target="config-mysql-persistence"/>
        <antcall target="config-rapport"/>
        <antcall target="config-service-fait"/>
        <antcall target="config-sorties-directes-stock"/>
        <antcall target="config-starter"/>
        <antcall target="config-xemelios-core"/>
        <antcall target="config-xml-marshall"/>
        <!-- modification du component.properties de la dp-directe -->
        <property file="src/dp-directe/component.properties"/>
        <propertyfile file="build/config/dp-directe/${component.release}/component.properties">
            <entry key="deletes" value="${xemelios.prg}/root/documents-def/etatPaye.xml,${xemelios.prg}/root/documents-def/pes-releve-carteachat.xml,${xemelios.prg}/root/documents-def/M14.xml,${xemelios.prg}/root/documents-def/cg-etat.xml,${xemelios.prg}/root/documents-def/edmn.xml,${xemelios.prg}/root/documents-def/erar.xml,${xemelios.prg}/root/documents-def/ertn.xml,${xemelios.prg}/root/documents-def/facture-depense.exml,${xemelios.prg}/root/documents-def/facture-recette.exml,${xemelios.prg}/root/documents-def/pes-aller.xml,${xemelios.prg}/root/documents-def/pes-facture.xml,${xemelios.prg}/root/documents-def/rsa.xml,${xemelios.prg}/root/documents-def/etatVersement.xml,${xemelios.prg}/root/documents-def/quittancement.exml,${xemelios.prg}/root/tools/plugin-signerfichier-pes.jar,${xemelios.prg}/root/tools/plugin-signature-pes.jar,${xemelios.prg}/root/tools/plugin-gen-pes-pjs.jar,${xemelios.prg}/root/tools/plugin-gen-edmn.jar"/>
        </propertyfile>
        <antcall target="gen-update-private-AIFE"/>
    </target>
    <target name="setup-aife" depends="setup-core,
                                    setup-auth-basic,
                                    setup-auth-std-db,
                                    setup-dp-directe,
                                    setup-demande-achat,
                                    setup-etat-frais,
                                    setup-mysql-persistence,
                                    setup-rapport,
                                    setup-service-fait,
                                    setup-starter,
                                    setup-xemelios-core,
                                    setup-xml-marshall,
                                    jars-build-tools"
                description="Prépare l'image du répertoire pour générer le setup">
        <copy todir="build/setup/root">
            <fileset dir="src/resources/templates">
                <include name="authentication.*"/>
                <include name="mysql.properties.*"/>
                <include name="xemelios.bat*"/>
                <!--include name="xemelios.pr*"/-->
                <include name="CP.bat"/>
                <include name="viewdoc.cmd"/>
            </fileset>
            <fileset dir="src/resources/icons">
                <include name="*"/>
            </fileset>
            <fileset dir=".">
                <exclude name="CVS"/>
                <include name="LICENSE/**/*"/>
            </fileset>
        </copy>
        <propertyfile file="build/setup/root/xemelios.properties.template">
            <entry key="xemelios.dir" value="&lt;%INSTALLDIR%&gt;"/>
            <entry key="xemelios.prg" value="${xemelios.dir}/Xemelios"/>
            <entry key="xemelios.mysql" value="${xemelios.dir}/MySql"/>
            <entry key="javax.xml.parsers.DocumentBuilderFactory" value="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/>
            <entry key="javax.xml.parsers.SAXParserFactory" value="org.apache.xerces.jaxp.SAXParserFactoryImpl"/>
            <entry key="xemelios.log4j.xml" value="${xemelios.prg}/root/log4j.xml"/>
            <entry key="xemelios.documents.def.dir" value="${xemelios.prg}/root/documents-def"/>
            <entry key="xemelios.available.datalayers" value="fr.gouv.finances.cp.xemelios.data.impl.MySqlDataLayer"/>
            <entry key="xemelios.data.impl" value="mysql"/>
            <entry key="navigator.url.prefix" value="&lt;%PREFIXFILE%&gt;"/>
            <entry key="help.url" value="${navigator.url.prefix}${xemelios.prg}/doc/index.html"/>
            <entry key="admin.menu" value="true"/>
            <entry key="xemelios.mysql.config.filename" value="${xemelios.prg}/root/mysql.properties"/>
            <entry key="classdirs" value="${xemelios.prg}/root/lib"/>
            <entry key="xemelios.lib" value="${xemelios.prg}/root/lib"/>
            <entry key="startclass" value="fr.gouv.finances.cp.xemelios.Splash"/>
            <entry key="startclass.classMethod" value="main"/>
            <entry key="xemelios.authentication.config.filename" value="${xemelios.prg}/root/authentication.properties"/>
            <entry key="xemelios.components.filename" value="${xemelios.prg}/root/components.xml"/>
            <entry key="xemelios.updater.source" value="http://www.xemelios.org/updates/AIFE/update.xml"/>
            <entry key="xemelios.auth.referentiel.url" value="http://www.xemelios.org/collectivites/referentiel.xml"/>
            <entry key="javax.xml.xpath.XPathFactory:http://java.sun.com/jaxp/xpath/dom" value="com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl"/>
            <entry key="xemelios.date.format" value="dd/MM/yyyy"/>
            <entry key="xemelios.resources.location" value="${xemelios.prg}/root/resources"/>
            <entry key="xemelios.version" value="4.0.0.38"/>
            <entry key="xemelios.exporter.class" value="fr.gouv.finances.cp.xemelios.export.JxlExporter"/>
            <entry key="xemelios.tools.directory" value="${xemelios.prg}/root/tools"/>
        </propertyfile>
        <java
            classpath="src/build-tools/build/jars/build-tools.jar"
            classname="fr.gouv.finances.cp.buildtools.MakeComponentsFile"
            output="build/setup/root/components.xml">
            <arg value="src/core"/>
            <arg value="src/auth-basic"/>
            <arg value="src/auth-std-db"/>
            <arg value="src/dp-directe"/>
            <arg value="src/etat-frais"/>
            <arg value="src/mysql-persistence"/>
            <arg value="src/rapport"/>
            <arg value="src/starter"/>
            <arg value="src/xemelios-core"/>
            <arg value="src/xml-marshall"/>
        </java>
        <xmlvalidate failonerror="true" lenient="true" file="build/setup/root/components.xml"/>
        <java classname="fr.gouv.finances.cp.buildtools.SetupSigner">
            <classpath>
                <pathelement path="src/build-tools/build/classes"/>
                <fileset dir="src/core/lib" includes="*.jar"/>
            </classpath>
            <arg value="build/setup"/>
        </java>

    </target>

    <target name="javadoc">
        <mkdir dir="build/javadoc"/>
        <javadoc destdir="build/javadoc" access="private" encoding="iso-8859-1" splitindex="yes" windowtitle="Xemelios Javadoc" charset="UTF-8" docencoding="UTF-8">
            <fileset dir="src/auth-aphm/java" includes="**/*.java"/>
            <fileset dir="src/auth-basic/java" includes="**/*.java"/>
            <fileset dir="src/auth-dgcp/java" includes="**/*.java"/>
            <fileset dir="src/auth-std-db/java" includes="**/*.java"/>
            <fileset dir="src/batch/java" includes="**/*.java"/>
            <fileset dir="src/cfg-paye/java" includes="**/*.java"/>
            <fileset dir="src/cg-colloc/java" includes="**/*.java"/>
            <fileset dir="src/cg-etat/java" includes="**/*.java"/>
            <fileset dir="src/core/java" includes="**/*.java"/>
            <fileset dir="src/demande-achat/java" includes="**/*.java"/>
            <fileset dir="src/dp-directe/java" includes="**/*.java"/>
            <fileset dir="src/edmn/java" includes="**/*.java"/>
            <fileset dir="src/entrees-directes-stock/java" includes="**/*.java"/>
            <fileset dir="src/erar/java" includes="**/*.java"/>
            <fileset dir="src/etat-frais/java" includes="**/*.java"/>
            <fileset dir="src/etat-frais-spl/java" includes="**/*.java"/>
            <fileset dir="src/factures-sans-engagement-tiers/java" includes="**/*.java"/>
            <fileset dir="src/import-batch/java" includes="**/*.java"/>
            <fileset dir="src/mysql-persistence/java" includes="**/*.java"/>
            <fileset dir="src/pes-aller/java" includes="**/*.java"/>
            <fileset dir="src/plugin-generator-pes-pjs/java" includes="**/*.java"/>
            <fileset dir="src/plugin-signature-pes/java" includes="**/*.java"/>
            <fileset dir="src/plugin-signerfichier-pes/java" includes="**/*.java"/>
            <fileset dir="src/ref-collec-spl/java" includes="**/*.java"/>
            <fileset dir="src/rsa/java" includes="**/*.java"/>
            <fileset dir="src/service-fait/java" includes="**/*.java"/>
            <fileset dir="src/sorties-directes-stock/java" includes="**/*.java"/>
            <fileset dir="src/starter/java" includes="**/*.java"/>
            <fileset dir="src/xemelios-core/java" includes="**/*.java"/>
            <fileset dir="src/xemelios-web/java" includes="**/*.java"/>
            <fileset dir="src/xml-marshall/java" includes="**/*.java"/>
            
            <classpath>
                <fileset dir="src/core/lib" includes="*.jar"/>
                <fileset dir="src/plugin-signerfichier-pes/lib" includes="*.jar"/>
                <fileset dir="src/xemelios-core/lib" includes="*.jar"/>
                <fileset dir="src/xemelios-web/lib" includes="*.jar"/>
            </classpath>
        </javadoc>
    </target>

</project>
