blob: d5bc6b7be1e7ce378ab74dfef8a21dcababbba10 [file] [log] [blame]
<?xml version="1.0"?>
<!--
/***********************************************************************************************************************
* Copyright (c) 2008 empolis GmbH and brox IT Solutions GmbH. All rights reserved. This program and the accompanying
* materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors: Ivan Churkin (brox IT Solutions GmbH) - initial creator
**********************************************************************************************************************/
-->
<project name="jmxclient" basedir="." default="all">
<property name="extension.dir" location="../SMILA.extension" />
<property name="jmxclient_folder" location="../org.eclipse.smila.management.jmx.client" />
<echo>${jmxclient_folder}</echo>
<property name="jmxclient_target" location="${buildDirectory}/jmxclient" />
<target name="prepare">
<delete dir="${jmxclient_target}" failonerror="false" />
<mkdir dir="${jmxclient_target}" />
<mkdir dir="${jmxclient_target}/lib" />
<mkdir dir="${jmxclient_target}/schemas" />
<mkdir dir="${jmxclient_target}/code/bin" />
</target>
<target name="compile" depends="prepare">
<javac srcdir="${jmxclient_folder}/code/src:${jmxclient_folder}/code/gen" destdir="${jmxclient_target}/code/bin" debug="true">
<classpath>
<fileset dir="${jmxclient_folder}/../org.apache.commons.logging/lib">
<include name="commons-logging-*.jar" />
</fileset>
<fileset dir="${extension.dir}/eclipse/plugins/">
<include name="org.apache.commons.beanutils_*.jar" />
<include name="org.apache.log4j_*.jar" />
</fileset>
</classpath>
</javac>
<copy todir="${jmxclient_target}">
<fileset dir="${jmxclient_folder}">
<include name="config.xml" />
<include name="log4j.properties" />
</fileset>
</copy>
</target>
<target name="copy">
<copy todir="${jmxclient_target}/lib">
<fileset dir="${jmxclient_folder}/../org.apache.commons.logging/lib">
<include name="commons-logging-*.jar" />
</fileset>
<fileset dir="${extension.dir}/eclipse/plugins/">
<include name="org.apache.commons.beanutils_*.jar" />
<include name="org.apache.log4j_*.jar" />
</fileset>
</copy>
<move todir="${jmxclient_target}/lib">
<fileset dir="${jmxclient_target}/lib">
<include name="*.jar" />
</fileset>
<mapper type="regexp" from="^(.*)\.v?[0-9-]{12,13}+\.jar$$" to="\1.jar" />
</move>
<copy file="${jmxclient_folder}/schemas/jmxclient.xsd" tofile="${jmxclient_target}/schemas/jmxclient.xsd" />
</target>
<target name="pack-jar" depends="compile, copy">
<jar destfile="${jmxclient_target}/lib/jmxclient.jar" manifest="${jmxclient_folder}/META-INF/MANIFEST.MF">
<fileset dir="${jmxclient_target}/code/bin" />
</jar>
<delete dir="${jmxclient_target}/code" failonerror="false" />
</target>
<target name="copy-scripts">
<copy todir="${jmxclient_target}">
<fileset dir="${jmxclient_folder}/code/scripts">
<include name="run.sh" />
<include name="run.bat" />
<include name="*.sh" />
<include name="*.bat" />
</fileset>
</copy>
<chmod perm="ugo+x">
<fileset dir="${jmxclient_target}">
<include name="run.sh" />
<include name="sample.sh" />
</fileset>
</chmod>
</target>
<target name="all" depends="pack-jar, copy-scripts">
<echo>Building JMX client</echo>
</target>
</project>