Author: mladen.turk(a)jboss.com
Date: 2008-05-28 11:47:29 -0400 (Wed, 28 May 2008)
New Revision: 1631
Added:
sandbox/aloha/build.xml
Log:
Add ant build file
Added: sandbox/aloha/build.xml
===================================================================
--- sandbox/aloha/build.xml (rev 0)
+++ sandbox/aloha/build.xml 2008-05-28 15:47:29 UTC (rev 1631)
@@ -0,0 +1,291 @@
+<?xml version="1.0"?>
+<!-- Build file for ALOHA -->
+<project name="System information gathering hybrid tool Library"
default="compile" basedir=".">
+ <!-- Give user a chance to override without editing this file
+ (and without typing -D each time it compiles it
+ -->
+ <property file="${user.home}/.ant.properties" />
+ <property file="${user.home}/build.properties" />
+ <property file="build.properties" />
+ <property file=".ant.properties" />
+
+ <!-- Initialization properties -->
+ <property name="name" value="Aloha core library"/>
+ <property name="title" value="JBoss Aloha core library"/>
+ <property name="version" value="1.0.0"/>
+ <property name="version.number" value="100"/>
+ <property name="project" value="aloha"/>
+ <property name="build.dir" value="./dist"/>
+ <property name="build.src" value="${build.dir}/src"/>
+ <property name="build.dest" value="${build.dir}/bin"/>
+ <property name="src.dir" value="."/>
+ <property name="final.name"
value="${project}-${version}"/>
+ <property name="dist.root" value="./dist"/>
+ <property name="ant.home" value="."/>
+
+ <property name="debug" value="off"/>
+ <property name="optimize" value="on"/>
+ <property name="deprecation" value="on"/>
+
+ <property name="docs.src" value="./xdocs"/>
+ <property name="docs.dest" value="${dist.root}/doc"/>
+ <property name="docs.dest.print"
value="${dist.root}/doc/printable"/>
+ <property name="test.runner"
value="junit.textui.TestRunner"/>
+ <property name="test.entry"
value="org.jboss.aloha.TestAll"/>
+ <property name="test.dir" value="${build.dest}/test"/>
+ <property name="examples.dir"
value="${build.dest}/examples"/>
+ <property name="example" value="Foo"/>
+ <property name="junit.home" value="./lib"/>
+ <property name="junit.jar"
value="${junit.home}/junit-4.3.1.jar"/>
+ <property name="commons-httpclient.home" value="./lib"/>
+ <property name="commons-httpclient.jar"
value="${commons-httpclient.home}/commons-httpclient-3.1.jar"/>
+ <property name="commons-logging.home" value="./lib"/>
+ <property name="commons-logging.jar"
value="${commons-logging.home}/commons-logging-1.1.1.jar"/>
+ <property name="commons-codec.home" value="./lib"/>
+ <property name="commons-codec.jar"
value="${commons-codec.home}/commons-codec-1.3.jar"/>
+
+ <property name="compile.source" value="5"/>
+ <property name="compile.target" value="5"/>
+
+ <!-- The base directory for component sources -->
+ <property name="source.home" value="java"/>
+
+ <!-- Build classpath -->
+ <path id="classpath">
+ <pathelement location="${build.dest}/java"/>
+ <pathelement location="${commons-httpclient.jar}"/>
+ </path>
+
+ <!-- Test classpath -->
+ <path id="test.classpath">
+ <pathelement location="${build.dest}/java"/>
+ <pathelement location="${build.dest}/test"/>
+ <pathelement location="${junit.jar}"/>
+ <pathelement location="${commons-httpclient.jar}"/>
+ <pathelement location="${commons-logging.jar}"/>
+ </path>
+
+ <!-- Examples classpath -->
+ <path id="examples.classpath">
+ <pathelement location="${build.dest}/java"/>
+ <pathelement location="${build.dest}/examples"/>
+ <pathelement location="${commons-httpclient.jar}"/>
+ <pathelement location="${commons-codec.jar}"/>
+ <pathelement location="${commons-logging.jar}"/>
+ </path>
+
+ <!-- =================================================================== -->
+ <!-- prints the environment -->
+ <!-- =================================================================== -->
+ <target name="env">
+ <echo message="java.home = ${java.home}"/>
+ <echo message="user.home = ${user.home}"/>
+ <!--
+ <echo message="java.class.path = ${java.class.path}"/>
+ -->
+ <echo message=""/>
+ </target>
+
+ <target name="prepare" depends="env">
+ <mkdir dir="${build.dir}"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Creates the API documentation -->
+ <!-- =================================================================== -->
+ <target name="javadocs" description="Java documentation">
+ <mkdir dir="${docs.dest}"/>
+ <mkdir dir="${docs.dest}/api"/>
+ <javadoc sourcepath="${build.src}/java"
+ destdir="${docs.dest}/api"
+ author="true"
+ version="true"
+ overview="${src.dir}/java/overview.html"
+ packagenames="org.jboss.aloha.*"
+ windowtitle="${title} (Version ${version})"
+ doctitle="<h2>${title}</h2>"
+ bottom="Copyright 2008 Red Hat, Inc.<!--
+JBoss, the OpenSource J2EE webOS
+
+Distributable under LGPL license.
+See terms of license at gnu.org.-->">
+ <classpath refid="classpath"/>
+ </javadoc>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Cleans up the build directory -->
+ <!-- =================================================================== -->
+ <target name="clean">
+ <delete dir="${build.dir}"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Compiles the source directory -->
+ <!-- =================================================================== -->
+ <target name="compile" depends="prepare">
+ <mkdir dir="${build.dest}"/>
+ <mkdir dir="${build.dest}/java"/>
+ <mkdir dir="${build.src}"/>
+ <mkdir dir="${build.src}/java"/>
+ <tstamp>
+ <format property="TODAY" pattern="MMM d yyyy"
locale="en"/>
+ <format property="TSTAMP" pattern="hh:mm:ss"/>
+ </tstamp>
+ <!-- Copy static resource files -->
+ <filter token="VERSION" value="${version}"/>
+ <filter token="VERSION_NUMBER"
value="${version.number}"/>
+ <filter token="VERSION_BUILT" value="${TODAY}
${TSTAMP}"/>
+ <copy todir="${build.src}/java" filtering="yes">
+ <fileset dir="${src.dir}/java">
+ <include name="**/*.java"/>
+ <include name="**/*.xml"/>
+ <include name="**/*.properties"/>
+ </fileset>
+ </copy>
+
+ <javac srcdir="${build.src}/java"
+ destdir="${build.dest}/java"
+ debug="${debug}"
+ deprecation="${deprecation}"
+ source="${compile.source}"
+ target="${compile.target}"
+ failonerror="false"
+ optimize="${optimize}">
+ <classpath refid="classpath"/>
+ <compilerarg line="-Xmaxerrs 1000"/>
+ </javac>
+ <copy todir="${build.dest}/java" filtering="yes">
+ <fileset dir="${build.src}/java">
+ <include name="**/*.xml"/>
+ <include name="**/*.properties"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="compile-only"
+ description="Compile shareable components">
+
+ <javac srcdir="${source.home}"
+ destdir="${build.home}/java"
+ debug="${compile.debug}"
+ source="${compile.source}"
+ target="${compile.target}"
+ deprecation="${compile.deprecation}"
+ optimize="${compile.optimize}">
+ <classpath refid="classpath"/>
+ </javac>
+ <copy todir="${build.home}/java" filtering="on">
+ <fileset dir="${source.home}" excludes="**/*.java"/>
+ </copy>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Compiles the examples directory -->
+ <!-- =================================================================== -->
+ <target name="examples" depends="compile">
+ <mkdir dir="${build.dest}"/>
+ <mkdir dir="${build.dest}/examples"/>
+ <mkdir dir="${build.src}"/>
+ <mkdir dir="${build.src}/examples"/>
+ <tstamp>
+ <format property="TODAY" pattern="MMM d yyyy"
locale="en"/>
+ <format property="TSTAMP" pattern="hh:mm:ss"/>
+ </tstamp>
+ <!-- Copy static resource files -->
+ <filter token="VERSION" value="${version}"/>
+ <filter token="VERSION_NUMBER"
value="${version.number}"/>
+ <filter token="VERSION_BUILT" value="${TODAY}
${TSTAMP}"/>
+ <copy todir="${build.src}/examples" filtering="yes">
+ <fileset dir="${src.dir}/examples">
+ <include name="**/*.java"/>
+ <include name="**/*.xml"/>
+ <include name="**/*.properties"/>
+ </fileset>
+ </copy>
+
+ <javac srcdir="${build.src}/examples"
+ destdir="${build.dest}/examples"
+ debug="${debug}"
+ source="${compile.source}"
+ target="${compile.target}"
+ deprecation="${deprecation}"
+ optimize="${optimize}">
+ <classpath refid="examples.classpath"/>
+ </javac>
+ <copy todir="${build.dest}/examples" filtering="yes">
+ <fileset dir="${build.src}/examples">
+ <include name="**/*.xml"/>
+ <include name="**/*.properties"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Make the library jar -->
+ <!-- ================================================================== -->
+ <target name="jar" depends="compile"
+ description="Generates the Jar file">
+ <jar
+ destfile="${build.dir}/${final.name}.jar"
+ basedir="${build.dir}/bin/java"
+ excludes="**/*.java">
+ <manifest>
+ <section name="org/jboss/aloha">
+ <attribute name="Specification-Title" value="JBoss
Aloha library"/>
+ <attribute name="Specification-Version"
value="${version}"/>
+ <attribute name="Specification-Vendor" value="Red
Hat, Inc."/>
+ <attribute name="Implementation-Title"
value="org.jboss.aloha"/>
+ <attribute name="Implementation-Vendor" value="Red
Hat Middleware, LLC"/>
+ <attribute name="Implementation-Vendor-Id"
value="org.jboss"/>
+ <attribute name="Implementation-Version"
value="${version} (build ${DSTAMP} ${TSTAMP})"/>
+ </section>
+ </manifest>
+ </jar>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Compiles the test directory -->
+ <!-- =================================================================== -->
+ <target name="tests" depends="compile">
+ <mkdir dir="${build.dest}/test"/>
+ <mkdir dir="${build.src}/test"/>
+ <copy todir="${build.src}/test" filtering="yes">
+ <fileset dir="${src.dir}/test">
+ <include name="**/*.java"/>
+ <include name="**/*.xml"/>
+ <include name="**/*.properties"/>
+ </fileset>
+ </copy>
+ <javac srcdir="${build.src}/test"
+ destdir="${build.dest}/test"
+ debug="${debug}"
+ source="${compile.source}"
+ target="${compile.target}"
+ deprecation="${deprecation}"
+ optimize="${optimize}">
+ <classpath refid="test.classpath"/>
+ </javac>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Junit tests -->
+ <!-- =================================================================== -->
+ <target name="test" depends="tests">
+ <echo message="Running ALOHA package tests ..."/>
+ <java dir="${test.dir}" classname="${test.entry}"
fork="yes" failonerror="${test.failonerror}">
+ <classpath refid="test.classpath"/>
+ </java>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Run Example -->
+ <!-- =================================================================== -->
+ <target name="run" depends="examples">
+ <echo message="Running ALOHA package example ${example} ..."/>
+ <java dir="${examples.dir}"
classname="org.jboss.aloha.${example}" fork="yes"
failonerror="${test.failonerror}">
+ <classpath refid="examples.classpath"/>
+ </java>
+ </target>
+
+</project>
Property changes on: sandbox/aloha/build.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Show replies by date