<?xml version="1.0" encoding="UTF-8"?>
<!--
        *** GENERATED FROM project.xml - DO NOT EDIT  ***
        ***         EDIT ../build.xml INSTEAD         ***

        For the purpose of easier reading the script
        is divided into following sections:

        - initialization
        - compilation
        - dist
        - execution
        - debugging
        - cleanup

        -->
<project name="travelComposite-jbi-impl" default="build" basedir="..">
    <target name="default" depends="dist" description="Build whole project."/>
    <!-- 
                INITIALIZATION SECTION 
            -->
    <target name="pre-init">
        <!-- Empty placeholder for easier customization. -->
        <!-- You can override this target in the ../build.xml file. -->
    </target>
    <target name="init-private" depends="pre-init">
        <property file="nbproject/private/private.properties"/>
    </target>
    <target name="init-userdir" depends="pre-init,init-private">
        <property name="user.properties.file" location="${netbeans.user}/build.properties"/>
    </target>
    <target name="init-user" depends="pre-init,init-private,init-userdir">
        <property file="${user.properties.file}"/>
    </target>
    <target name="init-project" depends="pre-init,init-private,init-userdir,init-user">
        <property file="nbproject/project.properties"/>
    </target>
    <target name="do-init" depends="pre-init,init-private,init-userdir,init-user,init-project">
        <!-- The two properties below are usually overridden -->
        <!-- by the active platform. Just a fallback. -->
        <property name="default.javac.source" value="1.4"/>
        <property name="default.javac.target" value="1.4"/>
        <condition property="have.tests">
            <or>
                <available file="${test.dir}"/>
            </or>
        </condition>
        <condition property="netbeans.home+have.tests">
            <and>
                <isset property="netbeans.home"/>
                <isset property="have.tests"/>
            </and>
        </condition>
    </target>
    <target name="post-init">
        <!-- Empty placeholder for easier customization. -->
        <!-- You can override this target in the ../build.xml file. -->
    </target>
    <target name="init-check" depends="pre-init,init-private,init-userdir,init-user,init-project,do-init">
        <fail unless="src.dir">Must set src.dir</fail>
        <fail unless="build.dir">Must set build.dir</fail>
        <fail unless="build.generated.dir">Must set build.generated.dir</fail>
        <fail unless="dist.dir">Must set dist.dir</fail>
        <fail unless="build.classes.dir">Must set build.classes.dir</fail>
        <fail unless="dist.jar">Must set dist.jar</fail>
        <fail unless="test.dir">Must set test.dir</fail>
    </target>
    <target name="-init-taskdefs" if="from.commandline">
        <path id="ant.task.classpath">
            <pathelement location="${soa.module.install.dir}/org-netbeans-modules-compapp-projects-jbi.jar"/>
            <pathelement location="${soa.module.install.dir}/org-netbeans-modules-compapp-manager-jbi.jar"/>
            <pathelement location="${soa.module.install.dir}/org-netbeans-soa-libs-xmlbeans.jar"/>
            <pathelement location="${soa.module.install.dir}/ext/jbi/jbi-admin-common.jar"/>
            <pathelement location="${soa.module.install.dir}/../ant/nblib/org-netbeans-modules-compapp-projects-jbi.jar"/>
            <pathelement location="${netbeans.home}/lib/org-openide-util.jar"/>
            <pathelement location="${netbeans.home}/lib/org-openide-modules.jar"/>
            <pathelement location="${netbeans.home}/modules/org-openide-options.jar"/>
            <pathelement location="${netbeans.home}/modules/org-openide-text.jar"/>
            <pathelement location="${netbeans.home}/modules/org-openide-loaders.jar"/>
            <pathelement location="${netbeans.home}/modules/org-openide-nodes.jar"/>
            <pathelement location="${netbeans.home}/modules/org-openide-dialogs.jar"/>
            <pathelement location="${netbeans.home}/core/org-openide-filesystems.jar"/>
            <pathelement location="${ide.module.install.dir}/modules/ext/xerces-2.8.0.jar"/>
            <pathelement location="${ide.module.install.dir}/ext/xml-commons-dom-ranges-1.0.b2.jar"/>
            <pathelement location="${ide.module.install.dir}/org-netbeans-modules-xml-retriever.jar"/>
            <pathelement location="${ide.module.install.dir}/org-netbeans-modules-xml-schema-model.jar"/>
            <pathelement location="${ide.module.install.dir}/org-netbeans-modules-xml-wsdl-model.jar"/>
            <pathelement location="${ide.module.install.dir}/org-netbeans-modules-xml-xam.jar"/>
            <pathelement location="${ide.module.install.dir}/org-netbeans-modules-xml-text.jar"/>
            <pathelement location="${ide.module.install.dir}/org-netbeans-modules-editor.jar"/>
            <pathelement location="${ide.module.install.dir}/org-netbeans-modules-editor-lib.jar"/>
            <pathelement location="${ide.module.install.dir}/org-netbeans-modules-editor-util.jar"/>
            <pathelement location="${ide.module.install.dir}/org-netbeans-modules-projectapi.jar"/>
            <pathelement location="${ide.module.install.dir}/org-netbeans-modules-classfile.jar"/>
            <pathelement location="${ide.module.install.dir}/org-apache-xml-resolver.jar"/>
            <pathelement location="${xml.module.install.dir}/org-netbeans-modules-xml-wsdl-extensions.jar"/>
            <pathelement location="${java.module.install.dir}/ext/jaxws21/api/jaxb-api.jar"/>
            <pathelement location="${java.module.install.dir}/ext/jaxws21/jaxb-impl.jar"/>
            <pathelement location="${java.module.install.dir}/ext/jaxws21/activation.jar"/>
            <pathelement location="${enterprise.module.install.dir}/org-netbeans-modules-j2eeserver.jar"/>
            <pathelement location="${enterprise.module.install.dir}/ext/jsr88javax.jar"/>
        </path>
        <taskdef name="jbi-build-service-assembly" classname="org.netbeans.modules.compapp.projects.jbi.anttasks.BuildServiceAssembly">
            <classpath refid="ant.task.classpath"/>
        </taskdef>
        <taskdef name="jbi-deploy-service-assembly" classname="org.netbeans.modules.compapp.projects.jbi.anttasks.DeployServiceAssembly">
            <classpath refid="ant.task.classpath"/>
        </taskdef>
        <taskdef name="setup-debug-environment" classname="org.netbeans.modules.compapp.projects.jbi.anttasks.SetUpDebugEnvironment">
            <classpath refid="ant.task.classpath"/>
        </taskdef>
        <taskdef name="teardown-debug-environment" classname="org.netbeans.modules.compapp.projects.jbi.anttasks.TearDownDebugEnvironment">
            <classpath refid="ant.task.classpath"/>
        </taskdef>
        <taskdef name="jbi-javaee-dist" classname="org.netbeans.modules.compapp.projects.jbi.anttasks.BuildJavaEESU">
            <classpath refid="ant.task.classpath"/>
        </taskdef>
    </target>
    <target name="init" depends="pre-init,init-private,init-userdir,init-user,init-project,do-init,post-init,init-check,-init-taskdefs"/>
    <!--
                COMPILATION SECTION
            -->
    <target name="deps-jar" depends="init" unless="${no.dependencies}">
        <ant target="dist_se" inheritall="false" antfile="${project.TravelServiceBPEL}/build.xml"/>
        <basename property="TravelServiceBPEL.su.name" file="${project.TravelServiceBPEL}"/>
        <unzip src="${reference.TravelServiceBPEL.dist_se}" dest="${src.dir}/../jbiServiceUnits/${TravelServiceBPEL.su.name}">
            <patternset>
                <include name="**/*.wsdl"/>
                <include name="**/*.WSDL"/>
                <include name="**/*.xsd"/>
                <include name="**/*.XSD"/>
                <include name="META-INF/jbi.xml"/>
                <include name="META-INF/catalog.xml"/>
            </patternset>
        </unzip>
        <property name="TravelServiceBPEL.su.dir" value="${src.dir}/../jbiServiceUnits/${TravelServiceBPEL.su.name}"/>
        <move file="${TravelServiceBPEL.su.dir}/META-INF/jbi.xml" todir="${TravelServiceBPEL.su.dir}"/>
        <move todir="${src.dir}/../jbiServiceUnits/META-INF/${TravelServiceBPEL.su.name}">
            <fileset dir="${TravelServiceBPEL.su.dir}/META-INF"/>
        </move>
    </target>
    <target name="deps-javaee-jar" depends="init" unless="${no.dependencies}"/>
    <target name="pre-pre-compile" depends="init,deps-jar">
        <mkdir dir="${build.classes.dir}"/>
    </target>
    <target name="pre-compile">
        <!-- Empty placeholder for easier customization. -->
        <!-- You can override this target in the ../build.xml file. -->
    </target>
    <target name="library-inclusion-in-archive" depends="compile">
        <unjar dest="${build.classes.dir}" src="${reference.TravelServiceBPEL.dist_se}"/>
    </target>
    <target name="library-inclusion-in-manifest" depends="compile">
        <basename property="included.lib.reference.TravelServiceBPEL.dist_se" file="${reference.TravelServiceBPEL.dist_se}"/>
        <copy todir="${build.classes.dir}" file="${reference.TravelServiceBPEL.dist_se}"/>
        <manifest file="${build.classes.dir}/META-INF/MANIFEST.MF" mode="update">
            <attribute name="Class-Path" value="${included.lib.reference.TravelServiceBPEL.dist_se}"/>
        </manifest>
    </target>
    <target name="do-compile" depends="init,deps-jar,pre-pre-compile,pre-compile"/>
    <target name="post-compile">
        <!-- Empty placeholder for easier customization. -->
        <!-- You can override this target in the ../build.xml file. -->
    </target>
    <target name="compile" depends="init,deps-jar,pre-pre-compile,pre-compile,do-compile,post-compile" description="Compile project."/>
    <target name="pre-compile-single">
        <!-- Empty placeholder for easier customization. -->
        <!-- You can override this target in the ../build.xml file. -->
    </target>
    <target name="do-compile-single" depends="init,deps-jar,pre-pre-compile">
        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
    </target>
    <target name="post-compile-single">
        <!-- Empty placeholder for easier customization. -->
        <!-- You can override this target in the ../build.xml file. -->
    </target>
    <target name="compile-single" depends="init,deps-jar,pre-pre-compile,pre-compile-single,do-compile-single,post-compile-single"/>
    <!--
                DIST BUILDING SECTION
            -->
    <target name="jbi-build" depends="init,init-deploy,deps-jar, deps-javaee-jar" description="Build Service Assembly.">
        <mkdir dir="${src.dir}"/>
        <copy todir="${src.dir}/../jbiServiceUnits" overwrite="true">
            <fileset dir="${src.dir}"/>
        </copy>
        <mkdir dir="${build.dir}/META-INF"/>
        <jar compress="true" jarfile="${build.dir}/BCDeployment.jar">
            <fileset dir="${src.dir}/../jbiServiceUnits">
                <exclude name="**/catalog.xml"/>
                <exclude name="**/jbi.xml"/>
            </fileset>
        </jar>
        <jbi-build-service-assembly/>
        <delete file="${build.dir}/BCDeployment.jar"/>
        <dirname property="dist.jar.dir" file="${dist.jar}"/>
        <mkdir dir="${dist.jar.dir}"/>
        <jar compress="${jar.compress}" jarfile="${dist.jar}">
            <fileset dir="${build.dir}" excludes="jar/*"/>
        </jar>
    </target>
    <target name="jbi-clean-build" depends="init,init-deploy,clean,jbi-build" description="Clean and Build Service Assembly."/>
    <target name="dist" depends="jbi-build" description="Build distribution (JAR)."/>
    <!--
                EXECUTION SECTION
            -->
    <target name="run" depends="jbi-build,run-jbi-deploy" description="Deploy to server."/>
    <target name="init-deploy">
        <property name="include.jar.manifest" value=""/>
    </target>
    <target name="run-jbi-deploy" depends="jbi-build">
        <property name="j2ee.server.instance" value=""/>
        <loadproperties srcFile="${basedir}/nbproject/private/private.properties"/>
        <jbi-deploy-service-assembly serviceAssemblyID="${jbi.service-assembly.id}" serviceAssemblyLocation="${basedir}/${dist.jar}" netBeansUserDir="${netbeans.user}" j2eeServerInstance="${j2ee.server.instance}"/>
    </target>
    <target name="undeploy" depends="init">
        <property name="j2ee.server.instance" value=""/>
        <loadproperties srcFile="${basedir}/nbproject/private/private.properties"/>
        <jbi-deploy-service-assembly undeployServiceAssembly="true" serviceAssemblyID="${jbi.service-assembly.id}" serviceAssemblyLocation="${basedir}/${dist.jar}" netBeansUserDir="${netbeans.user}" j2eeServerInstance="${j2ee.server.instance}"/>
    </target>
    <target name="-pre-debug">
        <property name="inDebug" value="true"/>
        <setup-debug-environment netBeansUserDir="${netbeans.user}" j2eeServerInstance="${j2ee.server.instance}"/>
    </target>
    <target name="-post-debug">
        <property name="inDebug" value="false"/>
        <teardown-debug-environment netBeansUserDir="${netbeans.user}" j2eeServerInstance="${j2ee.server.instance}"/>
    </target>
    <!--
                DEBUGGING SECTION
            -->
    <target name="debug" description="Debug project in IDE." depends="run,-pre-debug" if="netbeans.home"/>
    <target name="pre-debug-fix" depends="init">
        <fail unless="fix.includes">Must set fix.includes</fail>
        <property name="javac.includes" value="${fix.includes}.java"/>
    </target>
    <target name="do-debug-fix" if="netbeans.home" depends="init,pre-debug-fix,compile-single">
        <j2seproject:nbjpdareload xmlns:j2seproject="http://www.netbeans.org/ns/j2se-project/1"/>
    </target>
    <target name="debug-fix" if="netbeans.home" depends="init,pre-debug-fix,do-debug-fix"/>
    <!--
                CLEANUP SECTION
            -->
    <target name="deps-clean" depends="init" unless="${no.dependencies}">
        <ant target="clean" inheritall="false" antfile="${project.TravelServiceBPEL}/build.xml"/>
    </target>
    <target name="do-clean" depends="init">
        <delete dir="${build.dir}"/>
        <delete dir="${dist.dir}"/>
        <delete dir="${source.root}/jbiServiceUnits"/>
    </target>
    <target name="post-clean">
        <!-- Empty placeholder for easier customization. -->
        <!-- You can override this target in the ../build.xml file. -->
    </target>
    <target name="clean" depends="init,deps-clean,do-clean,post-clean" description="Clean build products."/>
    <target name="jbi-clean-config" depends="init,clear-casa,jbi-clean-build" description="Clean service assembly."/>
    <target name="clear-casa">
        <delete file="${source.root}/conf/${jbi.service-assembly.id}.casa"/>
        <delete file="${src.dir}/${jbi.service-assembly.id}.wsdl"/>
    </target>
    <!--
                JUNIT EXECUTION SECTION
                ======================= 
            -->
    <target name="-pre-test-run" if="have.tests" depends="init">
        <mkdir dir="${test.results.dir}"/>
        <path id="unit.test.classpath">
            <pathelement path="${soa.module.install.dir}/org-netbeans-modules-compapp-manager-jbi.jar"/>
            <pathelement path="${soa.module.install.dir}/org-netbeans-modules-compapp-projects-jbi.jar"/>
            <pathelement path="${soa.module.install.dir}/ext/jbi/jbi-admin-common.jar"/>
            <pathelement path="${soa.module.install.dir}/ext/jbi/catd.jar"/>
            <pathelement path="${java.module.install.dir}/ext/junit-3.8.2.jar"/>
            <pathelement path="${java.module.install.dir}/ext/jaxws21/api/saaj-api.jar"/>
            <pathelement path="${java.module.install.dir}/ext/jaxws21/saaj-impl.jar"/>
            <pathelement path="${java.module.install.dir}/ext/jaxws21/FastInfoset.jar"/>
            <pathelement path="${ide.module.install.dir}/org-netbeans-modules-editor-lib.jar"/>
            <pathelement path="${ide.module.install.dir}/org-netbeans-modules-editor.jar"/>
            <pathelement path="${ide.module.install.dir}/org-netbeans-modules-editor-util.jar"/>
            <pathelement path="${ide.module.install.dir}/org-netbeans-modules-editor-lib2.jar"/>
            <pathelement path="${ide.module.install.dir}/org-netbeans-modules-editor-indent.jar"/>
            <pathelement path="${ide.module.install.dir}/org-netbeans-modules-lexer.jar"/>
            <pathelement path="${ide.module.install.dir}/org-netbeans-modules-xml-core.jar"/>
            <pathelement path="${ide.module.install.dir}/org-netbeans-modules-xml-lexer.jar"/>
            <pathelement path="${ide.module.install.dir}/org-netbeans-modules-xml-text.jar"/>
            <pathelement path="${ide.module.install.dir}/org-netbeans-modules-xml-xdm.jar"/>
            <pathelement path="${ide.module.install.dir}/org-netbeans-modules-xml-xam.jar"/>
            <pathelement path="${netbeans.home}/lib/org-openide-modules.jar"/>
            <pathelement path="${netbeans.home}/lib/org-openide-util.jar"/>
            <pathelement path="${netbeans.home}/modules/org-openide-options.jar"/>
            <pathelement path="${netbeans.home}/modules/org-openide-text.jar"/>
            <pathelement path="${netbeans.home}/modules/org-openide-loaders.jar"/>
            <pathelement path="${netbeans.home}/modules/org-openide-nodes.jar"/>
            <pathelement path="${netbeans.home}/modules/org-netbeans-modules-editor-mimelookup.jar"/>
            <pathelement path="${netbeans.home}/core/org-openide-filesystems.jar"/>
        </path>
    </target>
    <target name="-do-test-run" if="netbeans.home+have.tests" depends="init,-pre-test-run">
        <junit showoutput="true" fork="yes" dir="${basedir}" failureproperty="tests.failed" errorproperty="tests.failed">
            <classpath refid="unit.test.classpath"/>
            <sysproperty key="NetBeansUserDir" value="${netbeans.user}"/>
            <test name="org.netbeans.modules.compapp.catd.ConfiguredTest" haltonfailure="no" todir="${test.results.dir}"/>
            <syspropertyset>
                <propertyref prefix="test-sys-prop."/>
                <mapper to="*" from="test-sys-prop.*" type="glob"/>
            </syspropertyset>
            <formatter usefile="false" type="brief"/>
            <formatter type="xml"/>
        </junit>
    </target>
    <target name="-do-single-test-run" if="netbeans.home+have.tests" depends="init,-pre-test-run">
        <junit showoutput="true" fork="yes" dir="${basedir}" failureproperty="tests.failed" errorproperty="tests.failed">
            <classpath refid="unit.test.classpath"/>
            <sysproperty key="NetBeansUserDir" value="${netbeans.user}"/>
            <sysproperty key="inDebug" value="${inDebug}"/>
            <test name="org.netbeans.modules.compapp.catd.ConfiguredTest" haltonfailure="no" todir="${test.results.dir}"/>
            <syspropertyset>
                <propertyref prefix="test-sys-prop."/>
                <mapper to="*" from="test-sys-prop.*" type="glob"/>
            </syspropertyset>
            <formatter usefile="false" type="brief"/>
            <formatter type="xml"/>
        </junit>
    </target>
    <target name="-post-test-run" if="have.tests" depends="init,-pre-test-run,-do-test-run">
        <fail if="tests.failed">Some tests failed; see details above.</fail>
    </target>
    <target name="-post-single-test-run" if="have.tests" depends="init,-pre-test-run,-do-single-test-run">
        <fail if="tests.failed">Some tests failed; see details above.</fail>
    </target>
    <target name="test-report" if="have.tests" depends="init"/>
    <target name="-test-browse" if="netbeans.home+have.tests" depends="init"/>
    <target name="test" depends="init,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests."/>
    <target name="test-single" depends="init,-pre-test-run,-do-single-test-run,test-report,-post-single-test-run,-test-browse" description="Run unit tests."/>
    <target name="debug-single" depends="init,-pre-test-run,-pre-debug,-do-single-test-run,-post-debug,test-report,-post-single-test-run,-test-browse" description="Debug unit tests."/>
    <target name="-post-unit-test-run" if="have.tests+tests.failed" depends="init,-pre-test-run,-do-test-run">
        <echo>Some tests failed; see details above.</echo>
    </target>
    <target name="unit-test" depends="init,-pre-test-run,-do-test-run,test-report,-post-unit-test-run,-test-browse" description="Run unit tests in a batch."/>
    <target name="jbi-unit-test" depends="run,unit-test,undeploy" description="build, deploy, test, and undeploy."/>
</project>
