craigmcc 2002/11/22 18:12:02 Modified: scaffold build.xml scaffold/src/java/org/apache/commons/scaffold/sql CommandStore.java Added: scaffold .cvsignore build.properties.sample scaffold/src/conf MANIFEST.MF Log: With Ted's permission, remodel the build.xml file to conform to the conventions of non-Mavenized commons projects. Explicitly declare dependencies (with replaceable parameters) in "build.xml" with sample definitions in "build.properties.sample". Add a manifest file to the generated JAR file. Fix a mis-named package declaration in CommandStore. There are still a bunch of warnings from Javadoc, but those can be dealt with separately. Revision Changes Path 1.6 +134 -88 jakarta-commons-sandbox/scaffold/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/scaffold/build.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- build.xml 21 Nov 2002 02:08:54 -0000 1.5 +++ build.xml 23 Nov 2002 02:12:02 -0000 1.6 @@ -1,127 +1,173 @@ <!-- @author Ted Husted +@author Craig McClanahan @version $Revision$ $Date$ --> -<project name="scaffold" default="compile.lib"> +<project name="scaffold" default="compile"> + + + <!-- ========== Initialize User Preferences =========================== --> + <!-- See "build.properties.sample" for the preferences you can set --> + + <property file="build.properties"/> <!-- Component local --> + <property file="../build.properties"/> <!-- Commons local --> + <property file="${user.home}/build.properties"/> <!-- User local --> + + + <!-- ========== External Dependencies ================================= --> + <!-- These defaults may be overridden by user preferences from above --> + + <property name="commons.home" value="../../jakarta-commons"/> + <property name="commons-beanutils.jar" value="${commons.home}/beanutils/dist/commons-beanutils.jar"/> + <property name="commons-digester.jar" value="${commons.home}/digester/dist/commons-digester.jar"/> + + <property name="jdbc20ext.jar" value="/classes/jdbc20ext.jar"/> + + <property name="lucene.home" value="/usr/local/lucene-1.2"/> + <property name="lucene.jar" value="${lucene.home}/lucene-1.2.jar"/> + + <property name="mockobjects.home" value="/usr/local/mockobjects-0.07"/> + <property name="mockobjects-core.jar" value="${mockobjects.home}/mockobjects-0.07-core.jar"/> + <property name="mockobjects-j2ee.jar" value="${mockobjects.home}/mockobjects-0.07-j1.4-j2ee1.3.jar"/> + + <property name="poolman.home" value="/usr/local/poolman-2.0.4"/> + <property name="poolman.jar" value="${poolman.home}/lib/poolman.jar"/> + + <property name="servlet.jar" value="/classes/servlet.jar"/> + + + <!-- ========== Local System Paths ==================================== --> + + <property name="build.home" value="target"/> + <property name="conf.home" value="src/conf"/> + <property name="dist.home" value="dist"/> + <property name="source.home" value="src/java"/> + + + <!-- ========== Java Compilation Defaults ============================= --> + <!-- These defaults may be overridden by user preferences from above --> + + <property name="build.compiler" value="modern"/> + <property name="compile.debug" value="true"/> + <property name="compile.deprecation" value="false"/> + <property name="compile.optimize" value="true"/> + + <path id="compile.classpath"> + <pathelement location="${build.home}/classes"/> + <pathelement location="${commons-beanutils.jar}"/> + <pathelement location="${commons-digester.jar}"/> + <pathelement location="${jdbc20ext.jar}"/> + <pathelement location="${lucene.jar}"/> + <pathelement location="${mockobjects-core.jar}"/> + <pathelement location="${mockobjects-j2ee.jar}"/> + <pathelement location="${poolman.jar}"/> + <pathelement location="${servlet.jar}"/> + </path> + + + <!-- ========== Project Settings ====================================== --> + + <property name="project.title" value="scaffold"/> + <property name="project.version" value="0.7"/> + <property name="project.distname" value="commons-scaffold"/> - <!-- Change this to compile against a different version --> - <property name="compile.classpath" value="compile.classpath"/> - <property name="compile.debug" value="on"/> - - <!-- Local system paths --> - <property name="distpath.project" value="/projects/lib"/> - <property name="distpath.javasoft" value="/javasoft/lib"/> - <property name="distpath.jakarta" value="/jakarta/lib"/> - - <!-- Project settings --> - <property name="project.title" value="scaffold"/> - <property name="project.version" value="0.7"/> - <property name="project.distname" value="commons-scaffold"/> - - <!-- Standard Javasoft jars --> - <property name="servlet.jar" value="${distpath.javasoft}/servlet.jar"/> - <property name="jdbc20ext.jar" value="${distpath.javasoft}/jdbc2_0-stdext.jar"/> <!-- Path settings --> +<!-- <property name="doc.path" value="./doc/api"/> <property name="doc.src" value="./src/java"/> +--> <!-- Build working classpath --> +<!-- <path id="compile.classpath"> - <pathelement path ="lib/commons-beanutils.jar"/> - <pathelement path ="lib/commons-digester.jar"/> <pathelement path ="lib/lucene_1_2.jar"/> <pathelement path ="lib/poolman_2_0_4.jar"/> <pathelement path ="classes"/> <pathelement path ="${classpath}"/> </path> +--> - <!-- Check timestamp on files --> - <target name="prepare"> - <tstamp/> + +<!-- ========== Executable Targets ======================================== --> + + + <target name="init" + description="Initialize and evaluate conditionals"> + <echo message="---------- ${project.title} ${project.version} ----------"/> + <filter token="name" value="${project.title}"/> + <filter token="version" value="${project.version}"/> + </target> + + + <target name="prepare" depends="init" + description="Prepare build directory"> + <mkdir dir="${build.home}"/> + <mkdir dir="${build.home}/classes"/> + <mkdir dir="${build.home}/classes/META-INF"/> + <mkdir dir="${build.home}/conf"/> + <mkdir dir="${dist.home}"/> + <mkdir dir="${dist.home}/docs"/> + <mkdir dir="${dist.home}/docs/api"/> </target> - <!-- Copy any resource or configuration files --> - <target name="resources"> - <copy todir="classes" includeEmptyDirs="no"> - <fileset dir="src/java"> - <patternset> - <include name="**/*.conf"/> - <include name="**/*.properties"/> - <include name="**/*.xml"/> - </patternset> - </fileset> + + <target name="resources" depends="prepare" + description="Copy static resources"> + <tstamp/> + <copy todir="${build.home}/classes" includeEmptyDirs="false"> + <fileset dir="${source.home}" excludes="**/*.java"/> + </copy> + <copy todir="${build.home}/classes/META-INF" file="LICENSE"/> + <copy todir="${build.home}/conf" filtering="on"> + <fileset dir="${conf.home}" includes="*.MF"/> </copy> </target> - <!-- Normal build of application --> - <target name="compile" depends="prepare,resources"> - <copy - file="../LICENSE" - todir="classes"/> - <!-- Remove "jikes" value if you must use javac instead --> - <property name="build.compiler" value="jikes"/> - <javac srcdir="src" destdir="classes" debug="${compile.debug}"> - <classpath refid="${compile.classpath}"/> + + <target name="compile" depends="resources" + description="Compile library classes"> + <javac srcdir="${source.home}" + destdir="${build.home}/classes" + debug="${compile.debug}" + deprecation="${compile.deprecation}" + optimize="${compile.optimize}"> + <classpath refid="compile.classpath"/> </javac> </target> - <!-- Remove classes directory for clean build --> - <target name="clean" - description="Prepare for clean build"> - <delete dir="classes"/> - <mkdir dir="classes"/> - </target> - <!-- Build Javadoc documentation --> - <target name="javadoc" + <target name="javadoc" depends="compile" description="Generate JavaDoc API docs"> - <delete dir="./doc/api"/> - <mkdir dir="./doc/api"/> - <javadoc sourcepath="./src/java" - destdir="./doc/api" - classpath="${servlet.jar}:${jdbc20ext.jar}" - packagenames="org.*" - author="true" - private="true" - version="true" - windowtitle="${project.title} API Documentation" - doctitle="<h1>${project.title} API Documentation (Version ${project.version})</h1>" - bottom="Copyright © 2001-2002 - Apache Software Foundation"> - <classpath refid="${compile.classpath}"/> + <javadoc sourcepath="${source.home}" + destdir="${dist.home}/docs/api" + packagenames="org.apache.commons.*" + author="true" + private="true" + version="true" + windowtitle="${project.title} API Documentation" + doctitle="<h1>${project.title} API Documentation (Version ${project.version})</h1>" + bottom="Copyright © 2001-2002 - Apache Software Foundation"> + <classpath refid="compile.classpath"/> </javadoc> </target> - <!-- Build binary distribution --> - <target name="compile.lib" - depends="compile" - description="Create binary distribution"> - - <mkdir - dir="${distpath.project}"/> - - <jar - jarfile="${distpath.project}/${project.distname}.jar" - basedir="./classes"/> - + <target name="dist" depends="javadoc" + description="Create binary distribution"> + <copy todir="${dist.home}" file="LICENSE"/> + <jar jarfile="${dist.home}/commons-${project.title}.jar" + basedir="${build.home}/classes" + manifest="${build.home}/conf/MANIFEST.MF"/> </target> - <!-- Build full distribution --> - <target name="dist" - depends="compile.lib" - description="Create source distribution"> - - <zip zipfile="${distpath.project}/${project.distname}.zip"> - <zipfileset dir="." prefix="commons-scaffold"/> - </zip> - + <target name="clean" + description="Prepare for clean build"> + <delete dir="${build.home}"/> + <mkdir dir="${dist.home}"/> </target> - - <!-- Build entire project --> - <target name="project" depends="clean,prepare,compile,javadoc,dist"/> </project> 1.1 jakarta-commons-sandbox/scaffold/.cvsignore Index: .cvsignore =================================================================== dist target 1.1 jakarta-commons-sandbox/scaffold/build.properties.sample Index: build.properties.sample =================================================================== # build.properties.sample -- Sample build.properties for "scaffold" # $Id: build.properties.sample,v 1.1 2002/11/23 02:12:02 craigmcc Exp $ # Commons Packages commons.home=../../jakarta-commons commons-beanutils.jar=${commons.home}/beanutils/dist/commons-beanutils.jar commons-digester.jar=${commons.home}/beanutils/dist/commons-digester.jar # JDBC 2.0 Standard Extensions (javax.sql) JAR File jdbc20ext.jar=/classes/jdbc20ext.jar # Lucene (Version 1.2 or later). For more informaiton, see # <http://jakarta.apache.org/lucene/>. lucene.home=/usr/local/lucene-1.2 lucene.jar=${lucene.home}/lucene-1.2.jar # MockObjects (Version 0.07 or later). For more information, see # <http://www.mockobjects.com>. The "mockobjects-core.jar" property # should point at the core JAR file from the MockObjects distribution, # while the "mockobjects-j2ee.jar" property should point at the appropriate # JAR file for the combination of J2SE and J2EE level you are using. The # example below would be for J2EE 1.3 (i.e. Servlet 2.3 and JSP 1.2) running # in conjunction with J2SE 1.4. mockobjects.home=/usr/local/mockobjects-0.07 mockobjects-core.jar=${mockobjects.home}/mockobjects-0.07-core.jar mockobjects-j2ee.jar=${mockobjects.home}/mockobjects-0.07-j1.4-j2ee1.3.jar # PoolMan (version 2.0.4 or later). For more information, see # <http://sourceforge.net/projects/poolman/>. poolman.home=/usr/local/poolman-2.0.4 poolman.jar=${poolman.home}/lib/poolman.jar # Servlet 2.3 / JSP 1.2 API Classes servlet.jar=/classes/servlet.jar 1.1 jakarta-commons-sandbox/scaffold/src/conf/MANIFEST.MF Index: MANIFEST.MF =================================================================== Extension-Name: org.apache.commons.@name@ Specification-Vendor: Apache Software Foundation Specification-Version: 1.0 Implementation-Vendor: Apache Software Foundation Implementation-Version: @version@ 1.3 +4 -3 jakarta-commons-sandbox/scaffold/src/java/org/apache/commons/scaffold/sql/CommandStore.java Index: CommandStore.java =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/scaffold/src/java/org/apache/commons/scaffold/sql/CommandStore.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- CommandStore.java 16 Aug 2002 22:28:24 -0000 1.2 +++ CommandStore.java 23 Nov 2002 02:12:02 -0000 1.3 @@ -1,8 +1,9 @@ -package org.apache.commons.scaffold.util; +package org.apache.commons.scaffold.sql; import java.util.Properties; import org.apache.commons.scaffold.lang.PropertiesException; +import org.apache.commons.scaffold.util.ResourceUtils; /** @@ -77,4 +78,4 @@ } -} \ No newline at end of file +}
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>