notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
r1712 - in trunk/tutorials: . components tooling tooling/versioning tooling/versioning/decimal tooling/versioning/decimal/api tooling/versioning/decimal/api/src tooling/versioning/decimal/api/src/main tooling/versioning/decimal/api/src/main/org tooling/versioning/decimal/api/src/main/org/acme tooling/versioning/decimal/impl tooling/versioning/decimal/impl/src tooling/versioning/decimal/impl/src/main tooling/versioning/decimal/impl/src/main/org tooling/versioning/decimal/impl/src/main/org/acme tooling/versioning/decimal/impl/src/main/org/acme/impl tooling/versioning/decimal/impl/src/test tooling/versioning/decimal/impl/src/test/org tooling/versioning/decimal/impl/src/test/org/acme tooling/versioning/decimal/impl/src/test/org/acme/impl tooling/versioning/decimal/impl/src/test/org/acme/impl/test
- From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
- To: notify-dpml AT lists.ibiblio.org
- Subject: r1712 - in trunk/tutorials: . components tooling tooling/versioning tooling/versioning/decimal tooling/versioning/decimal/api tooling/versioning/decimal/api/src tooling/versioning/decimal/api/src/main tooling/versioning/decimal/api/src/main/org tooling/versioning/decimal/api/src/main/org/acme tooling/versioning/decimal/impl tooling/versioning/decimal/impl/src tooling/versioning/decimal/impl/src/main tooling/versioning/decimal/impl/src/main/org tooling/versioning/decimal/impl/src/main/org/acme tooling/versioning/decimal/impl/src/main/org/acme/impl tooling/versioning/decimal/impl/src/test tooling/versioning/decimal/impl/src/test/org tooling/versioning/decimal/impl/src/test/org/acme tooling/versioning/decimal/impl/src/test/org/acme/impl tooling/versioning/decimal/impl/src/test/org/acme/impl/test
- Date: Sun, 6 Aug 2006 05:04:01 +0200
Author: mcconnell
Date: 2006-08-06 05:03:57 +0200 (Sun, 06 Aug 2006)
New Revision: 1712
Added:
trunk/tutorials/tooling/versioning/
trunk/tutorials/tooling/versioning/decimal/
trunk/tutorials/tooling/versioning/decimal/api/
trunk/tutorials/tooling/versioning/decimal/api/build.xml
trunk/tutorials/tooling/versioning/decimal/api/src/
trunk/tutorials/tooling/versioning/decimal/api/src/main/
trunk/tutorials/tooling/versioning/decimal/api/src/main/org/
trunk/tutorials/tooling/versioning/decimal/api/src/main/org/acme/
trunk/tutorials/tooling/versioning/decimal/api/src/main/org/acme/Clock.java
trunk/tutorials/tooling/versioning/decimal/build.xml
trunk/tutorials/tooling/versioning/decimal/impl/
trunk/tutorials/tooling/versioning/decimal/impl/build.xml
trunk/tutorials/tooling/versioning/decimal/impl/src/
trunk/tutorials/tooling/versioning/decimal/impl/src/main/
trunk/tutorials/tooling/versioning/decimal/impl/src/main/org/
trunk/tutorials/tooling/versioning/decimal/impl/src/main/org/acme/
trunk/tutorials/tooling/versioning/decimal/impl/src/main/org/acme/impl/
trunk/tutorials/tooling/versioning/decimal/impl/src/main/org/acme/impl/SimpleClock.java
trunk/tutorials/tooling/versioning/decimal/impl/src/test/
trunk/tutorials/tooling/versioning/decimal/impl/src/test/org/
trunk/tutorials/tooling/versioning/decimal/impl/src/test/org/acme/
trunk/tutorials/tooling/versioning/decimal/impl/src/test/org/acme/impl/
trunk/tutorials/tooling/versioning/decimal/impl/src/test/org/acme/impl/test/
trunk/tutorials/tooling/versioning/decimal/impl/src/test/org/acme/impl/test/DemoTestCase.java
trunk/tutorials/tooling/versioning/decimal/impl/test.properties
trunk/tutorials/tooling/versioning/decimal/index.xml
Removed:
trunk/tutorials/components/build.xml
trunk/tutorials/components/index.xml
trunk/tutorials/tooling/index.xml
Modified:
trunk/tutorials/module.xml
trunk/tutorials/tooling/build.xml
Log:
add versioning tutorials detailing decimal semantics
Deleted: trunk/tutorials/components/build.xml
===================================================================
--- trunk/tutorials/components/build.xml 2006-08-05 03:45:18 UTC (rev
1711)
+++ trunk/tutorials/components/build.xml 2006-08-06 03:03:57 UTC (rev
1712)
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<project name="components" default="install"
- xmlns:transit="antlib:net.dpml.transit">
-
- <transit:import uri="local:template:dpml/tools/standard"/>
-
- <target name="build" depends="standard.build">
- <exec executable="build" dir="${basedir}" />
- </target>
-
-</project>
Deleted: trunk/tutorials/components/index.xml
===================================================================
--- trunk/tutorials/components/index.xml 2006-08-05 03:45:18 UTC (rev
1711)
+++ trunk/tutorials/components/index.xml 2006-08-06 03:03:57 UTC (rev
1712)
@@ -1,475 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<index xmlns="link:xsd:dpml/lang/dpml-module#1.0">
-
- <imports>
- <import uri="link:module:ant"/>
- <import uri="link:module:dpml"/>
- </imports>
-
- <properties>
- <property name="java.util.logging.config.class" value="dpml"/>
- </properties>
-
- <module name="dpmlx/tutorials/components">
-
- <dependencies>
- <build>
- <include ref="dpml"/>
- </build>
- </dependencies>
-
- <!-- a minimal component -->
-
- <project name="acme-demo-hello" basedir="hello">
- <types>
- <type id="jar"/>
- <component xmlns="link:xsd:dpml/lang/dpml-component#1.0"
- type="org.acme.Demo"
- name="demo"/>
- </types>
- <dependencies>
- <test>
- <include ref="ant/ant-junit"/>
- <include ref="dpml/transit/dpml-transit-main"/>
- </test>
- </dependencies>
- </project>
-
- <!-- adding context inner interface -->
-
- <project name="acme-demo-context" basedir="context">
- <types>
- <type id="jar"/>
- <component xmlns="link:xsd:dpml/lang/dpml-component#1.0"
- type="org.acme.Demo"
- name="demo">
- <context>
- <entry key="owner" value="${user.name}"/>
- <entry key="activity" value="Painting"/>
- <entry key="target" value="bike"/>
- <entry key="color" value="silver"/>
- </context>
- </component>
- </types>
- <dependencies>
- <build>
- <include key="acme-demo-hello"/>
- </build>
- <test>
- <include ref="ant/ant-junit"/>
- <include ref="dpml/transit/dpml-transit-main"/>
- </test>
- </dependencies>
- </project>
-
- <!-- demonstrating context primitives, arrays, and constructed values -->
-
- <project name="acme-demo-examples" basedir="examples">
- <types>
- <type id="jar"/>
- <component xmlns="link:xsd:dpml/lang/dpml-component#1.0"
- type="org.acme.Demo"
- name="demo">
- <context>
- <entry key="color" method="RED"/>
- <entry key="anotherColor">
- <param class="int" value="100"/>
- <param class="int" value="200"/>
- <param class="int" value="0"/>
- </entry>
- <entry key="integer" value="42"/>
- <entry key="short" value="19"/>
- <entry key="long" value="1042"/>
- <entry key="byte" value="9"/>
- <entry key="double" value="32"/>
- <entry key="float" value="9.813"/>
- <entry key="char" value="x"/>
- <entry key="boolean" value="true"/>
- <entry key="file" value="${work}"/>
- <entry key="tempFile" value="${temp}"/>
- <entry key="URI" value="${uri}"/>
- <entry key="name" value="${name}"/>
- <entry key="path" value="${path}"/>
- <entry key="names">
- <param value="fred"/>
- <param value="george"/>
- <param value="mary"/>
- </entry>
- </context>
- </component>
- </types>
- <dependencies>
- <build>
- <include key="acme-demo-context"/>
- </build>
- <test>
- <include ref="ant/ant-junit"/>
- <include ref="dpml/transit/dpml-transit-main"/>
- </test>
- </dependencies>
- </project>
-
- <project name="acme-parts-demo" basedir="parts">
- <types>
- <type id="jar"/>
- <component xmlns="link:xsd:dpml/lang/dpml-component#1.0"
- type="org.acme.Demo"
- name="demo">
- <parts>
- <component key="widget" type="org.acme.Widget" name="widget">
- <context>
- <entry key="color" method="BLUE"/>
- </context>
- </component>
- </parts>
- </component>
- </types>
- <dependencies>
- <build>
- <include key="acme-demo-examples"/>
- </build>
- <test>
- <include ref="ant/ant-junit"/>
- <include ref="dpml/transit/dpml-transit-main"/>
- </test>
- </dependencies>
- </project>
-
- <project name="acme-lookup-demo" basedir="lookup">
- <types>
- <type id="jar"/>
- <component xmlns="link:xsd:dpml/lang/dpml-component#1.0"
- type="org.acme.Demo"
- name="demo">
- <parts>
- <component key="widget" type="org.acme.Widget" name="widget">
- <context>
- <entry key="color" method="BLUE"/>
- </context>
- </component>
- <component key="gizmo" type="org.acme.Gizmo" name="gizmo">
- <context>
- <entry key="widget" lookup="org.acme.Widget"/>
- </context>
- </component>
- </parts>
- </component>
- </types>
- <dependencies>
- <build>
- <include key="acme-parts-demo"/>
- </build>
- <test>
- <include ref="ant/ant-junit"/>
- <include ref="dpml/transit/dpml-transit-main"/>
- </test>
- </dependencies>
- </project>
-
- <project name="acme-lifestyle-demo" basedir="lifestyle">
- <types>
- <type id="jar"/>
- <component xmlns="link:xsd:dpml/lang/dpml-component#1.0"
- type="org.acme.Demo"
- name="demo">
- <parts>
- <component key="widget" type="org.acme.Widget" name="widget"
lifestyle="transient">
- <context>
- <entry key="color" method="BLUE"/>
- </context>
- </component>
- <component key="gizmo" type="org.acme.Gizmo" name="gizmo">
- <context>
- <entry key="widget" lookup="org.acme.Widget"/>
- </context>
- </component>
- </parts>
- </component>
- </types>
- <dependencies>
- <build>
- <include key="acme-lookup-demo"/>
- </build>
- <test>
- <include ref="ant/ant-junit"/>
- <include ref="dpml/transit/dpml-transit-main"/>
- </test>
- </dependencies>
- </project>
-
- <project name="acme-transient-demo" basedir="transient">
- <types>
- <type id="jar"/>
- <component xmlns="link:xsd:dpml/lang/dpml-component#1.0"
- type="org.acme.Demo"
- name="demo">
- <context>
- <entry key="count" value="5"/>
- </context>
- <parts>
- <component key="gizmo" type="org.acme.Gizmo"
lifestyle="transient"/>
- </parts>
- </component>
- </types>
- <dependencies>
- <build>
- <include key="acme-lifestyle-demo"/>
- </build>
- <test>
- <include ref="ant/ant-junit"/>
- <include ref="dpml/transit/dpml-transit-main"/>
- </test>
- </dependencies>
- </project>
-
- <project name="acme-thread-demo" basedir="thread">
- <types>
- <type id="jar"/>
- <component xmlns="link:xsd:dpml/lang/dpml-component#1.0"
- type="org.acme.Demo"
- name="demo">
- <context>
- <entry key="threadCount" value="3"/>
- <entry key="accessCount" value="2"/>
- </context>
- <parts>
- <component key="gizmo" type="org.acme.Gizmo" lifestyle="thread"/>
- </parts>
- </component>
- </types>
- <dependencies>
- <build>
- <include key="acme-transient-demo"/>
- </build>
- <test>
- <include ref="ant/ant-junit"/>
- <include ref="dpml/transit/dpml-transit-main"/>
- </test>
- </dependencies>
- </project>
-
- <project name="acme-singleton-demo" basedir="singleton">
- <types>
- <type id="jar"/>
- <component xmlns="link:xsd:dpml/lang/dpml-component#1.0"
- type="org.acme.Demo"
- name="demo">
- <context>
- <entry key="threadCount" value="3"/>
- <entry key="accessCount" value="2"/>
- </context>
- <parts>
- <component key="gizmo" type="org.acme.Gizmo"
lifestyle="singleton"/>
- </parts>
- </component>
- </types>
- <dependencies>
- <build>
- <include key="acme-thread-demo"/>
- </build>
- <test>
- <include ref="ant/ant-junit"/>
- <include ref="dpml/transit/dpml-transit-main"/>
- </test>
- </dependencies>
- </project>
-
- <project name="acme-state-demo" basedir="state">
- <types>
- <type id="jar"/>
- <component xmlns="link:xsd:dpml/lang/dpml-component#1.0"
- type="org.acme.Demo"
- name="demo"
- lifestyle="transient">
- </component>
- </types>
- <dependencies>
- <build>
- <include key="acme-singleton-demo"/>
- </build>
- <test>
- <include ref="ant/ant-junit"/>
- <include ref="dpml/transit/dpml-transit-main"/>
- </test>
- </dependencies>
- </project>
-
- <project name="acme-logging-demo" basedir="logging">
- <types>
- <type id="jar"/>
- <component xmlns="link:xsd:dpml/lang/dpml-component#1.0"
- type="org.acme.Demo"
- name="demo"
- lifestyle="transient">
- </component>
- </types>
- <dependencies>
- <build>
- <include key="acme-state-demo"/>
- </build>
- <runtime>
- <include ref="dpml/util/dpml-logging-api"/>
- </runtime>
- <test>
- <include ref="ant/ant-junit"/>
- <include ref="dpml/transit/dpml-transit-main"/>
- </test>
- </dependencies>
- </project>
-
- <project name="acme-type-demo" basedir="type">
- <types>
- <type id="jar"/>
- <component xmlns="link:xsd:dpml/lang/dpml-component#1.0"
- type="org.acme.Demo"/>
- </types>
- <dependencies>
- <build>
- <include key="acme-logging-demo"/>
- </build>
- <test>
- <include ref="ant/ant-junit"/>
- <include ref="dpml/transit/dpml-transit-main"/>
- </test>
- </dependencies>
- </project>
-
- <!-- customization demo: simple clock -->
-
- <project name="acme-simple-clock" basedir="customize/clock">
- <info title="Simple Clock"/>
- <types>
- <type id="jar"/>
- <component xmlns="link:xsd:dpml/lang/dpml-component#1.0" alias="true"
- type="org.acme.clock.SimpleClock" name="clock">
- <context>
- <entry key="format" value="K:mm a, z"/>
- </context>
- </component>
- </types>
- <dependencies>
- <build>
- <include key="acme-type-demo"/>
- </build>
- <test>
- <include ref="ant/ant-junit"/>
- <include ref="dpml/transit/dpml-transit-main"/>
- </test>
- </dependencies>
- </project>
-
- <!-- extension demo -->
-
- <project name="acme-extended-clock" basedir="customize/extension">
- <info title="Extended Clock"/>
- <types>
- <component xmlns="link:xsd:dpml/lang/dpml-component#1.0"
- uri="link:part:dpmlx/tutorials/components/acme-simple-clock"
name="clock">
- <context>
- <entry key="format" value="K:mm a"/>
- </context>
- </component>
- </types>
- <dependencies>
- <runtime>
- <include key="acme-simple-clock"/>
- </runtime>
- <test>
- <include ref="ant/ant-junit"/>
- <include ref="dpml/transit/dpml-transit-main"/>
- </test>
- </dependencies>
- </project>
-
-
- <project name="acme-custom-clock" basedir="customize/custom">
- <info title="Custom Clock"/>
- <types>
- <type id="jar"/>
- <component xmlns="link:xsd:dpml/lang/dpml-component#1.0"
- uri="link:part:dpmlx/tutorials/components/acme-simple-clock"
name="clock">
- <context>
- <entry key="format" class="org.acme.extra.Customizer"
method="getCustomFormat"/>
- </context>
- </component>
- </types>
- <dependencies>
- <test>
- <include ref="ant/ant-junit"/>
- <include ref="dpml/transit/dpml-transit-main"/>
- <include key="acme-simple-clock"/>
- </test>
- </dependencies>
- </project>
-
- <!-- part customization demo -->
-
- <project name="acme-clock-api" basedir="import/api">
- <types>
- <type id="jar"/>
- </types>
- <dependencies>
- <build>
- <include key="acme-custom-clock"/>
- </build>
- </dependencies>
- </project>
-
- <project name="acme-clock-impl" basedir="import/clock">
- <types>
- <type id="jar"/>
- <component xmlns="link:xsd:dpml/lang/dpml-component#1.0"
- type="org.acme.scheduler.SimpleClock" name="simple"/>
- </types>
- <dependencies>
- <runtime>
- <include key="acme-clock-api"/>
- <include ref="dpml/transit/dpml-transit-main"/>
- </runtime>
- </dependencies>
- </project>
-
- <project name="acme-clock-demo" basedir="import/demo">
- <types>
- <type id="jar"/>
- <component xmlns="link:xsd:dpml/lang/dpml-component#1.0"
- type="org.acme.demo.Demo" name="demo">
- <parts>
- <component key="clock"
uri="resource:part:dpmlx/tutorials/components/acme-clock-impl">
- <context>
- <entry key="format" value="h:mm a"/>
- </context>
- </component>
- </parts>
- </component>
- </types>
- <dependencies>
- <build>
- <include key="acme-clock-impl"/>
- </build>
- <runtime>
- <include key="acme-clock-api"/>
- <include ref="dpml/util/dpml-logging-api"/>
- <include ref="dpml/transit/dpml-transit-main"/>
- </runtime>
- <test>
- <include ref="ant/ant-junit"/>
- </test>
- </dependencies>
- </project>
-
- <project name="acme-clock-test" basedir="import/test">
- <dependencies>
- <test>
- <include ref="dpml/transit/dpml-transit-main"/>
- <include ref="ant/ant-junit"/>
- </test>
- </dependencies>
- <filters>
- <feature ref="dpmlx/tutorials/components/acme-clock-demo" token="PART"
id="uri" type="part"/>
- </filters>
- </project>
-
- </module>
-
-</index>
\ No newline at end of file
Modified: trunk/tutorials/module.xml
===================================================================
--- trunk/tutorials/module.xml 2006-08-05 03:45:18 UTC (rev 1711)
+++ trunk/tutorials/module.xml 2006-08-06 03:03:57 UTC (rev 1712)
@@ -16,11 +16,469 @@
</module>
<module name="components" basedir="components">
+
+ <properties>
+ <property name="java.util.logging.config.class" value="dpml"/>
+ </properties>
+
<dependencies>
<build>
<include key="tooling"/>
</build>
</dependencies>
+
+ <!-- a minimal component -->
+
+ <project name="acme-demo-hello" basedir="hello">
+ <types>
+ <type id="jar"/>
+ <component xmlns="link:xsd:dpml/lang/dpml-component#1.0"
+ type="org.acme.Demo"
+ name="demo"/>
+ </types>
+ <dependencies>
+ <test>
+ <include ref="ant/ant-junit"/>
+ <include ref="dpml/transit/dpml-transit-main"/>
+ </test>
+ </dependencies>
+ </project>
+
+ <!-- adding context inner interface -->
+
+ <project name="acme-demo-context" basedir="context">
+ <types>
+ <type id="jar"/>
+ <component xmlns="link:xsd:dpml/lang/dpml-component#1.0"
+ type="org.acme.Demo"
+ name="demo">
+ <context>
+ <entry key="owner" value="${user.name}"/>
+ <entry key="activity" value="Painting"/>
+ <entry key="target" value="bike"/>
+ <entry key="color" value="silver"/>
+ </context>
+ </component>
+ </types>
+ <dependencies>
+ <build>
+ <include key="acme-demo-hello"/>
+ </build>
+ <test>
+ <include ref="ant/ant-junit"/>
+ <include ref="dpml/transit/dpml-transit-main"/>
+ </test>
+ </dependencies>
+ </project>
+
+ <!-- demonstrating context primitives, arrays, and constructed values -->
+
+ <project name="acme-demo-examples" basedir="examples">
+ <types>
+ <type id="jar"/>
+ <component xmlns="link:xsd:dpml/lang/dpml-component#1.0"
+ type="org.acme.Demo"
+ name="demo">
+ <context>
+ <entry key="color" method="RED"/>
+ <entry key="anotherColor">
+ <param class="int" value="100"/>
+ <param class="int" value="200"/>
+ <param class="int" value="0"/>
+ </entry>
+ <entry key="integer" value="42"/>
+ <entry key="short" value="19"/>
+ <entry key="long" value="1042"/>
+ <entry key="byte" value="9"/>
+ <entry key="double" value="32"/>
+ <entry key="float" value="9.813"/>
+ <entry key="char" value="x"/>
+ <entry key="boolean" value="true"/>
+ <entry key="file" value="${work}"/>
+ <entry key="tempFile" value="${temp}"/>
+ <entry key="URI" value="${uri}"/>
+ <entry key="name" value="${name}"/>
+ <entry key="path" value="${path}"/>
+ <entry key="names">
+ <param value="fred"/>
+ <param value="george"/>
+ <param value="mary"/>
+ </entry>
+ </context>
+ </component>
+ </types>
+ <dependencies>
+ <build>
+ <include key="acme-demo-context"/>
+ </build>
+ <test>
+ <include ref="ant/ant-junit"/>
+ <include ref="dpml/transit/dpml-transit-main"/>
+ </test>
+ </dependencies>
+ </project>
+
+ <project name="acme-parts-demo" basedir="parts">
+ <types>
+ <type id="jar"/>
+ <component xmlns="link:xsd:dpml/lang/dpml-component#1.0"
+ type="org.acme.Demo"
+ name="demo">
+ <parts>
+ <component key="widget" type="org.acme.Widget" name="widget">
+ <context>
+ <entry key="color" method="BLUE"/>
+ </context>
+ </component>
+ </parts>
+ </component>
+ </types>
+ <dependencies>
+ <build>
+ <include key="acme-demo-examples"/>
+ </build>
+ <test>
+ <include ref="ant/ant-junit"/>
+ <include ref="dpml/transit/dpml-transit-main"/>
+ </test>
+ </dependencies>
+ </project>
+
+ <project name="acme-lookup-demo" basedir="lookup">
+ <types>
+ <type id="jar"/>
+ <component xmlns="link:xsd:dpml/lang/dpml-component#1.0"
+ type="org.acme.Demo"
+ name="demo">
+ <parts>
+ <component key="widget" type="org.acme.Widget" name="widget">
+ <context>
+ <entry key="color" method="BLUE"/>
+ </context>
+ </component>
+ <component key="gizmo" type="org.acme.Gizmo" name="gizmo">
+ <context>
+ <entry key="widget" lookup="org.acme.Widget"/>
+ </context>
+ </component>
+ </parts>
+ </component>
+ </types>
+ <dependencies>
+ <build>
+ <include key="acme-parts-demo"/>
+ </build>
+ <test>
+ <include ref="ant/ant-junit"/>
+ <include ref="dpml/transit/dpml-transit-main"/>
+ </test>
+ </dependencies>
+ </project>
+
+ <project name="acme-lifestyle-demo" basedir="lifestyle">
+ <types>
+ <type id="jar"/>
+ <component xmlns="link:xsd:dpml/lang/dpml-component#1.0"
+ type="org.acme.Demo"
+ name="demo">
+ <parts>
+ <component key="widget" type="org.acme.Widget" name="widget"
lifestyle="transient">
+ <context>
+ <entry key="color" method="BLUE"/>
+ </context>
+ </component>
+ <component key="gizmo" type="org.acme.Gizmo" name="gizmo">
+ <context>
+ <entry key="widget" lookup="org.acme.Widget"/>
+ </context>
+ </component>
+ </parts>
+ </component>
+ </types>
+ <dependencies>
+ <build>
+ <include key="acme-lookup-demo"/>
+ </build>
+ <test>
+ <include ref="ant/ant-junit"/>
+ <include ref="dpml/transit/dpml-transit-main"/>
+ </test>
+ </dependencies>
+ </project>
+
+ <project name="acme-transient-demo" basedir="transient">
+ <types>
+ <type id="jar"/>
+ <component xmlns="link:xsd:dpml/lang/dpml-component#1.0"
+ type="org.acme.Demo"
+ name="demo">
+ <context>
+ <entry key="count" value="5"/>
+ </context>
+ <parts>
+ <component key="gizmo" type="org.acme.Gizmo"
lifestyle="transient"/>
+ </parts>
+ </component>
+ </types>
+ <dependencies>
+ <build>
+ <include key="acme-lifestyle-demo"/>
+ </build>
+ <test>
+ <include ref="ant/ant-junit"/>
+ <include ref="dpml/transit/dpml-transit-main"/>
+ </test>
+ </dependencies>
+ </project>
+
+ <project name="acme-thread-demo" basedir="thread">
+ <types>
+ <type id="jar"/>
+ <component xmlns="link:xsd:dpml/lang/dpml-component#1.0"
+ type="org.acme.Demo"
+ name="demo">
+ <context>
+ <entry key="threadCount" value="3"/>
+ <entry key="accessCount" value="2"/>
+ </context>
+ <parts>
+ <component key="gizmo" type="org.acme.Gizmo" lifestyle="thread"/>
+ </parts>
+ </component>
+ </types>
+ <dependencies>
+ <build>
+ <include key="acme-transient-demo"/>
+ </build>
+ <test>
+ <include ref="ant/ant-junit"/>
+ <include ref="dpml/transit/dpml-transit-main"/>
+ </test>
+ </dependencies>
+ </project>
+
+ <project name="acme-singleton-demo" basedir="singleton">
+ <types>
+ <type id="jar"/>
+ <component xmlns="link:xsd:dpml/lang/dpml-component#1.0"
+ type="org.acme.Demo"
+ name="demo">
+ <context>
+ <entry key="threadCount" value="3"/>
+ <entry key="accessCount" value="2"/>
+ </context>
+ <parts>
+ <component key="gizmo" type="org.acme.Gizmo"
lifestyle="singleton"/>
+ </parts>
+ </component>
+ </types>
+ <dependencies>
+ <build>
+ <include key="acme-thread-demo"/>
+ </build>
+ <test>
+ <include ref="ant/ant-junit"/>
+ <include ref="dpml/transit/dpml-transit-main"/>
+ </test>
+ </dependencies>
+ </project>
+
+ <project name="acme-state-demo" basedir="state">
+ <types>
+ <type id="jar"/>
+ <component xmlns="link:xsd:dpml/lang/dpml-component#1.0"
+ type="org.acme.Demo"
+ name="demo"
+ lifestyle="transient">
+ </component>
+ </types>
+ <dependencies>
+ <build>
+ <include key="acme-singleton-demo"/>
+ </build>
+ <test>
+ <include ref="ant/ant-junit"/>
+ <include ref="dpml/transit/dpml-transit-main"/>
+ </test>
+ </dependencies>
+ </project>
+
+ <project name="acme-logging-demo" basedir="logging">
+ <types>
+ <type id="jar"/>
+ <component xmlns="link:xsd:dpml/lang/dpml-component#1.0"
+ type="org.acme.Demo"
+ name="demo"
+ lifestyle="transient">
+ </component>
+ </types>
+ <dependencies>
+ <build>
+ <include key="acme-state-demo"/>
+ </build>
+ <runtime>
+ <include ref="dpml/util/dpml-logging-api"/>
+ </runtime>
+ <test>
+ <include ref="ant/ant-junit"/>
+ <include ref="dpml/transit/dpml-transit-main"/>
+ </test>
+ </dependencies>
+ </project>
+
+ <project name="acme-type-demo" basedir="type">
+ <types>
+ <type id="jar"/>
+ <component xmlns="link:xsd:dpml/lang/dpml-component#1.0"
+ type="org.acme.Demo"/>
+ </types>
+ <dependencies>
+ <build>
+ <include key="acme-logging-demo"/>
+ </build>
+ <test>
+ <include ref="ant/ant-junit"/>
+ <include ref="dpml/transit/dpml-transit-main"/>
+ </test>
+ </dependencies>
+ </project>
+
+ <!-- customization demo: simple clock -->
+
+ <project name="acme-simple-clock" basedir="customize/clock">
+ <info title="Simple Clock"/>
+ <types>
+ <type id="jar"/>
+ <component xmlns="link:xsd:dpml/lang/dpml-component#1.0" alias="true"
+ type="org.acme.clock.SimpleClock" name="clock">
+ <context>
+ <entry key="format" value="K:mm a, z"/>
+ </context>
+ </component>
+ </types>
+ <dependencies>
+ <build>
+ <include key="acme-type-demo"/>
+ </build>
+ <test>
+ <include ref="ant/ant-junit"/>
+ <include ref="dpml/transit/dpml-transit-main"/>
+ </test>
+ </dependencies>
+ </project>
+
+ <!-- extension demo -->
+
+ <project name="acme-extended-clock" basedir="customize/extension">
+ <info title="Extended Clock"/>
+ <types>
+ <component xmlns="link:xsd:dpml/lang/dpml-component#1.0"
+ uri="link:part:dpmlx/tutorials/components/acme-simple-clock"
name="clock">
+ <context>
+ <entry key="format" value="K:mm a"/>
+ </context>
+ </component>
+ </types>
+ <dependencies>
+ <runtime>
+ <include key="acme-simple-clock"/>
+ </runtime>
+ <test>
+ <include ref="ant/ant-junit"/>
+ <include ref="dpml/transit/dpml-transit-main"/>
+ </test>
+ </dependencies>
+ </project>
+
+
+ <project name="acme-custom-clock" basedir="customize/custom">
+ <info title="Custom Clock"/>
+ <types>
+ <type id="jar"/>
+ <component xmlns="link:xsd:dpml/lang/dpml-component#1.0"
+ uri="link:part:dpmlx/tutorials/components/acme-simple-clock"
name="clock">
+ <context>
+ <entry key="format" class="org.acme.extra.Customizer"
method="getCustomFormat"/>
+ </context>
+ </component>
+ </types>
+ <dependencies>
+ <test>
+ <include ref="ant/ant-junit"/>
+ <include ref="dpml/transit/dpml-transit-main"/>
+ <include key="acme-simple-clock"/>
+ </test>
+ </dependencies>
+ </project>
+
+ <!-- part customization demo -->
+
+ <project name="acme-clock-api" basedir="import/api">
+ <types>
+ <type id="jar"/>
+ </types>
+ <dependencies>
+ <build>
+ <include key="acme-custom-clock"/>
+ </build>
+ </dependencies>
+ </project>
+
+ <project name="acme-clock-impl" basedir="import/clock">
+ <types>
+ <type id="jar"/>
+ <component xmlns="link:xsd:dpml/lang/dpml-component#1.0"
+ type="org.acme.scheduler.SimpleClock" name="simple"/>
+ </types>
+ <dependencies>
+ <runtime>
+ <include key="acme-clock-api"/>
+ <include ref="dpml/transit/dpml-transit-main"/>
+ </runtime>
+ </dependencies>
+ </project>
+
+ <project name="acme-clock-demo" basedir="import/demo">
+ <types>
+ <type id="jar"/>
+ <component xmlns="link:xsd:dpml/lang/dpml-component#1.0"
+ type="org.acme.demo.Demo" name="demo">
+ <parts>
+ <component key="clock"
uri="resource:part:dpmlx/tutorials/components/acme-clock-impl">
+ <context>
+ <entry key="format" value="h:mm a"/>
+ </context>
+ </component>
+ </parts>
+ </component>
+ </types>
+ <dependencies>
+ <build>
+ <include key="acme-clock-impl"/>
+ </build>
+ <runtime>
+ <include key="acme-clock-api"/>
+ <include ref="dpml/util/dpml-logging-api"/>
+ <include ref="dpml/transit/dpml-transit-main"/>
+ </runtime>
+ <test>
+ <include ref="ant/ant-junit"/>
+ </test>
+ </dependencies>
+ </project>
+
+ <project name="acme-clock-test" basedir="import/test">
+ <dependencies>
+ <test>
+ <include ref="dpml/transit/dpml-transit-main"/>
+ <include ref="ant/ant-junit"/>
+ </test>
+ </dependencies>
+ <filters>
+ <feature ref="dpmlx/tutorials/components/acme-clock-demo" token="PART"
id="uri" type="part"/>
+ </filters>
+ </project>
+
</module>
</module>
\ No newline at end of file
Modified: trunk/tutorials/tooling/build.xml
===================================================================
--- trunk/tutorials/tooling/build.xml 2006-08-05 03:45:18 UTC (rev 1711)
+++ trunk/tutorials/tooling/build.xml 2006-08-06 03:03:57 UTC (rev 1712)
@@ -1,26 +1,37 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<project name="demo" default="install"
- xmlns:transit="antlib:net.dpml.transit">
+<project name="tooling" default="install" basedir="."
+ xmlns:transit="antlib:net.dpml.transit"
+ xmlns:x="dpml:depot">
+ <macrodef name="build">
+ <attribute name="dir"/>
+ <sequential>
+ <exec executable="build" dir="@{dir}">
+ <arg value="clean"/>
+ <arg value="install"/>
+ </exec>
+ </sequential>
+ </macrodef>
+
<transit:import uri="local:template:dpml/tools/standard"/>
-
+
<target name="build" depends="standard.build">
<echo message="starting"/>
- <exec executable="build" dir="${basedir}/simple" />
- <exec executable="build" dir="${basedir}/alias" />
- <exec executable="build" dir="${basedir}/automation" />
- <exec executable="build" dir="${basedir}/filters" />
- <exec executable="build" dir="${basedir}/imports" />
- <exec executable="build" dir="${basedir}/properties" />
- <exec executable="build" dir="${basedir}/symbolic" />
- <exec executable="build" dir="${basedir}/types" />
- <exec executable="build" dir="${basedir}/unit" />
- <exec executable="build" dir="${basedir}/complex/build" />
- <exec executable="build" dir="${basedir}/complex/export" />
- <exec executable="build" dir="${basedir}/complex/modules" />
- <exec executable="build" dir="${basedir}/complex/plugin" />
+ <build dir="${basedir}/simple"/>
+ <build dir="${basedir}/alias" />
+ <build dir="${basedir}/automation" />
+ <build dir="${basedir}/filters" />
+ <build dir="${basedir}/imports" />
+ <build dir="${basedir}/properties" />
+ <build dir="${basedir}/symbolic" />
+ <build dir="${basedir}/types" />
+ <build dir="${basedir}/unit" />
+ <build dir="${basedir}/complex/build" />
+ <build dir="${basedir}/complex/export" />
+ <build dir="${basedir}/complex/modules" />
+ <build dir="${basedir}/complex/plugin" />
<echo message="done"/>
</target>
-
+
</project>
Deleted: trunk/tutorials/tooling/index.xml
===================================================================
--- trunk/tutorials/tooling/index.xml 2006-08-05 03:45:18 UTC (rev 1711)
+++ trunk/tutorials/tooling/index.xml 2006-08-06 03:03:57 UTC (rev 1712)
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<index xmlns="link:xsd:dpml/lang/dpml-module#1.0">
-
- <imports>
- <import uri="link:module:dpml"/>
- </imports>
-
- <module name="dpmlx/tutorials/tooling">
-
- <dependencies>
- <build>
- <include ref="dpml"/>
- </build>
- </dependencies>
-
- </module>
-
-</index>
\ No newline at end of file
Added: trunk/tutorials/tooling/versioning/decimal/api/build.xml
===================================================================
--- trunk/tutorials/tooling/versioning/decimal/api/build.xml 2006-08-05
03:45:18 UTC (rev 1711)
+++ trunk/tutorials/tooling/versioning/decimal/api/build.xml 2006-08-06
03:03:57 UTC (rev 1712)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<project name="demo" default="install"
+ xmlns:transit="antlib:net.dpml.transit">
+
+ <transit:import uri="local:template:dpml/tools/standard"/>
+
+</project>
Added:
trunk/tutorials/tooling/versioning/decimal/api/src/main/org/acme/Clock.java
===================================================================
---
trunk/tutorials/tooling/versioning/decimal/api/src/main/org/acme/Clock.java
2006-08-05 03:45:18 UTC (rev 1711)
+++
trunk/tutorials/tooling/versioning/decimal/api/src/main/org/acme/Clock.java
2006-08-06 03:03:57 UTC (rev 1712)
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2006 Stephen J. McConnell.
+ *
+ * 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.
+ */
+
+package org.acme;
+
+/**
+ * Clock interface.
+ *
+ * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
+ * @version @PROJECT-VERSION@
+ */
+public interface Clock
+{
+ /**
+ * Return a formatted timestamp value.
+ * @return the timestamp value
+ */
+ String getTimestamp();
+}
Added: trunk/tutorials/tooling/versioning/decimal/build.xml
===================================================================
--- trunk/tutorials/tooling/versioning/decimal/build.xml 2006-08-05
03:45:18 UTC (rev 1711)
+++ trunk/tutorials/tooling/versioning/decimal/build.xml 2006-08-06
03:03:57 UTC (rev 1712)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<project xmlns:transit="antlib:net.dpml.transit"
+ xmlns:x="dpml:depot">
+
+ <transit:import uri="local:template:dpml/tools/standard"/>
+
+</project>
Added: trunk/tutorials/tooling/versioning/decimal/impl/build.xml
===================================================================
--- trunk/tutorials/tooling/versioning/decimal/impl/build.xml 2006-08-05
03:45:18 UTC (rev 1711)
+++ trunk/tutorials/tooling/versioning/decimal/impl/build.xml 2006-08-06
03:03:57 UTC (rev 1712)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<project name="demo" default="install"
+ xmlns:transit="antlib:net.dpml.transit">
+
+ <transit:import uri="local:template:dpml/tools/standard"/>
+
+</project>
Added:
trunk/tutorials/tooling/versioning/decimal/impl/src/main/org/acme/impl/SimpleClock.java
===================================================================
---
trunk/tutorials/tooling/versioning/decimal/impl/src/main/org/acme/impl/SimpleClock.java
2006-08-05 03:45:18 UTC (rev 1711)
+++
trunk/tutorials/tooling/versioning/decimal/impl/src/main/org/acme/impl/SimpleClock.java
2006-08-06 03:03:57 UTC (rev 1712)
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2006 Stephen J. McConnell.
+ *
+ * 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.
+ */
+
+package org.acme.impl;
+
+import java.util.Date;
+import java.util.Locale;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+
+import org.acme.Clock;
+
+/**
+ * A minimal implementation of a clock.
+ *
+ * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
+ * @version @PROJECT-VERSION@
+ */
+public class SimpleClock implements Clock
+{
+ //------------------------------------------------------------------
+ // state
+ //------------------------------------------------------------------
+
+ private final String m_format;
+ private final Locale m_locale;
+
+ //------------------------------------------------------------------
+ // constructor
+ //------------------------------------------------------------------
+
+ /**
+ * Creation of a new instance.
+ * @param format the format to use for timestamps
+ * @param locale the assigned locale
+ */
+ public SimpleClock( final String format, final Locale locale )
+ {
+ m_format = format;
+ m_locale = locale;
+ }
+
+ //------------------------------------------------------------------
+ // Clock
+ //------------------------------------------------------------------
+
+ /**
+ * Return the current time as a formatted string.
+ * @return the current time as a string
+ */
+ public String getTimestamp()
+ {
+ Date date = new Date();
+ DateFormat formatter = new SimpleDateFormat( m_format, m_locale );
+ return formatter.format( date );
+ }
+
+}
Added:
trunk/tutorials/tooling/versioning/decimal/impl/src/test/org/acme/impl/test/DemoTestCase.java
===================================================================
---
trunk/tutorials/tooling/versioning/decimal/impl/src/test/org/acme/impl/test/DemoTestCase.java
2006-08-05 03:45:18 UTC (rev 1711)
+++
trunk/tutorials/tooling/versioning/decimal/impl/src/test/org/acme/impl/test/DemoTestCase.java
2006-08-06 03:03:57 UTC (rev 1712)
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2006 Stephen J. McConnell.
+ *
+ * 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.
+ */
+
+package org.acme.impl.test;
+
+import java.io.File;
+import java.net.URI;
+import java.util.logging.Logger;
+
+import junit.framework.TestCase;
+
+import net.dpml.lang.Part;
+
+import org.acme.Clock;
+
+/**
+ * Deployment of the demo component.
+ *
+ * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
+ * @version @PROJECT-VERSION@
+ */
+public class DemoTestCase extends TestCase
+{
+ /**
+ * Test component deployment.
+ * @exception Exception if an error occurs
+ */
+ public void testComponent() throws Exception
+ {
+ URI uri = getPartURI();
+ Part part = Part.load( uri );
+ Clock clock = (Clock) part.getContent();
+ String timestamp = clock.getTimestamp();
+
+ Logger logger = Logger.getLogger( "test" );
+ logger.info( clock.getTimestamp() );
+ }
+
+ private URI getPartURI() throws Exception
+ {
+ String path = System.getProperty( "project.deliverable.part.path" );
+ File file = new File( path );
+ return file.toURI();
+ }
+}
Added: trunk/tutorials/tooling/versioning/decimal/impl/test.properties
===================================================================
--- trunk/tutorials/tooling/versioning/decimal/impl/test.properties
2006-08-05 03:45:18 UTC (rev 1711)
+++ trunk/tutorials/tooling/versioning/decimal/impl/test.properties
2006-08-06 03:03:57 UTC (rev 1712)
@@ -0,0 +1 @@
+java.util.logging.config.class = net.dpml.util.ConfigurationHandler
\ No newline at end of file
Added: trunk/tutorials/tooling/versioning/decimal/index.xml
===================================================================
--- trunk/tutorials/tooling/versioning/decimal/index.xml 2006-08-05
03:45:18 UTC (rev 1711)
+++ trunk/tutorials/tooling/versioning/decimal/index.xml 2006-08-06
03:03:57 UTC (rev 1712)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<index xmlns="link:xsd:dpml/lang/dpml-module#1.0"
+ xmlns:part="link:xsd:dpml/lang/dpml-part#1.0">
+
+ <imports>
+ <import uri="link:module:ant"/>
+ <import uri="link:module:dpml"/>
+ </imports>
+
+ <module name="org/acme/plugin" basedir=".">
+
+ <properties>
+ <property name="project.major.version" value="1"/>
+ <property name="project.micro.version" value="2"/>
+ </properties>
+
+ <project name="clock-api" basedir="api">
+ <properties>
+ <property name="project.micro.version" value="0"/>
+ </properties>
+ <types>
+ <type id="jar"/>
+ </types>
+ </project>
+
+ <project name="clock-impl" basedir="impl">
+ <types>
+ <type id="jar"/>
+ <part:plugin class="org.acme.impl.SimpleClock">
+ <part:param value="h:mm"/>
+ <part:param class="java.util.Locale" method="getDefault"/>
+ </part:plugin>
+ </types>
+ <dependencies>
+ <runtime>
+ <include key="clock-api"/>
+ </runtime>
+ <test>
+ <include ref="ant/ant-junit"/>
+ <include ref="dpml/transit/dpml-transit-main"/>
+ </test>
+ </dependencies>
+ </project>
+
+ </module>
+
+</index>
- r1712 - in trunk/tutorials: . components tooling tooling/versioning tooling/versioning/decimal tooling/versioning/decimal/api tooling/versioning/decimal/api/src tooling/versioning/decimal/api/src/main tooling/versioning/decimal/api/src/main/org tooling/versioning/decimal/api/src/main/org/acme tooling/versioning/decimal/impl tooling/versioning/decimal/impl/src tooling/versioning/decimal/impl/src/main tooling/versioning/decimal/impl/src/main/org tooling/versioning/decimal/impl/src/main/org/acme tooling/versioning/decimal/impl/src/main/org/acme/impl tooling/versioning/decimal/impl/src/test tooling/versioning/decimal/impl/src/test/org tooling/versioning/decimal/impl/src/test/org/acme tooling/versioning/decimal/impl/src/test/org/acme/impl tooling/versioning/decimal/impl/src/test/org/acme/impl/test, mcconnell at BerliOS, 08/05/2006
Archive powered by MHonArc 2.6.24.