Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 160 lines (111 sloc) 5.445 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
<?xml version="1.0"?>

<project default="dist" basedir="." name="context broker">

    <description>Context Broker build file</description>

    <!-- load user nimbus.build.properties file, if it exists -->
    <property file="${user.home}/nimbus.build.properties"/>

    <!-- load defaults from colocated build.properties file -->
    <property file="build.properties"/>


    <!-- *******************************************************************
LOCATE GT DEPENDENCIES
******************************************************************* -->

    <property environment="env"/>
    <property name="abs.deploy.dir"
              location="${env.GLOBUS_LOCATION}"/>
    <property name="gt4_0.lib.dir"
              location="${abs.deploy.dir}/lib"/>
    

    <!-- *******************************************************************
CHECK MINIMUM JDK
******************************************************************* -->

    <target name="checkjdk">
        <available property="jdk1.5+"
                   classname="java.lang.Readable"/>
        <fail message="Aborting: determined you are not building with >= JDK 1.5"
              unless="jdk1.5+" />
    </target>

    
    <!-- *******************************************************************
INITIALIZE
******************************************************************* -->

    <target name="init" depends="checkjdk">
        <mkdir dir="${nimbus.ctxbroker.build.dir}"/>
        <mkdir dir="${nimbus.ctxbroker.build.dest}"/>
        <mkdir dir="${nimbus.ctxbroker.dist.dir}"/>
    </target>


    <!-- *******************************************************************
WSDL, STUBS ETC
******************************************************************* -->

    <target name="stubs" depends="init">
        <ant dir="${nimbus.ctxbroker.stubs.dir}" target="dist" />
    </target>


    <!-- *******************************************************************
COMPILATION
******************************************************************* -->

    <path id="nimbus.ctxbroker.classpath">

        <fileset dir="${gt4_0.lib.dir}">
            <include name="*.jar"/>
            <exclude name="nimbus-*.jar" />
        </fileset>

        <fileset dir="${nimbus.ctxbroker.stubs.dist}">
              <include name="*.jar"/>
        </fileset>
    </path>

    <target name="compile" depends="stubs">

        <javac srcdir="${nimbus.ctxbroker.src.dir}"
               destdir="${nimbus.ctxbroker.build.dest}"
               classpathref="nimbus.ctxbroker.classpath"
               classpath="${nimbus.ctxbroker.stubs.dist}/*jar"
               debug="on">

            <include name="**/*.java"/>

        </javac>

        <copy todir="${nimbus.ctxbroker.build.dest}" >

              <fileset dir="${nimbus.ctxbroker.src.dir}"
                       includes="**/*.properties" />

              <fileset dir="${nimbus.ctxbroker.src.dir}"
                       includes="**/*.xml" />

              <fileset dir="${nimbus.ctxbroker.src.dir}"
                       includes="**/*.txt" />
        </copy>

    </target>


    <!-- *******************************************************************
CREATE ARCHIVE FILE
******************************************************************* -->

    <target name="jar" depends="compile">
        <jar destfile="${nimbus.ctxbroker.dist.dir}/${nimbus.ctxbroker.jar.name}"
             basedir="${nimbus.ctxbroker.build.dest}"/>
    </target>

    
    <!-- *******************************************************************
CLEAN
******************************************************************* -->

    <target name="clean">
        <delete file=".ant-targets-build.xml" />
        <delete dir="${nimbus.ctxbroker.build.dir}"/>
        <delete dir="${nimbus.ctxbroker.dist.dir}"/>
        <ant dir="${nimbus.ctxbroker.wsdl.compact.dir}" target="clean" />
        <ant dir="${nimbus.ctxbroker.stubs.dir}" target="clean" />
        <ant dir="${nimbus.ctxbroker.gar.dir}" target="clean" />
    </target>

    
    <!-- *******************************************************************
CREATE DISTRIBUTION
******************************************************************* -->

    <target name="dist" depends="clean, jar" />


    <!-- *******************************************************************
GAR RELATED
******************************************************************* -->

    <target name="gar">
        <ant dir="${nimbus.ctxbroker.gar.dir}" target="dist" />
    </target>

    <target name="deploy" depends="dist, gar">
        <ant dir="${nimbus.ctxbroker.gar.dir}" target="deploy" />
    </target>

    <target name="undeploy">
        <ant dir="${nimbus.ctxbroker.gar.dir}" target="undeploy" />
    </target>


    <!-- *******************************************************************
NEW WSDL
******************************************************************* -->

    <target name="newcompact">
        <ant dir="${nimbus.ctxbroker.wsdl.compact.dir}" target="clean" />
        <ant dir="${nimbus.ctxbroker.wsdl.compact.dir}" target="copyToDeployableComponent" />
        <ant dir="${nimbus.ctxbroker.stubs.dir}" target="clean" />
        <ant dir="${nimbus.ctxbroker.stubs.dir}" target="dist" />
    </target>

</project>
Something went wrong with that request. Please try again.