Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 229 lines (227 sloc) 10.96 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 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228
<!--
~ Software License Agreement (BSD License)
~
~ Copyright (c) 2008, Regents of the University of California
~ All rights reserved.
~
~ Redistribution and use of this software in source and binary forms, with or
~ without modification, are permitted provided that the following conditions
~ are met:
~
~ * Redistributions of source code must retain the above
~ copyright notice, this list of conditions and the
~ following disclaimer.
~
~ * Redistributions in binary form must reproduce the above
~ copyright notice, this list of conditions and the
~ following disclaimer in the documentation and/or other
~ materials provided with the distribution.
~
~ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
~ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
~ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
~ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
~ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
~ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
~ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
~ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
~ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
~ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
~ POSSIBILITY OF SUCH DAMAGE.
~
~ Author: Chris Grzegorczyk grze@cs.ucsb.edu
-->

<project name="eucalyptus" basedir=".">
    <import file="modules/module-inc.xml"/>
    <import file="cloud.xml"/>
    <!--================================== other vars ==================================-->
    <loadfile srcfile="../VERSION" property="euca.version">
        <filterchain>
            <filterreader classname="org.apache.tools.ant.filters.StripLineBreaks"/>
        </filterchain>
    </loadfile>
    <property name="jvm.heap" value="256m"/>
    <property name="deps.url" value="http://open.eucalyptus.com/dependencies/${euca.version}"/>
    <property name="deps.dir" value="deps"/>
    <property name="deps.lib.dir" value="lib"/>
    <property name="deps.axis2modules.dir" value="axis2-modules"/>
    <property name="deps.lib" value="cloud-lib"/>
    <property name="deps.deploy" value="cloud-deploy"/>
    <!--================================== build targets ==================================-->
    <target name="build-crypto">
        <ant dir="modules/crypto" inheritall="false"/>
    </target>
    <target name="build-workarounds" depends="build-crypto">
        <ant dir="modules/workarounds" inheritall="false"/>
    </target>
    <target name="build-msgs" depends="build-workarounds">
        <ant dir="modules/msgs" inheritall="false"/>
    </target>
    <target name="build-core" depends="build-msgs">
        <ant dir="modules/core" inheritall="false"/>
    </target>
    <target name="build-www" depends="build-eucalyptus-ws">
        <ant dir="modules/www" inheritall="false"/>
    </target>
    <target name="build-transport" depends="build-core">
        <ant dir="modules/axis2-transport" inheritall="false"/>
    </target>
    <target name="build-eucalyptus-ws" depends="build-transport">
        <ant dir="modules/interface" inheritall="false"/>
        <ant dir="modules/cluster-manager" inheritall="false"/>
        <ant dir="modules/image-manager" inheritall="false"/>
        <ant dir="modules/group-manager" inheritall="false"/>
        <ant dir="modules/key-manager" inheritall="false"/>
    </target>
    <target name="build-walrus-ws" depends="build-transport">
        <ant dir="modules/storage-manager" inheritall="false"/>
    </target>
    <target name="build-ebs-ws" depends="build-walrus-ws">
        <ant dir="modules/storage-controller" inheritall="false"/>
    </target>
    <target name="build-dns-ws" depends="build-transport">
        <ant dir="modules/dns" inheritall="false"/>
    </target>
    <target name="build-eucalyptus" depends="build-core,build-www,build-eucalyptus-ws"/>
    <target name="build-walrus" depends="build-walrus-ws"/>
    <target name="build-ebs" depends="build-ebs-ws"/>
    <target name="build-dns" depends="build-dns-ws"/>
    <target name="build" depends="deps,build-eucalyptus,build-walrus,build-ebs,build-dns"/>
    <!--================================== clean targets ==================================-->
    <target name="clean-workarounds">
        <ant dir="modules/workarounds" inheritall="false" target="clean"/>
    </target>
    <target name="clean-crypto" depends="clean-workarounds">
        <ant dir="modules/crypto" inheritall="false" target="clean"/>
    </target>
    <target name="clean-msgs" depends="clean-crypto">
        <ant dir="modules/msgs" inheritall="false" target="clean"/>
    </target>
    <target name="clean-core" depends="clean-msgs">
        <ant dir="modules/core" inheritall="false" target="clean"/>
    </target>
    <target name="clean-www" depends="clean-eucalyptus-ws">
        <ant dir="modules/www" inheritall="false" target="clean"/>
    </target>
    <target name="clean-transport" depends="clean-core">
        <ant dir="modules/axis2-transport" inheritall="false" target="clean"/>
    </target>
    <target name="clean-eucalyptus-ws" depends="clean-transport">
        <ant dir="modules/interface" inheritall="false" target="clean"/>
        <ant dir="modules/cluster-manager" inheritall="false" target="clean"/>
        <ant dir="modules/image-manager" inheritall="false" target="clean"/>
        <ant dir="modules/group-manager" inheritall="false" target="clean"/>
        <ant dir="modules/key-manager" inheritall="false" target="clean"/>
    </target>
    <target name="clean-walrus-ws" depends="clean-transport">
        <ant dir="modules/storage-manager" inheritall="false" target="clean"/>
    </target>
    <target name="clean-ebs-ws" depends="clean-transport">
        <ant dir="modules/storage-controller" inheritall="false" target="clean"/>
    </target>
    <target name="clean-dns-ws" depends="clean-transport">
        <ant dir="modules/dns" inheritall="false" target="clean"/>
    </target>
    <target name="clean-eucalyptus" depends="clean-core,clean-www,clean-eucalyptus-ws"/>
    <target name="clean-walrus" depends="clean-walrus-ws"/>
    <target name="clean-ebs" depends="clean-ebs-ws"/>
    <target name="clean-dns" depends="clean-dns-ws"/>
    <target name="clean" depends="clean-eucalyptus,clean-walrus,clean-ebs,clean-dns">
        <delete dir="${target.dir}"/>
    </target>
    <target name="distclean" depends="clean">
        <delete dir="${deps.dir}"/>
        <delete dir="${deps.lib.dir}"/>
    </target>
    <!--================================== install target ==================================-->
    <target name="install" depends="build">
        <!-- copy libraries over -->
        <mkdir dir="${euca.lib.dir}"/>
        <copy todir="${euca.lib.dir}">
            <fileset dir="${basedir}/target">
                <include name="**/*.jar"/>
            </fileset>
        </copy>
        <copy todir="${euca.lib.dir}">
            <fileset dir="${deps.lib.dir}">
                <include name="**/*"/>
            </fileset>
        </copy>
        <copy todir="${euca.var.dir}/modules">
            <fileset dir="${deps.axis2modules.dir}/modules">
                <include name="**/*"/>
            </fileset>
        </copy>
        <mkdir dir="${euca.conf.dir}"/>
