sanders 01/04/16 14:35:11
Added: digester PROPOSAL.html STATUS.html build.properties.sample
build.xml
digester/conf MANIFEST.MF
Log:
Copoed build.xml and other files from beanutils for consistency
Revision Changes Path
1.1 jakarta-commons-sandbox/digester/PROPOSAL.html
Index: PROPOSAL.html
===================================================================
<html>
<head>
<title>Proposal for BeanUtils Package</title>
</head>
<body bgcolor="white">
<div align="center">
<h1>Proposal for <em>BeanUtils</em> Package</h1>
</div>
<h3>(0) Rationale</h3>
<p>Most Java developers are used to creating Java classes that conform to the
JavaBeans naming patterns for property getters and setters. It is natural to
then access these methods directly, using calls to the corresponding
<code>getXxx</code> and <code>setXxx</code> methods. However, there are some
occasions where dynamic access to Java object properties (without compiled-in
knowledge of the property getter and setter methods to be called) is needed.
Example use cases include:</p>
<ul>
<li>Building scripting languages that interact with the Java object model
(such as the Bean Scripting Framework).</li>
<li>Building template language processors for web presentation and similar
uses (such as JSP or Velocity).</li>
<li>Building custom tag libraries for JSP and XSP environments (such as Jakarta
Taglibs, Struts, Cocoon).</li>
<li>Consuming XML-based configuration resources (such as Ant build scripts, web
application deployment descriptors, Tomcat's <code>server.xml</code>
file).</li>
</ul>
<p>The Java language provides <em>Reflection</em> and <em>Introspection</em>
APIs (see the <code>java.lang.reflect</code> and <code>java.beans</code>
packages in the JDK Javadocs). However, these APIs can be quite complex to
understand and utilize. The proposed <em>BeanUtils</em> component provides
easy-to-use wrappers around these capabilities.</p>
<h3>(1) Scope of the Package</h3>
<p>This proposal is to create a package of Java utility methods for accessing
and modifying the properties of arbitrary JavaBeans. No dependencies outside
of the JDK are required, so the use of this package is very lightweight.</p>
<p>In addition to wrapping the reflection and introspection APIs of the
standard JDK, <em>BeanUtils</em> components shall support a syntax for directly
accessing <strong>nested</strong> and <strong>indexed</strong> properties, in a
manner that will be familar to users of scripting languages like JavaScript.
For example, the following property accessor expressions are supported:</p>
<ul>
<li><strong>customer</strong> - Equivalent to <code>getCustomer()</code>.</li>
<li><strong>customer.address</strong> - Equivalent to
<code>getCustomer().getAddress()</code>.</li>
<li><strong>customer.address[2].street</strong> - Equivalent to
<code>getCustomer().getAddress(2).getStreet()</code> (access to indexed
properties also works if the underlying property is an array rather than
providing indexed getter and setter methods).</li>
</ul>
<h3>(1.5) Interaction With Other Packages</h3>
<p><em>BeanUtils</em> relies only on standard JDK 1.2 (or later) APIs for
production deployment. It utilizes the JUnit unit testing framework for
developing and executing unit tests, but this is of interest only to
developers of the component. BeanUtils will also be a dependency for
several future proposed components for the Jakarta Commons subproject.</li>
<p>No external configuration files are utilized.</p>
<h3>(2) Initial Source of the Package</h3>
<p>The three original Java classes (<code>BeanUtils</code>,
<code>ConvertUtils</code>, and <code>PropertyUtils</code>) are an integral
part of the <a href="http://jakarta.apache.org/struts">Struts Framework</a>.
However, they have very few dependencies on other aspects of Struts, and
those dependencies have been removed in the proposed code base.
Once accepted and released as a Jakarta Commons component, Struts will
be modified to use the Commons version of these classes, and its internal
versions will be deprecated.</p>
<p>The proposed package name for the new component is
<code>org.apache.commons.beanutils</code>.</p>
<h3>(3) Required Jakarta-Commons Resources</h3>
<ul>
<li>CVS Repository - New directory <code>beanutils</code> in the
<code>jakarta-commons</code> CVS repository. All initial committers
are already committers on <code>jakarta-commons</code>, so no
additional user setups are required.</li>
<li>Mailing List - Discussions will take place on the general
<em>[EMAIL PROTECTED]</em> mailing list. To help
list subscribers identify messages of interest, it is suggested that
the message subject of messages about this component be prefixed with
[BeanUtils].</li>
<li>Bugzilla - New component "BeanUtils" under the "Commons" product
category, with appropriate version identifiers as needed.</li>
<li>Jyve FAQ - New category "commons-beanutils" (when available).
</ul>
<h3>(4) Initial Committers</h3>
<p>The initial committers on the BeanUtils component shall be Craig
McClanahan and Geir Magnusson Jr.</p>
</body>
</html>
1.1 jakarta-commons-sandbox/digester/STATUS.html
Index: STATUS.html
===================================================================
<html>
<head>
<title>Status File for Jakarta Commons "BeanUtils" Component</title>
<head>
<body bgcolor="white">
<div align="center">
<h1>The Jakarta Commons <em>BeanUtils</em> Component</h1>
$Id: STATUS.html,v 1.1 2001/04/16 21:35:10 sanders Exp $<br>
<a href="#Introduction">[Introduction]</a>
<a href="#Dependencies">[Dependencies]</a>
<a href="#Release Info">[Release Info]</a>
<a href="#Committers">[Committers]</a>
<a href="#Action Items">[Action Items]</a>
<br><br>
</div>
<a name="Introduction"></a>
<h3>1. INTRODUCTION</h3>
<p>The <em>BeanUtils</em> Component contains a set of Java classes that provide
static utility methods useful in manipulating Java classes that conform to the
JavaBeans Specification naming patterns for bean properties in a dynamic
fashion. The following classes are included:</p>
<ul>
<li><strong>BeanUtils</strong> - Higher level getters and setters that deal
with automatic conversion of String-represented property values to the
corresponding data types of the underlying property setters (and vice
versa), using the capabilities of the ConvertUtils and PropertyUtils
classes.</li>
<li><strong>ConvertUtils</strong> - Utility methods to convert String arguments
to native Java types (and vice versa)</li>.
<li><strong>PropertyUtils</strong> - Low level getters and setters for bean
properties that perform no type conversions at all.</li>
</ul>
<p>An innovative and unique feature of this component is the syntax for
accessing nested and indexed bean properties. See the Javadocs (TODO: link
to online docs) on PropertyUtils for more information about this feature.</p>
<a name="Dependencies"></a>
<h3>2. DEPENDENCIES</h3>
<p>The <em>BeanUtils</em> component is dependent upon the following external
components for development and use:</p>
<ul>
<li><a href="http://java.sun.com/j2se">Java Development Kit</a>
(Version 1.2 or later)</li>
<li><a href="http://www.junit.org">JUnit Testing Framework</a>
(Version 3.2 or later) - for unit tests only, not required
for deployment</li>
</ul>
<a name="Release Info"></a>
<h3>3. RELEASE INFO</h3>
<p>Current Release: <strong>Unreleased, CVS Repository Only</strong></p>
<p>Planned Next Release: Version 1.0, by April 15, 2001. See the
<a href="#Action Items">Action Items</a> list for tasks that need to be
completed prior to this release.</p>
<a name="Committers"></a>
<h3>4. COMMITTERS</h3>
<p>The following individuals are the primary developers and maintainers of this
component. Developers who plan to use <em>BeanUtils</em> in their own
projects are encouraged to collaborate on the future development of this
component to ensure that it continues to meet a variety of needs.</p>
<ul>
<li><a href="mailto:[EMAIL PROTECTED]">Craig McClanahan</a>
<li><a href="mailto:[EMAIL PROTECTED]">Geir Magnusson Jr.</a>
</ul>
<a name="Action Items"></a>
<h3>5. ACTION ITEMS</h3>
<p>The following action items need to be completed prior to a Version 1.0
release of this component:</p>
<table border="1">
<tr>
<th width="80%">Action Item</th>
<th width="20%">Volunteer</th>
</tr>
<tr>
<td><strong>Unit Tests for PropertyUtils</strong>. Complete the JUnit
unit tests for the <code>PropertyUtils</code> class.</td>
<td align="center">Craig</td>
</tr>
<tr>
<td><strong>Unit Tests for ConvertUtils</strong>. Create and run
the JUnit tests for the <code>ConvertUtils</code> class.</td>
<td align="center">Geir (volunteer if you want it :)</td>
</tr>
<tr>
<td><strong>Unit Tests for BeanUtils</strong>. Create and run
the JUnit tests for the <code>BeanUtils</code> class.</td>
<td align="center">Geir</td>
</tr>
<tr>
<td><strong>Install / Use Documentation</strong>. Create simple
installation and User's Guide documentation for this component.</td>
<td align="center">Craig</td>
</tr>
</table>
</body>
</html>
1.1 jakarta-commons-sandbox/digester/build.properties.sample
Index: build.properties.sample
===================================================================
# junit.jar - JUnit 3.2+ Classpath
junit.jar=/java/junit/junit.jar
1.1 jakarta-commons-sandbox/digester/build.xml
Index: build.xml
===================================================================
<project name="Digester" default="compile" basedir=".">
<!--
"Digester" component of the Jakarta Commons Subproject
$Id: build.xml,v 1.1 2001/04/16 21:35:10 sanders Exp $
-->
<!-- ========== Initialize Properties ===================================== -->
<property file="build.properties"/> <!-- Component local -->
<property file="../build.properties"/> <!-- Commons local -->
<property file="${user.home}/.build.properties"/> <!-- User local -->
<!-- ========== External Dependencies ===================================== -->
<!-- The directory containing your binary distribution of JUnit,
version 3.5 or later -->
<property name="junit.home" value="/usr/local/junit3.5"/>
<!-- ========== Derived Values ============================================ -->
<!-- The pathname of the "junit.jar" JAR file -->
<property name="junit.jar" value="${junit.home}/junit.jar"/>
<!-- ========== Component Declarations ==================================== -->
<!-- The name of this component -->
<property name="component.name" value="digester"/>
<!-- The title of this component -->
<property name="component.title" value="XML to Java object configuration"/>
<!-- The current version number of this component -->
<property name="component.version" value="0.1-dev"/>
<!-- The base directory for compilation targets -->
<property name="build.home" value="target"/>
<!-- The base directory for component configuration files -->
<property name="conf.home" value="conf"/>
<!-- The base directory for distribution targets -->
<property name="dist.home" value="build"/>
<!-- The base directory for component sources -->
<property name="source.home" value="src/java"/>
<!-- The base directory for unit test sources -->
<property name="test.home" value="src/test"/>
<!-- ========== Compiler Defaults ========================================= -->
<!-- Should Java compilations set the 'debug' compiler option? -->
<property name="compile.debug" value="true"/>
<!-- Should Java compilations set the 'deprecation' compiler option? -->
<property name="compile.deprecation" value="true"/>
<!-- Should Java compilations set the 'optimize' compiler option? -->
<property name="compile.optimize" value="true"/>
<!-- Construct compile classpath -->
<path id="compile.classpath">
<pathelement location="${build.home}/classes"/>
</path>
<!-- ========== Test Execution Defaults =================================== -->
<!-- Construct unit test classpath -->
<path id="test.classpath">
<pathelement location="${build.home}/classes"/>
<pathelement location="${build.home}/tests"/>
<pathelement location="${junit.jar}"/>
</path>
<!-- Should all tests fail if one does? -->
<property name="test.failonerror" value="true"/>
<!-- The test runner to execute -->
<property name="test.runner" value="junit.textui.TestRunner"/>
<!-- ========== Executable Targets ======================================== -->
<target name="init"
description="Initialize and evaluate conditionals">
<echo message="-------- ${component.name} ${component.version} --------"/>
<filter token="name" value="${component.name}"/>
<filter token="version" value="${component.version}"/>
</target>
<target name="prepare" depends="init"
description="Prepare build directory">
<mkdir dir="${build.home}"/>
<mkdir dir="${build.home}/classes"/>
<mkdir dir="${build.home}/conf"/>
<mkdir dir="${build.home}/javadoc"/>
<mkdir dir="${build.home}/tests"/>
</target>
<target name="static" depends="prepare"
description="Copy static files to build directory">
<tstamp/>
<copy todir="${build.home}/conf" filtering="on">
<fileset dir="${conf.home}" includes="*.MF"/>
</copy>
</target>
<target name="compile" depends="static"
description="Compile shareable components">
<javac srcdir="${source.home}"
destdir="${build.home}/classes"
debug="${compile.debug}"
deprecation="${compile.deprecation}"
optimize="${compile.optimize}">
<classpath refid="compile.classpath"/>
</javac>
<copy todir="${build.home}/classes" filtering="on">
<fileset dir="${source.home}" excludes="**/*.java"/>
</copy>
</target>
<target name="compile.tests" depends="compile"
description="Compile unit test cases">
<javac srcdir="${test.home}"
destdir="${build.home}/tests"
debug="${compile.debug}"
deprecation="${compile.deprecation}"
optimize="${compile.optimize}">
<classpath refid="test.classpath"/>
</javac>
<copy todir="${build.home}/tests" filtering="on">
<fileset dir="${test.home}" excludes="**/*.java"/>
</copy>
</target>
<target name="clean"
description="Clean build and distribution directories">
<delete dir="${build.home}"/>
<delete dir="${dist.home}"/>
</target>
<target name="all" depends="clean,compile"
description="Clean and compile all components"/>
<target name="javadoc" depends="compile"
description="Create component Javadoc documentation">
<mkdir dir="${dist.home}"/>
<mkdir dir="${dist.home}/javadoc"/>
<javadoc sourcepath="${source.home}"
destdir="${dist.home}/javadoc"
packagenames="org.apache.commons.*"
author="true"
private="true"
version="true"
doctitle="<h1>${component.title}</h1>"
windowtitle="${component.title} (Version ${component.version})"
bottom="Copyright (c) 2001 - Apache Software Foundation"/>
</target>
<target name="dist" depends="compile,javadoc"
description="Create binary distribution">
<!-- TODO: top level files like LICENSE and README -->
<mkdir dir="${dist.home}"/>
<jar jarfile="${dist.home}/commons-${component.name}.jar"
basedir="${build.home}/classes"
manifest="${build.home}/conf/MANIFEST.MF"/>
<mkdir dir="${dist.home}/src"/>
<copy todir="${dist.home}/src" filtering="on">
<fileset dir="${source.home}"/>
</copy>
</target>
<!-- ========== Unit Test Targets ========================================= -->
<target name="test" depends="compile.tests,
test.property,
test.bean
"
description="Run all unit test cases">
</target>
<target name="test.property">
<echo message="Running PropertyUtils tests ..."/>
<java classname="${test.runner}" fork="yes"
failonerror="${test.failonerror}">
<arg value="org.apache.commons.beanutils.PropertyUtilsTestCase"/>
<classpath refid="test.classpath"/>
</java>
</target>
<target name="test.bean">
<echo message="Running BeanUtils tests ..."/>
<java classname="${test.runner}" fork="yes"
failonerror="${test.failonerror}">
<arg value="org.apache.commons.beanutils.BeanUtilsTestCase"/>
<classpath refid="test.classpath"/>
</java>
</target>
</project>
1.1 jakarta-commons-sandbox/digester/conf/MANIFEST.MF
Index: MANIFEST.MF
===================================================================
Extension-Name: @name@
Specification-Vendor: Apache Software Foundation
Specification-Version: 1.0
Implementation-Vendor: Apache Software Foundation
Implementation-Version: @version@