cloudstack/build/build-usage.xml
2012-07-16 15:00:37 -07:00

76 lines
2.9 KiB
XML

<?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 Usage Server" default="help" basedir=".">
<description>
Cloud Stack Usage server build
</description>
<property name="base.dir" location="${ant.file.Cloud Stack Usage Server}/../../.."/>
<property name="oss.build.dir" location="${base.dir}/build"/>
<property name="usage.jar" value="cloud-usage.jar" />
<dirname property="proprietary.dir" file="${ant.file.Cloud Stack Usage Server}/../"/>
<import file="${oss.build.dir}/build-cloud.xml" optional="false"/>
<property name="usage.dir" location="${base.dir}/usage" />
<property name="usage.dist.dir" location="${dist.dir}/usage" />
<!-- ToDo: get actual PID -->
<property name="pid" value="4567"/>
<!-- ===================== Usage.Jar ===================== -->
<path id="usage.classpath">
<path refid="deps.classpath" />
<path refid="dist.classpath" />
</path>
<target name="compile-usage" depends="-init, compile-utils, compile-core, compile-server" description="Compile the usage server">
<compile-java jar.name="${usage.jar}" top.dir="${usage.dir}" classpath="usage.classpath" />
</target>
<target name="build-usage" depends="build-all, compile-usage">
<mkdir dir="${usage.dist.dir}/bin" />
<mkdir dir="${usage.dist.dir}/conf" />
<copy todir="${usage.dist.dir}/bin">
<fileset dir="${usage.dir}/scripts">
<include name="usageserver.sh" />
</fileset>
</copy>
<copy overwrite="true" todir="${usage.dist.dir}/lib">
<fileset dir="${jar.dir}">
<include name="${usage.jar}" />
</fileset>
</copy>
</target>
<target name="run-usage" depends="build-usage">
<java classname="com.cloud.usage.UsageServer" fork="true">
<classpath refid="usage.classpath"/>
<jvmarg value="-Dpid=${pid}"/>
</java>
</target>
<target name="debug-usage" depends="build-usage">
<java classname="com.cloud.usage.UsageServer" fork="true">
<classpath refid="usage.classpath"/>
<jvmarg value="-Dpid=${pid}"/>
<jvmarg value="-Xrunjdwp:transport=dt_socket,address=8788,server=y,suspend=n"/>
</java>
</target>
</project>