blob: 207ef7113c8a1957211e224fddd2ad79b64b8104 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="Cloud Stack Plugins" default="help" basedir=".">
<target name="help">
<echo level="info" message="Ant Build File for CloudStack Plugins" />
<echo level="info" message="Type 'ant -projecthelp' to get a list of targets and their descriptions." />
</target>
<description>
Cloud Stack ant build file for building all the plugins
</description>
<!--
Test
Always use this variable to refer to the base directory because this
variable is changeable
-->
<dirname property="base.dir" file="${ant.file.Cloud Stack Plugins}/.." />
<property name="build.dir" location="${base.dir}/build" />
<!-- Import anything that the user wants to set-->
<!-- Import properties files and environment variables here -->
<property environment="env" />
<condition property="build-cloud.properties.file" value="${build.dir}/override/build-cloud.properties" else="${build.dir}/build-cloud.properties">
<available file="${build.dir}/override/build-cloud.properties" />
</condition>
<condition property="cloud.properties.file" value="${build.dir}/override/cloud.properties" else="${build.dir}/cloud.properties">
<available file="${build.dir}/override/cloud.properties" />
</condition>
<condition property="override.file" value="${build.dir}/override/replace.properties" else="${build.dir}/replace.properties">
<available file="${build.dir}/override/replace.properties" />
</condition>
<echo message="Using build parameters from ${build-cloud.properties.file}" />
<property file="${build-cloud.properties.file}" />
<echo message="Using company info from ${cloud.properties.file}" />
<property file="${cloud.properties.file}" />
<echo message="Using override file from ${override.file}" />
<property file="${override.file}" />
<property file="${base.dir}/build/build.number" />
<import file="${build.dir}/build-common.xml" />
<!-- In case these didn't get defined in the build-cloud.properties -->
<property name="branding.name" value="default" />
<property name="tomcat.home" value="${env.CATALINA_HOME}" />
<property name="deprecation" value="off" />
<property name="target.compat.version" value="1.6" />
<property name="source.compat.version" value="1.6" />
<property name="debug" value="true" />
<property name="debuglevel" value="lines,source"/>
<!-- directories for build and distribution -->
<property name="dist.dir" location="${base.dir}/dist/" />
<property name="target.dir" location="${base.dir}/target" />
<property name="classes.dir" location="${target.dir}/classes" />
<property name="jar.dir" location="${target.dir}/jar" />
<property name="dep.cache.dir" location="${target.dir}/dep-cache" />
<property name="build.log" location="${target.dir}/ant_verbose.txt" />
<property name="deps.dir" location="${base.dir}/deps" />
<!-- directories for client compilation-->
<property name="client.dir" location="${base.dir}/client" />
<property name="client.test.dir" location="${client.dir}/test" />
<property name="client.target.dir" location="${target.dir}/ui" />
<property name="ui.user.dir" location="${base.dir}/ui" />
<property name="setup.db.dir" location="${base.dir}/setup/db" />
<property name="setup.apidoc.dir" location="${base.dir}/setup/apidoc" />
<!-- directories for server compilation-->
<property name="server.dir" location="${base.dir}/server" />
<property name="server.test.dir" location="${server.dir}/test" />
<property name="server.dist.dir" location="${dist.dir}/client" />
<property name="db.scripts.dir" location="${target.dir}/db"/>
<property name="apidoc.scripts.dir" location="${base.dir}/setup/apidoc/"/>
<!-- directories for core code compilation-->
<property name="core.dir" location="${base.dir}/core" />
<property name="core.test.dir" location="${core.dir}/test/" />
<!-- directories for agent code compilation-->
<property name="agent.dir" location="${base.dir}/agent" />
<property name="agent.test.dir" location="${utils.dir}/test/" />
<property name="agent.dist.dir" location="${dist.dir}/agent" />
<property name="scripts.dir" location="${base.dir}/scripts" />
<property name="scripts.target.dir" location="${target.dir}/scripts"/>
<!-- directories for console proxy compilation-->
<property name="console-proxy.dir" location="${base.dir}/console-proxy" />
<property name="console-proxy.dist.dir" location="${dist.dir}/console-proxy" />
<property name="tools.dir" location="${base.dir}/tools" />
<!-- <property name="antcontrib.dir" location="${tools.dir}/tools/ant/apache-ant-1.8.0/lib" />-->
<property name="deploy.dir" location="${build.dir}/deploy" />
<property name="meld.home" location="/usr/local/bin" />
<property name="assertion" value="-da" />
<!-- directory for vmware-base library -->
<property name="vmware-base.dir" location="${base.dir}/vmware-base" />
<!-- directories for branding -->
<property name="branding.dir" location="${build.dir}/deploy/branding/${branding.name}" />
<property name="core.jar" value="cloud-core.jar" />
<property name="utils.jar" value="cloud-utils.jar" />
<property name="server.jar" value="cloud-server.jar" />
<property name="agent.jar" value="cloud-agent.jar" />
<property name="console-proxy.jar" value="cloud-console-proxy.jar" />
<property name="api.jar" value="cloud-api.jar"/>
<property name="vmware-base.jar" value="cloud-vmware-base.jar" />
<!--
Import information about the build version and company information
-->
<property name="version" value="${company.major.version}.${company.minor.version}.${company.patch.version}" />
<!-- Class paths -->
<path id="prod.src.path">
<pathelement location="${server.dir}/src" />
<pathelement location="${utils.dir}/src" />
<pathelement location="${core.dir}/src" />
<pathelement location="${agent.dir}/src" />
</path>
<path id="src.classpath">
</path>
<path id="compile.deps.classpath">
</path>
<path id="deps.classpath">
<!--filelist files="${deps.classpath}" /-->
<fileset dir="${deps.dir}" erroronmissingdir="false">
<include name="*.jar" />
</fileset>
<path refid="compile.deps.classpath" />
</path>
<path id="dist.classpath">
<fileset dir="${target.dir}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${target.dir}/jar">
<include name="**/*.jar" />
</fileset>
</path>
<path id="test.classpath">
<fileset dir="${dist.dir}">
<include name="**/*.jar" />
</fileset>
</path>
<target name="compile-plugins" description="Compile all of the jars corresponding to plugins" depends="compile-utils, compile-api, compile-core, compile-server, compile-hypervisors, compile-deployment-planners, compile-host-allocators, compile-network-elements, compile-user-authenticators, compile-storage-allocators"/>
<target name="build-plugins" depends="build-hypervisors, build-network-elements, build-deployment-planners, build-host-allocators, build-storage-allocators, build-user-authenticators" description="Builds all jar's for the plug-in's"/>
<target name="clean-plugins" description="Clean all of the generated files by the plugins">
<delete file="${build.log}" />
<delete dir="${classes.dir}" />
<delete dir="${jar.dir}" />
<delete dir="${dist.files.dir}" />
<delete dir="${target.dir}" />
</target>
<!-- ===================== Hypervisors ========================= -->
<target name="compile-hypervisors" depends="compile-kvm, compile-ovm, compile-xen" description="Compile all hypervisors"/>
<target name="build-hypervisors" depends="build-kvm, build-ovm, build-xen " description="Builds all hypervisors"/>
<target name="compile-kvm" depends="-init, compile-core, compile-agent" description="Compile KVM">
<ant antfile="${base.dir}/plugins/hypervisors/kvm/build.xml" target="build"/>
</target>
<target name="build-kvm" depends="compile-kvm" />
<target name="compile-ovm" depends="-init, compile-server" description="Compile OVM">
<ant antfile="${base.dir}/plugins/hypervisors/ovm/build.xml" target="build"/>
</target>
<target name="build-ovm" depends="compile-ovm" />
<target name="compile-xen" depends="-init, compile-server, compile-ovs" description="Compiles Xen ">
<ant antfile="${base.dir}/plugins/hypervisors/xen/build.xml" target="build"/>
</target>
<target name="build-xen" depends="compile-xen" />
<target name="compile-vmware" depends="-init, compile-server" description="Compiles Vmware">
<ant antfile="${base.dir}/plugins/hypervisors/vmware/build.xml" target="build"/>
</target>
<target name="build-vmware" depends="compile-vmware" />
<!-- ===================== Deployment Planners ================= -->
<target name="compile-deployment-planners" depends="compile-dp-user-dispersing, compile-dp-user-concentrated-pod" description="Compile all dp's"/>
<target name="build-deployment-planners" depends="build-dp-user-dispersing, build-dp-user-concentrated-pod" description="builds all dp's"/>
<target name="compile-dp-user-dispersing" depends="-init, compile-server" description="Compile dp-user-dispersing">
<ant antfile="${base.dir}/plugins/deployment-planners/user-dispersing/build.xml" target="build"/>
</target>
<target name="build-dp-user-dispersing" depends="compile-dp-user-dispersing" />
<target name="compile-dp-user-concentrated-pod" depends="-init, compile-server" description="Compile ">
<ant antfile="${base.dir}/plugins/deployment-planners/user-concentrated-pod/build.xml" target="build"/>
</target>
<target name="build-dp-user-concentrated-pod" depends="compile-dp-user-concentrated-pod" />
<!-- ===================== Host Allocators ===================== -->
<target name="compile-host-allocators" depends="compile-host-allocator-random" description="Compile all host allocators"/>
<target name="build-host-allocators" depends="build-host-allocator-random" description="builds all host allocators"/>
<target name="compile-host-allocator-random" depends="-init, compile-server" description="Compile ">
<ant antfile="${base.dir}/plugins/host-allocators/random/build.xml" target="build"/>
</target>
<target name="build-host-allocator-random" depends="compile-host-allocator-random" />
<!-- ===================== Storage Allocators ===================== -->
<target name="compile-storage-allocators" depends="compile-storage-allocator-random" description="Compile all storage allocators"/>
<target name="build-storage-allocators" depends="build-storage-allocator-random" description="builds all storage allocators"/>
<target name="compile-storage-allocator-random" depends="-init, compile-server" description="Compile ">
<ant antfile="${base.dir}/plugins/storage-allocators/random/build.xml" target="build"/>
</target>
<target name="build-storage-allocator-random" depends="compile-storage-allocator-random" />
<!-- ===================== User Authenticators ================== -->
<target name="compile-user-authenticators" depends="compile-user-authenticator-ldap, compile-user-authenticator-md5, compile-user-authenticator-plaintext" description="Compile all user authenicators"/>
<target name="build-user-authenticators" depends="build-user-authenticator-ldap, build-user-authenticator-md5, build-user-authenticator-plaintext" description="builds all user authenticators"/>
<target name="compile-user-authenticator-ldap" depends="-init, compile-server" description="Compiles LDAP user authenticator">
<ant antfile="${base.dir}/plugins/user-authenticators/ldap/build.xml" target="build"/>
</target>
<target name="build-user-authenticator-ldap" depends="compile-user-authenticator-ldap" />
<target name="compile-user-authenticator-md5" depends="-init, compile-server" description="Compiles MD5 user authenticator">
<ant antfile="${base.dir}/plugins/user-authenticators/md5/build.xml" target="build"/>
</target>
<target name="build-user-authenticator-md5" depends="compile-user-authenticator-md5" />
<target name="compile-user-authenticator-plaintext" depends="-init, compile-server" description="Compiles plaintext user authenticator">
<ant antfile="${base.dir}/plugins/user-authenticators/plain-text/build.xml" target="build"/>
</target>
<target name="build-user-authenticator-plaintext" depends="compile-user-authenticator-plaintext" />
<!-- ===================== Network Elements ===================== -->
<target name="compile-network-elements" depends="compile-ovs, compile-elb, compile-nicira-nvp" description="Compile all network elements"/>
<target name="build-network-elements" depends="build-ovs, build-elb, build-nicira-nvp" description="build all network elements"/>
<target name="compile-netscaler" depends="-init, compile-server" description="Compile NetScaler plugin">
<ant antfile="${base.dir}/plugins/network-elements/netscaler/build.xml" target="build"/>
</target>
<target name="build-netscaler" depends="compile-netscaler"/>
<target name="compile-f5" depends="-init, compile-server" description="Compile F5 plugin">
<ant antfile="${base.dir}/plugins/network-elements/f5/build.xml" target="build"/>
</target>
<target name="build-f5" depends="compile-f5"/>
<target name="compile-srx" depends="-init, compile-server" description="Compile SRX plugin">
<ant antfile="${base.dir}/plugins/network-elements/juniper-srx/build.xml" target="build"/>
</target>
<target name="build-srx" depends="compile-srx"/>
<target name="compile-ovs" depends="-init, compile-server" description="Compile Ovs plugin">
<ant antfile="${base.dir}/plugins/network-elements/ovs/build.xml" target="build"/>
</target>
<target name="build-ovs" depends="compile-ovs"/>
<target name="compile-nicira-nvp" depends="-init, compile-server" description="Compile Nicira NVP plugin">
<ant antfile="${base.dir}/plugins/network-elements/nicira-nvp/build.xml" target="build"/>
</target>
<target name="build-nicira-nvp" depends="compile-nicira-nvp"/>
<target name="compile-elb" depends="-init, compile-server" description="Compile ELB plugin">
<ant antfile="${base.dir}/plugins/network-elements/elastic-loadbalancer/build.xml" target="build"/>
</target>
<target name="build-elb" depends="compile-elb"/>
<!-- ===================== File Systems ===================== -->
<target name="compile-file-systems" depends="compile-netapp" description="Compils all supported file systems"/>
<target name="build-file-systems" depends="build-netapp" description="Builds all supported file systems"/>
<target name="compile-netapp" depends="-init, compile-server" description="Compile NetApp plugin">
<ant antfile="${base.dir}/plugins/file-systems/netapp/build.xml" target="build"/>
</target>
<target name="build-netapp" depends="compile-netapp"/>
</project>