blob: b1974b862563c2e503f0dbab14585e58375a09f3 [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="remote-packs" basedir="." default="profiler-server-all">
<!--
<import file="../../../../nbbuild/templates/projectized.xml"/>
-->
<property name="lib.dir" value="${cluster}/lib"/>
<property name="build.dir" value="${dest.dir}/nb-profiler-server"/>
<property name="profiler.cluster" value=".."/>
<!-- ** Targets for remote-packs zips. These zips are used to facilitate remote profiling -->
<target name="profiler-server-win-15">
<antcall target="profiler-server-windows">
<param name="os-version" value="win"/>
<param name="os-long-version" value="windows"/>
</antcall>
</target>
<target name="profiler-server-winamd64-15">
<antcall target="profiler-server-windows">
<param name="os-version" value="winamd64"/>
<param name="os-long-version" value="windows-amd64"/>
</antcall>
</target>
<target name="profiler-server-win-cvm">
<antcall target="profiler-server-windows-cvm">
<param name="os-version" value="win"/>
<param name="os-long-version" value="windows"/>
<param name="jdk-version" value="cvm"/>
<param name="calibrate-suffix" value="-win-cvm"/>
</antcall>
</target>
<target name="profiler-server-windows">
<property name="calibrate-suffix" value="-15"/>
<antcall target="profiler-server-common-windows">
</antcall>
<antcall target="profiler-server-jdkspecific-windows">
<param name="jdk-version" value="15"/>
</antcall>
<antcall target="profiler-server-jdkspecific-windows">
<param name="jdk-version" value="16"/>
</antcall>
<antcall target="profiler-server-zip-windows">
</antcall>
</target>
<target name="profiler-server-windows-cvm">
<antcall target="profiler-server-common-windows">
</antcall>
<copy tofile="${build.dir}/bin/profile.bat" file="profile-${os-version}-${jdk-version}.bat" />
<copy todir="${build.dir}/lib">
<fileset file="${lib.dir}/jfluid-server-${jdk-version}.jar" />
</copy>
<mkdir dir="${build.dir}/lib/deployed/${jdk-version}"/>
<copy todir="${build.dir}/lib/deployed/${jdk-version}/${os-long-version}">
<fileset dir="${profiler.cluster}/lib/deployed/${jdk-version}/${os-long-version}" />
</copy>
<antcall target="profiler-server-zip-windows">
<param name="os-version" value="${os-version}cvm"/>
</antcall>
</target>
<target name="profiler-server-mac-15">
<property name="jdk-version" value="15"/>
<antcall target="profiler-server-unix">
<param name="os-version" value="mac"/>
<param name="os-long-version" value="mac"/>
<param name="calibrate-suffix" value="-mac-${jdk-version}"/>
</antcall>
</target>
<target name="profiler-server-linux-15">
<antcall target="profiler-server-15">
<param name="os-version" value="linux"/>
<param name="os-long-version" value="linux"/>
</antcall>
</target>
<target name="profiler-server-linuxamd64-15">
<antcall target="profiler-server-15">
<param name="os-version" value="linuxamd64"/>
<param name="os-long-version" value="linux-amd64"/>
</antcall>
</target>
<target name="profiler-server-linuxarm-15">
<antcall target="profiler-server-common-unix">
<param name="calibrate-suffix" value="-16"/>
</antcall>
<copy todir="${build.dir}/lib">
<fileset file="${lib.dir}/jfluid-server-15.jar" />
</copy>
<antcall target="profiler-server-jdkspecific-unix">
<param name="jdk-version" value="16"/>
<param name="os-version" value="linuxarm"/>
<param name="os-long-version" value="linux-arm"/>
</antcall>
<antcall target="profiler-server-zip-unix">
<param name="os-version" value="linuxarm"/>
</antcall>
</target>
<target name="profiler-server-linuxarmvfphflt-15">
<antcall target="profiler-server-common-unix">
<param name="calibrate-suffix" value="-16"/>
</antcall>
<copy todir="${build.dir}/lib">
<fileset file="${lib.dir}/jfluid-server-15.jar" />
</copy>
<antcall target="profiler-server-jdkspecific-unix">
<param name="jdk-version" value="16"/>
<param name="os-version" value="linuxarmvfphflt"/>
<param name="os-long-version" value="linux-arm-vfp-hflt"/>
</antcall>
<antcall target="profiler-server-zip-unix">
<param name="os-version" value="linuxarmvfphflt"/>
</antcall>
</target>
<target name="profiler-server-linux-cvm">
<antcall target="profiler-server-unix-cvm">
<param name="os-version" value="linux"/>
<param name="os-long-version" value="linux"/>
<param name="jdk-version" value="cvm"/>
<param name="calibrate-suffix" value="-linux-cvm"/>
</antcall>
</target>
<target name="profiler-server-solx86-15">
<antcall target="profiler-server-15">
<param name="os-version" value="solx86"/>
<param name="os-long-version" value="solaris-i386"/>
</antcall>
</target>
<target name="profiler-server-solamd64-15">
<antcall target="profiler-server-solaris64-15">
<param name="os-version" value="solamd64"/>
<param name="os-long-version" value="solaris-amd64"/>
</antcall>
</target>
<target name="profiler-server-solsparc-15">
<antcall target="profiler-server-15">
<param name="os-version" value="solsparc"/>
<param name="os-long-version" value="solaris-sparc"/>
</antcall>
</target>
<target name="profiler-server-solsparcv9-15">
<antcall target="profiler-server-solaris64-15">
<param name="os-version" value="solsparcv9"/>
<param name="os-long-version" value="solaris-sparcv9"/>
</antcall>
</target>
<target name="profiler-server-solaris64-15">
<property name="jdk-version" value="15"/>
<antcall target="profiler-server-unix">
<param name="calibrate-suffix" value="-solaris64-${jdk-version}"/>
</antcall>
</target>
<target name="profiler-server-15">
<property name="jdk-version" value="15"/>
<antcall target="profiler-server-unix">
<param name="calibrate-suffix" value="-${jdk-version}"/>
</antcall>
</target>
<target name="profiler-server-unix-cvm">
<antcall target="profiler-server-common-unix">
</antcall>
<copy tofile="${build.dir}/bin/profile.sh" file="profile-${os-version}-${jdk-version}.sh" />
<copy todir="${build.dir}/lib">
<fileset file="${lib.dir}/jfluid-server-${jdk-version}.jar" />
</copy>
<mkdir dir="${build.dir}/lib/deployed/${jdk-version}"/>
<copy todir="${build.dir}/lib/deployed/${jdk-version}/${os-long-version}">
<fileset dir="${profiler.cluster}/lib/deployed/${jdk-version}/${os-long-version}" />
</copy>
<antcall target="profiler-server-zip-unix">
<param name="os-version" value="${os-version}cvm"/>
</antcall>
</target>
<target name="profiler-server-unix">
<antcall target="profiler-server-common-unix">
</antcall>
<antcall target="profiler-server-jdkspecific-unix">
<param name="jdk-version" value="15"/>
</antcall>
<antcall target="profiler-server-jdkspecific-unix">
<param name="jdk-version" value="16"/>
</antcall>
<antcall target="profiler-server-zip-unix">
</antcall>
</target>
<target name="profiler-server-calibration-linux" if="isLinux">
<copy tofile="${build.dir}/bin/calibrate-${jdk-version}.sh" file="calibrate-${jdk-version}.sh" />
</target>
<target name="profiler-server-common-unix" depends="profiler-server-common" unless="isLinux">
<copy tofile="${build.dir}/bin/calibrate.sh" file="calibrate${calibrate-suffix}.sh" />
</target>
<target name="profiler-server-common-windows" depends="profiler-server-common">
<copy tofile="${build.dir}/bin/calibrate.bat" file="calibrate${calibrate-suffix}.bat" />
</target>
<target name="profiler-server-common">
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.dir}/bin"/>
<mkdir dir="${build.dir}/lib"/>
<copy todir="${build.dir}/lib" file="${lib.dir}/jfluid-server.jar" />
</target>
<target name="profiler-server-jdkspecific-unix" depends="profiler-server-jdkspecific">
<condition property="isLinux">
<or>
<equals arg1="${os-version}" arg2="linux"/>
<equals arg1="${os-version}" arg2="linuxamd64"/>
</or>
</condition>
<antcall target="profiler-server-calibration-linux"/>
<copy tofile="${build.dir}/bin/profile-${jdk-version}.sh" file="profile-${os-version}-${jdk-version}.sh" />
</target>
<target name="profiler-server-jdkspecific-windows" depends="profiler-server-jdkspecific">
<copy tofile="${build.dir}/bin/profile-${jdk-version}.bat" file="profile-${os-version}-${jdk-version}.bat" />
</target>
<target name="profiler-server-jdkspecific">
<copy todir="${build.dir}/lib">
<fileset file="${lib.dir}/jfluid-server-${jdk-version}.jar" />
</copy>
<mkdir dir="${build.dir}/lib/deployed/jdk${jdk-version}"/>
<copy todir="${build.dir}/lib/deployed/jdk${jdk-version}/${os-long-version}">
<fileset dir="${profiler.cluster}/lib/deployed/jdk${jdk-version}/${os-long-version}" />
</copy>
</target>
<target name="profiler-server-zip-unix">
<fixcrlf srcdir="${build.dir}/bin" includes="*.sh" eol="unix" />
<copy tofile="${build.dir}/README" file="README.txt" />
<fixcrlf srcdir="${build.dir}" includes="README" eol="unix" />
<zip destfile="${dest.dir}/profiler-server-${os-version}.zip">
<zipfileset dir="${build.dir}" filemode="755" includes="bin/*">
<type type="file"/>
</zipfileset>
<zipfileset dir="${build.dir}" includes="**/*">
<exclude name="bin/*"/>
</zipfileset>
</zip>
<delete dir="${build.dir}" />
</target>
<target name="profiler-server-zip-windows">
<fixcrlf srcdir="${build.dir}/bin" includes="*.bat" eol="dos" />
<copy tofile="${build.dir}/README.txt" file="README.txt" />
<fixcrlf srcdir="${build.dir}" includes="README.txt" eol="dos" />
<zip destfile="${dest.dir}/profiler-server-${os-version}.zip" basedir="${build.dir}" includes="**/*" />
<delete dir="${build.dir}" />
</target>
<!-- creates the remote packs as a profiler-server for all platforms -->
<target name="profiler-server-all" depends="profiler-server-win-15, profiler-server-winamd64-15, profiler-server-win-cvm, profiler-server-mac-15, profiler-server-linux-15, profiler-server-linuxamd64-15, profiler-server-linuxarm-15, profiler-server-linuxarmvfphflt-15, profiler-server-linux-cvm, profiler-server-solx86-15, profiler-server-solamd64-15, profiler-server-solsparc-15, profiler-server-solsparcv9-15" />
</project>