You are viewing a plain text version of this content. The canonical link for it is here.
Posted to kato-commits@incubator.apache.org by sp...@apache.org on 2009/05/22 10:07:07 UTC
svn commit: r777446 - in /incubator/kato/trunk/KatoHProfAdapterPOC:
build.properties build.xml
Author: spoole
Date: Fri May 22 10:07:07 2009
New Revision: 777446
URL: http://svn.apache.org/viewvc?rev=777446&view=rev
Log:
added build scripts to allow hprof adapter to build on hudson
Added:
incubator/kato/trunk/KatoHProfAdapterPOC/build.xml (with props)
Modified:
incubator/kato/trunk/KatoHProfAdapterPOC/build.properties
Modified: incubator/kato/trunk/KatoHProfAdapterPOC/build.properties
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/KatoHProfAdapterPOC/build.properties?rev=777446&r1=777445&r2=777446&view=diff
==============================================================================
--- incubator/kato/trunk/KatoHProfAdapterPOC/build.properties (original)
+++ incubator/kato/trunk/KatoHProfAdapterPOC/build.properties Fri May 22 10:07:07 2009
@@ -1,3 +1,22 @@
+dependencies=dependencies
+junit.jar.url=http://prdownloads.sourceforge.net/junit/junit4.1.zip?download
+junit.jar=${dependencies}/junit/junit4.1/junit-4.1.jar
+kato.api.jar.url=http://hudson.zones.apache.org/hudson/view/Kato/job/kato.api-head/lastSuccessfulBuild/artifact/org.apache.kato.api/output/dist/kato.api-head.jar
+kato.api.jar=${dependencies}/api/kato.api.jar
+kato.hprof.reader.jar.url=http://hudson.zones.apache.org/hudson/view/Kato/job/kato.hprof.reader-head/lastSuccessfulBuild/artifact/HprofBinaryReaderPOC/output/dist/kato.hprof.reader-head.jar
+kato.hprof.reader.jar=${dependencies}/api/kato.hprof.reader.jar
+output=output
+dist=${output}/dist
+javadoc.output=${output}/javadoc
+junit.output=${output}/junit
+src=src
+testsrc=testsrc
+bin=bin
+srclevel=1.5
+jarfile=${dist}/kato.hprof-head.jar
+srcjarfile=${dist}/kato.hprof-head.src.jar
+
+
source.. = testsrc/,\
src/
bin.includes = META-INF/,\
Added: incubator/kato/trunk/KatoHProfAdapterPOC/build.xml
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/KatoHProfAdapterPOC/build.xml?rev=777446&view=auto
==============================================================================
--- incubator/kato/trunk/KatoHProfAdapterPOC/build.xml (added)
+++ incubator/kato/trunk/KatoHProfAdapterPOC/build.xml Fri May 22 10:07:07 2009
@@ -0,0 +1,152 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed 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.
+-->
+<!-- ======================================================================
+
+ Apache Kato HPROF Adapter Build script
+
+ Configuration properties are kept in build.properties local to this
+ file.
+
+ The junit dependency is fetched from the junit website
+ ====================================================================== -->
+<project name="project" default="default">
+
+ <tstamp />
+
+ <property file="build.properties" />
+
+ <!-- =================================
+ target: default
+ ================================= -->
+
+ <target name="default">
+ <antcall target="fetch.dependencies"/>
+ <antcall target="clean" />
+ <antcall target="compile" />
+ <antcall target="test" />
+ <antcall target="javadoc" />
+ <antcall target="jar" />
+
+
+ </target>
+
+
+ <!--
+ fetch required dependencies
+ In this case junit
+ -->
+ <target name="fetch.dependencies">
+ <mkdir dir="${dependencies}"/>
+ <mkdir dir="${dependencies}/junit"/>
+ <mkdir dir="${dependencies}/api"/>
+ <get dest="${dependencies}/junit/junit.zip" src="${junit.jar.url}" usetimestamp="true" />
+ <unzip dest="${dependencies}/junit" src="${dependencies}/junit/junit.zip"/>
+ <get dest="${kato.api.jar}" src="${kato.api.jar.url}" usetimestamp="true" />
+ <get dest="${kato.hprof.reader.jar}" src="${kato.hprof.reader.jar.url}" usetimestamp="true" />
+ </target>
+
+
+ <!-- remove compiled classes, jars etc-->
+
+ <target name="clean">
+ <delete dir="${bin}" />
+ <delete dir="${output}" />
+
+ </target>
+
+ <!-- compile -->
+
+ <target name="compile">
+
+ <mkdir dir="${bin}" />
+
+ <javac srcdir="${src}" debug="on" destdir="${bin}" source="${srclevel}" target="${srclevel}" >
+ <classpath>
+ <path location="${kato.api.jar}" />
+ <path location="${kato.hprof.reader.jar}" />
+ </classpath>
+ </javac>
+ <javac srcdir="${testsrc}" debug="on" destdir="${bin}" source="${srclevel}" target="${srclevel}">
+ <classpath>
+ <path location="${kato.api.jar}" />
+ <path location="${kato.hprof.reader.jar}" />
+ <path location="${junit.jar}" />
+ </classpath>
+
+ </javac>
+ <copy todir="${bin}/META-INF" file="META-INF/MANIFEST.MF">
+ <filterset>
+ <filter token="TITLE" value="Apache Kato HPROF ${buildname} built ${DSTAMP}:${TSTAMP}" />
+ <filter token="VERSION" value="${build.number}" />
+ </filterset>
+
+ </copy>
+ </target>
+
+ <target name="test" unless="no.test">
+
+ <mkdir dir="${output}" />
+ <mkdir dir="${junit.output}" />
+
+ <junit>
+ <classpath>
+ <path location="${junit.jar}" />
+ <path location="${kato.api.jar}" />
+ <path location="${kato.hprof.reader.jar}" />
+ <path location="${bin}" />
+ </classpath>
+
+ <formatter type="plain" />
+ <formatter type="xml" />
+
+ <batchtest fork="yes" todir="${junit.output}">
+ <fileset dir="${testsrc}">
+ <include name="**/*Test*.java" />
+ <exclude name="**/AllTests.java" />
+ </fileset>
+ </batchtest>
+
+ </junit>
+ </target>
+
+ <target name="jar">
+ <mkdir dir="${dist}" />
+
+ <jar jarfile="${jarfile}" filesonly="true" manifest="${bin}/META-INF/MANIFEST.MF">
+ <fileset dir="${bin}">
+ <exclude name="test**/*.class" />
+ </fileset>
+ </jar>
+ <jar jarfile="${srcjarfile}" filesonly="true">
+ <fileset dir="${src}">
+ <include name="**/*.java" />
+ </fileset>
+ </jar>
+ </target>
+
+
+
+
+ <target name="javadoc" unless="no.javadoc">
+ <mkdir dir="${javadoc.output}" />
+ <javadoc packagenames="org.apache.kato.*" verbose="false" sourcepath="${src}" defaultexcludes="yes" destdir="${javadoc.output}" author="true" version="true" use="true" failonerror="true" >
+ <link href="http://java.sun.com/j2se/1.5.0/docs/api/" />
+ <link href="http://hudson.zones.apache.org/hudson/view/Kato/job/kato.api-head/javadoc/" />
+
+ </javadoc>
+ </target>
+
+
+</project>
\ No newline at end of file
Propchange: incubator/kato/trunk/KatoHProfAdapterPOC/build.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain