You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by jo...@apache.org on 2001/08/12 22:51:59 UTC
cvs commit: jakarta-turbine-flux build.properties build.xml
jon 01/08/12 13:51:59
Modified: . build.xml
Added: . build.properties
Log:
fix the build system so that the dependency tree is known
Revision Changes Path
1.3 +161 -11 jakarta-turbine-flux/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-turbine-flux/build.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- build.xml 2001/08/01 19:47:32 1.2
+++ build.xml 2001/08/12 20:51:59 1.3
@@ -3,10 +3,12 @@
<!-- Build file for application -->
<project name="admin" 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" />
+ <!-- Allow any user specific values to override the defaults -->
+ <property file="${user.home}/build.properties" />
+ <!-- Set default values for the build -->
+ <property file="build.properties" />
+
<property name="name" value="flux"/>
<property name="version" value="0.1"/>
<property name="project" value="flux"/>
@@ -21,25 +23,161 @@
<property name="ant.home" value="."/>
<property name="debug" value="on"/>
<property name="optimize" value="off"/>
- <property name="deprecation" value="on"/>
+ <property name="deprecation" value="off"/>
<property name="project.home" value="project"/>
<property name="project.props" value="${project.home}/${project}.properties"/>
<property file="${project.props}"/>
<path id="classpath">
- <fileset dir="../jakarta-turbine/bin">
- <include name="**/*.jar"/>
- </fileset>
- <fileset dir="../jakarta-turbine/lib">
- <include name="**/*.jar"/>
- </fileset>
+ <pathelement location="${servlet.jar}"/>
+ <pathelement location="${turbine.jar}"/>
+ <pathelement location="${fulcrum.jar}"/>
+ <pathelement location="${velocity.jar}"/>
+ <pathelement location="${torque.jar}"/>
+ <pathelement location="${commons-util.jar}"/>
+ <pathelement location="${jaf.jar}"/>
</path>
<!-- ================================================================== -->
+ <!-- Prints useful build environment values -->
+ <!-- ================================================================== -->
+
+ <target name="env" depends="check_available">
+ <echo message="java.home = ${java.home}"/>
+ <echo message="user.home = ${user.home}"/>
+ <echo message="lib.repo = ${lib.repo}"/>
+
+ <echo message="servlet.jar = ${servlet.jar}"/>
+ <echo message="turbine.jar = ${turbine.jar}"/>
+ <echo message="fulcrum.jar = ${fulcrum.jar}"/>
+ <echo message="velocity.jar = ${velocity.jar}"/>
+ <echo message="torque.jar = ${torque.jar}"/>
+ <echo message="commons-util.jar = ${commons-util.jar}"/>
+ <echo message="jaf.jar = ${jaf.jar}"/>
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Check to see what optional dependencies are available -->
+ <!-- ================================================================== -->
+
+ <target name="check_available">
+ <available
+ classname="javax.servlet.http.HttpServletRequest"
+ property="servlet.present"
+ classpathref="classpath"
+ />
+
+ <available
+ classname="org.apache.turbine.Turbine"
+ property="turbine.present"
+ classpathref="classpath"
+ />
+
+ <available
+ classname="org.apache.fulcrum.BaseService"
+ property="fulcrum.present"
+ classpathref="classpath"
+ />
+
+ <available
+ classname="org.apache.velocity.runtime.Runtime"
+ property="velocity.present"
+ classpathref="classpath"
+ />
+
+ <available
+ classname="org.apache.torque.Torque"
+ property="torque.present"
+ classpathref="classpath"
+ />
+
+ <available
+ classname="org.apache.commons.util.exception.NestableException"
+ property="commons-util.present"
+ classpathref="classpath"
+ />
+
+ <available
+ classname="javax.activation.DataSource"
+ property="jaf.present"
+ classpathref="classpath"
+ />
+ </target>
+
+ <target name="check.servlet" unless="servlet.present">
+ <antcall target="property-warning">
+ <param name="name" value="servlet.jar"/>
+ <param name="value" value="${servlet.jar}"/>
+ </antcall>
+ </target>
+
+ <target name="check.turbine" unless="turbine.present">
+ <antcall target="property-warning">
+ <param name="name" value="turbine.jar"/>
+ <param name="value" value="${turbine.jar}"/>
+ </antcall>
+ </target>
+
+ <target name="check.fulcrum" unless="fulcrum.present">
+ <antcall target="property-warning">
+ <param name="name" value="fulcrum.jar"/>
+ <param name="value" value="${fulcrum.jar}"/>
+ </antcall>
+ </target>
+
+ <target name="check.velocity" unless="velocity.present">
+ <antcall target="property-warning">
+ <param name="name" value="velocity.jar"/>
+ <param name="value" value="${velocity.jar}"/>
+ </antcall>
+ </target>
+
+ <target name="check.torque" unless="torque.present">
+ <antcall target="property-warning">
+ <param name="name" value="torque.jar"/>
+ <param name="value" value="${torque.jar}"/>
+ </antcall>
+ </target>
+
+ <target name="check.commons-util" unless="commons-util.present">
+ <antcall target="property-warning">
+ <param name="name" value="commons-util.jar"/>
+ <param name="value" value="${commons-util.jar}"/>
+ </antcall>
+ </target>
+
+ <target name="check.jaf" unless="jaf.present">
+ <antcall target="property-warning">
+ <param name="name" value="jaf.jar"/>
+ <param name="value" value="${jaf.jar}"/>
+ </antcall>
+ </target>
+
+ <target name="property-warning">
+ <echo>
+ +----------------------------------------------------------------+
+ + F A I L E D R E Q U I R E M E N T |
+ +----------------------------------------------------------------+
+ | You must define the following property in order |
+ | to build Torque: |
+ | |
+ | ${name} = ${value}
+ | |
+ | You can set this property in the provided build.properties |
+ | file, or you may set this property in your |
+ | ${user.home}/build.properties file.
+ +----------------------------------------------------------------+
+ </echo>
+ <fail message="Failed Requirement"/>
+ </target>
+
+ <!-- ================================================================== -->
<!-- Prepares the build directory -->
<!-- ================================================================== -->
- <target name="prepare">
+ <target name="prepare" depends="env,check.servlet,check.turbine,
+ check.fulcrum,check.velocity,check.torque,
+ check.commons-util,check.jaf">
<mkdir dir="${build.dest}"/>
</target>
@@ -72,6 +210,18 @@
<exclude name="**/java/**"/>
</fileset>
</jar>
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- I N S T A L L J A R -->
+ <!-- ================================================================== -->
+ <target name="install-jar" depends="jar"
+ description="==> Installs .jar file in ${lib.repo}">
+ <copy todir="${lib.repo}" filtering="no">
+ <fileset dir="${build.dir}">
+ <include name="${project}.jar"/>
+ </fileset>
+ </copy>
</target>
<!-- ================================================================== -->
1.1 jakarta-turbine-flux/build.properties
Index: build.properties
===================================================================
servlet.jar = ${lib.repo}/servlet.jar
turbine.jar = ${lib.repo}/turbine-3.0-dev.jar
fulcrum.jar = ${lib.repo}/fulcrum-1.0.jar
velocity.jar = ${lib.repo}/velocity-1.2-dev.jar
torque.jar = ${lib.repo}/torque-1.0.jar
commons-util.jar = ${lib.repo}/commons-util-0.1-dev.jar
jaf.jar = ${lib.repo}/activation-1.0.1.jar
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org