<chmod dir="${euca.conf.dir}" perm="0755"/>
        <mkdir dir="${euca.var.dir}/"/>
        <mkdir dir="${euca.var.dir}/db"/>
        <mkdir dir="${euca.var.dir}/keys"/>
<!-- <chmod dir="${euca.var.dir}/db" perm="0700"/>
<chmod dir="${euca.var.dir}/keys" perm="0700"/> -->
        <mkdir dir="${euca.log.dir}"/>
        <mkdir dir="${euca.var.dir}/webapps"/>
        <mkdir dir="${euca.var.dir}/modules"/>
        <ant dir="modules/workarounds" inheritall="false" target="install"/>
        <ant dir="modules/crypto" inheritall="false" target="install"/>
        <ant dir="modules/msgs" inheritall="false" target="install"/>
        <ant dir="modules/core" inheritall="false" target="install"/>
        <ant dir="modules/www" inheritall="false" target="install"/>
        <ant dir="modules/axis2-transport" inheritall="false" target="install"/>
        <ant dir="modules/interface" inheritall="false" target="install"/>
        <ant dir="modules/cluster-manager" inheritall="false" target="install"/>
        <ant dir="modules/image-manager" inheritall="false" target="install"/>
        <ant dir="modules/group-manager" inheritall="false" target="install"/>
        <ant dir="modules/key-manager" inheritall="false" target="install"/>
        <ant dir="modules/storage-manager" inheritall="false" target="install"/>
        <ant dir="modules/storage-controller" inheritall="false" target="install"/>
        <ant dir="modules/dns" inheritall="false" target="install"/>
    </target>
    <!--================================== unzipping target ==================================-->
    <target name="deps">
        <condition property="needDownload">
            <and>
                <not>
                    <available file="${deps.lib.dir}/jibx-run.jar"/>
                </not>
                <and>
                    <or>
                        <not>
                            <available file="${deps.dir}/${deps.lib}.tar.gz"/>
                        </not>
                        <not>
                            <available file="${deps.dir}/${deps.deploy}.tar.gz"/>
                        </not>
                    </or>
                </and>
            </and>
        </condition>
        <ant target="download-deps"/>
        <condition property="needUnzipping">
            <and>
                <not>
                    <available file="${deps.lib.dir}/jibx-run.jar"/>
                </not>
                <and>
                    <available file="${deps.dir}/${deps.lib}.tar.gz"/>
                    <available file="${deps.dir}/${deps.deploy}.tar.gz"/>
                </and>
            </and>
        </condition>
        <ant target="untar"/>
    </target>
    <target name="dist-deps" depends="deps">
        <delete dir="${deps.dir}"/>
    </target>
    <target name="untar" if="needUnzipping">
        <untar compression="gzip" src="${deps.dir}/${deps.lib}.tar.gz" dest="${deps.lib.dir}"/>
        <untar compression="gzip" src="${deps.dir}/${deps.deploy}.tar.gz" dest="${deps.axis2modules.dir}"/>
    </target>
    <target name="download-deps" if="needDownload">
        <mkdir dir="${deps.dir}"/>
        <mkdir dir="${deps.lib.dir}"/>
        <!--=========== download the dependency libraries ===========-->
        <get src="${deps.url}/${deps.lib}.tar.gz" dest="${deps.dir}/${deps.lib}.tar.gz"/>
        <get src="${deps.url}/${deps.deploy}.tar.gz" dest="${deps.dir}/${deps.deploy}.tar.gz"/>
    </target>
</project>
Something went wrong with that request. Please try again.