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/21 15:36:28 UTC

svn commit: r777155 - in /incubator/kato/trunk/org.apache.kato.jvmti: build.properties build.xml

Author: spoole
Date: Thu May 21 15:36:28 2009
New Revision: 777155

URL: http://svn.apache.org/viewvc?rev=777155&view=rev
Log:
added build script to build the jvmti project

Added:
    incubator/kato/trunk/org.apache.kato.jvmti/build.properties   (with props)
    incubator/kato/trunk/org.apache.kato.jvmti/build.xml   (with props)

Added: incubator/kato/trunk/org.apache.kato.jvmti/build.properties
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato.jvmti/build.properties?rev=777155&view=auto
==============================================================================
--- incubator/kato/trunk/org.apache.kato.jvmti/build.properties (added)
+++ incubator/kato/trunk/org.apache.kato.jvmti/build.properties Thu May 21 15:36:28 2009
@@ -0,0 +1,28 @@
+#-------------------------------------------------------------------------------
+# 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.
+#-------------------------------------------------------------------------------
+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
+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.jvmti-head.jar
+srcjarfile=${dist}/kato.jvmti-head.src.jar

Propchange: incubator/kato/trunk/org.apache.kato.jvmti/build.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/kato/trunk/org.apache.kato.jvmti/build.xml
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato.jvmti/build.xml?rev=777155&view=auto
==============================================================================
--- incubator/kato/trunk/org.apache.kato.jvmti/build.xml (added)
+++ incubator/kato/trunk/org.apache.kato.jvmti/build.xml Thu May 21 15:36:28 2009
@@ -0,0 +1,148 @@
+<?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 API  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"  />
+	</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}" />
+			</classpath>
+		</javac>	
+		<javac srcdir="${testsrc}" debug="on" destdir="${bin}" source="${srclevel}" target="${srclevel}">
+			<classpath>
+				<path location="${kato.api.jar}" />
+				<path location="${junit.jar}" />
+			</classpath>
+
+		</javac>
+		<copy todir="${bin}/META-INF" file="META-INF/MANIFEST.MF">
+			<filterset>
+				<filter token="TITLE" value="Apache Kato JVMTI ${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="${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/org.apache.kato.jvmti/build.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain