Skip to Content.
Sympa Menu

notify-dpml - svn commit: r1415 - in development/laboratory: cocoon-magic spells spells/cocoon spells/xdoclet spells/xdoclet/plugin spells/xdoclet/plugin-test spells/xdoclet/plugin-test/src spells/xdoclet/plugin-test/src/main spells/xdoclet/plugin-test/src/main/net spells/xdoclet/plugin-test/src/main/net/dpml spells/xdoclet/plugin-test/src/main/net/dpml/tutorial spells/xdoclet/plugin-test/src/main/net/dpml/tutorial/magic spells/xdoclet/plugin-test/src/main/net/dpml/tutorial/magic/spell spells/xdoclet/plugin/src spells/xdoclet/plugin/src/main spells/xdoclet/plugin/src/main/net spells/xdoclet/plugin/src/main/net/dpml spells/xdoclet/plugin/src/main/net/dpml/lab spells/xdoclet/plugin/src/main/net/dpml/lab/spell spells/xdoclet/plugin/src/main/net/dpml/lab/spell/xdoclet spells/xdoclet/standard-test spells/xdoclet/standard-test/src spells/xdoclet/standard-test/src/main spells/xdoclet/standard-test/src/main/net spells/xdoclet/standard-test/src/main/net/dpml spells/xdoclet/standard-test/src/main/net/dpml/tutorial spells/xdoclet/standard-test/src/main/net/dpml/tutorial/magic spells/xdoclet/standard-test/src/main/net/dpml/tutorial/magic/spell spells/xdoclet/tutorial spells/xdoclet/tutorial/src spells/xdoclet/tutorial/src/docs

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: dleangen AT netcompartner.com
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r1415 - in development/laboratory: cocoon-magic spells spells/cocoon spells/xdoclet spells/xdoclet/plugin spells/xdoclet/plugin-test spells/xdoclet/plugin-test/src spells/xdoclet/plugin-test/src/main spells/xdoclet/plugin-test/src/main/net spells/xdoclet/plugin-test/src/main/net/dpml spells/xdoclet/plugin-test/src/main/net/dpml/tutorial spells/xdoclet/plugin-test/src/main/net/dpml/tutorial/magic spells/xdoclet/plugin-test/src/main/net/dpml/tutorial/magic/spell spells/xdoclet/plugin/src spells/xdoclet/plugin/src/main spells/xdoclet/plugin/src/main/net spells/xdoclet/plugin/src/main/net/dpml spells/xdoclet/plugin/src/main/net/dpml/lab spells/xdoclet/plugin/src/main/net/dpml/lab/spell spells/xdoclet/plugin/src/main/net/dpml/lab/spell/xdoclet spells/xdoclet/standard-test spells/xdoclet/standard-test/src spells/xdoclet/standard-test/src/main spells/xdoclet/standard-test/src/main/net spells/xdoclet/standard-test/src/main/net/dpml spells/xdoclet/standard-test/src/main/net/dpml/tutorial spells/xdoclet/standard-test/src/main/net/dpml/tutorial/magic spells/xdoclet/standard-test/src/main/net/dpml/tutorial/magic/spell spells/xdoclet/tutorial spells/xdoclet/tutorial/src spells/xdoclet/tutorial/src/docs
  • Date: Sun, 09 Jan 2005 15:11:41 +0100

Author: dleangen
Date: Sun Jan 9 15:11:41 2005
New Revision: 1415

Added:
development/laboratory/spells/
development/laboratory/spells/build.xml
development/laboratory/spells/cocoon/
- copied from r1411, development/laboratory/cocoon-magic/
development/laboratory/spells/index.xml
development/laboratory/spells/xdoclet/
development/laboratory/spells/xdoclet/build.xml
development/laboratory/spells/xdoclet/plugin/
development/laboratory/spells/xdoclet/plugin-test/
development/laboratory/spells/xdoclet/plugin-test/build.xml

development/laboratory/spells/xdoclet/plugin-test/hibernate.build.properties
development/laboratory/spells/xdoclet/plugin-test/src/
development/laboratory/spells/xdoclet/plugin-test/src/main/
development/laboratory/spells/xdoclet/plugin-test/src/main/net/
development/laboratory/spells/xdoclet/plugin-test/src/main/net/dpml/

development/laboratory/spells/xdoclet/plugin-test/src/main/net/dpml/tutorial/

development/laboratory/spells/xdoclet/plugin-test/src/main/net/dpml/tutorial/magic/

development/laboratory/spells/xdoclet/plugin-test/src/main/net/dpml/tutorial/magic/spell/

development/laboratory/spells/xdoclet/plugin-test/src/main/net/dpml/tutorial/magic/spell/HelloWorld.hbm.xml

development/laboratory/spells/xdoclet/plugin-test/src/main/net/dpml/tutorial/magic/spell/HelloWorld.java
development/laboratory/spells/xdoclet/plugin/build.xml
development/laboratory/spells/xdoclet/plugin/src/
development/laboratory/spells/xdoclet/plugin/src/main/
development/laboratory/spells/xdoclet/plugin/src/main/net/
development/laboratory/spells/xdoclet/plugin/src/main/net/dpml/
development/laboratory/spells/xdoclet/plugin/src/main/net/dpml/lab/
development/laboratory/spells/xdoclet/plugin/src/main/net/dpml/lab/spell/

development/laboratory/spells/xdoclet/plugin/src/main/net/dpml/lab/spell/xdoclet/

development/laboratory/spells/xdoclet/plugin/src/main/net/dpml/lab/spell/xdoclet/antlib.xml
development/laboratory/spells/xdoclet/standard-test/
development/laboratory/spells/xdoclet/standard-test/build.xml

development/laboratory/spells/xdoclet/standard-test/hibernate.build.properties
development/laboratory/spells/xdoclet/standard-test/src/
development/laboratory/spells/xdoclet/standard-test/src/main/
development/laboratory/spells/xdoclet/standard-test/src/main/net/
development/laboratory/spells/xdoclet/standard-test/src/main/net/dpml/

development/laboratory/spells/xdoclet/standard-test/src/main/net/dpml/tutorial/

development/laboratory/spells/xdoclet/standard-test/src/main/net/dpml/tutorial/magic/

development/laboratory/spells/xdoclet/standard-test/src/main/net/dpml/tutorial/magic/spell/

development/laboratory/spells/xdoclet/standard-test/src/main/net/dpml/tutorial/magic/spell/HelloWorld.hbm.xml

development/laboratory/spells/xdoclet/standard-test/src/main/net/dpml/tutorial/magic/spell/HelloWorld.java
development/laboratory/spells/xdoclet/tutorial/
development/laboratory/spells/xdoclet/tutorial/build.properties
development/laboratory/spells/xdoclet/tutorial/build.xml
development/laboratory/spells/xdoclet/tutorial/src/
development/laboratory/spells/xdoclet/tutorial/src/docs/
development/laboratory/spells/xdoclet/tutorial/src/docs/create_plugin.xml
development/laboratory/spells/xdoclet/tutorial/src/docs/index.xml
development/laboratory/spells/xdoclet/tutorial/src/docs/navigation.xml
development/laboratory/spells/xdoclet/tutorial/src/docs/standard_task.xml
development/laboratory/spells/xdoclet/tutorial/src/docs/use_plugin.xml
Removed:
development/laboratory/cocoon-magic/
Log:
Creation of spells.


Added: development/laboratory/spells/build.xml
==============================================================================
--- (empty file)
+++ development/laboratory/spells/build.xml Sun Jan 9 15:11:41 2005
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<project name="laboratory-spells" default="default" basedir="."
+ xmlns:magic="antlib:net.dpml.magic">
+
+ <magic:import uri="artifact:template:dpml/magic/reactor"/>
+
+</project>

Added: development/laboratory/spells/index.xml
==============================================================================
--- (empty file)
+++ development/laboratory/spells/index.xml Sun Jan 9 15:11:41 2005
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<index>
+
+ <import uri="artifact:module:dpml/magic/dpml-magic#SNAPSHOT"/>
+ <import uri="artifact:module:dpml/metro/dpml-metro#SNAPSHOT"/>
+
+ <project basedir="./xdoclet/plugin">
+ <info>
+ <group>dpml/lab/spells/xdoclet</group>
+ <name>lab-spells-xdoclet-plugin</name>
+ <version>SNAPSHOT</version>
+ </info>
+ <dependencies>
+ <include key="ant"/>
+ <include key="dpml-magic-core"/>
+ <include key="commons-collections"/>
+ <include key="commons-logging"/>
+ <include key="log4j"/>
+ <include key="xdoclet"/>
+ <include key="xdoclet-hibernate-module"/>
+ <include key="xdoclet-xdoclet-module"/>
+ <include key="xjavadoc"/>
+ </dependencies>
+ </project>
+<!--
+ <project basedir="./xdoclet/plugin-test">
+ <info>
+ <group>dpml/lab/spells/xdoclet</group>
+ <name>lab-spells-xdoclet-plugin-test</name>
+ <type>doc</type>
+ </info>
+ <plugins>
+ <include key="dpml-magic-publish" />
+ </plugins>
+ </project>
+-->
+ <project basedir="./xdoclet/standard-test">
+ <info>
+ <group>dpml/lab/spells/xdoclet</group>
+ <name>lab-spells-xdoclet-standard-test</name>
+ <type>doc</type>
+ </info>
+ <plugins>
+ <include key="dpml-magic-publish" />
+ </plugins>
+ </project>
+
+ <project basedir="./xdoclet/tutorial">
+ <info>
+ <group>dpml/lab/spells/xdoclet</group>
+ <name>lab-spells-xdoclet-tutorial</name>
+ <type>doc</type>
+ </info>
+ <plugins>
+ <include key="dpml-magic-publish" />
+ </plugins>
+ </project>
+
+ <resource>
+ <info>
+ <group>xdoclet</group>
+ <name>xdoclet</name>
+ <version>1.2.2</version>
+ </info>
+ </resource>
+
+ <resource>
+ <info>
+ <group>xdoclet</group>
+ <name>xdoclet-hibernate-module</name>
+ <version>1.2.2</version>
+ </info>
+ </resource>
+
+ <resource>
+ <info>
+ <group>xdoclet</group>
+ <name>xdoclet-xdoclet-module</name>
+ <version>1.2.2</version>
+ </info>
+ </resource>
+
+ <resource>
+ <info>
+ <group>xjavadoc</group>
+ <name>xjavadoc</name>
+ <version>1.0.3</version>
+ </info>
+ </resource>
+
+</index>

Added: development/laboratory/spells/xdoclet/build.xml
==============================================================================
--- (empty file)
+++ development/laboratory/spells/xdoclet/build.xml Sun Jan 9 15:11:41
2005
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<project name="laboratory-spells-xdoclet-standard-test" default="default"
basedir="."
+ xmlns:magic="antlib:net.dpml.magic">
+
+ <magic:import uri="artifact:template:dpml/magic/reactor"/>
+
+</project>

Added: development/laboratory/spells/xdoclet/plugin-test/build.xml
==============================================================================
--- (empty file)
+++ development/laboratory/spells/xdoclet/plugin-test/build.xml Sun Jan 9
15:11:41 2005
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<project name="lab-spells-xdoclet-plugin-test" default="install" basedir="."
+ xmlns:magic="antlib:net.dpml.magic"
xmlns:x="plugin:dpml/magic/dpml-magic-core" >
+
+ <magic:import uri="artifact:template:dpml/magic/standard"/>
+ <property file="hibernate.build.properties"/>
+
+ <target name="install" depends="xdoclet.hibernate, standard.install"/>
+
+ <target name="xdoclet.hibernate" depends="init">
+ <magic:plugin
uri="artifact:meta:dpml/lab/spells/xdoclet/lab-spells-xdoclet-plugin#SNAPSHOT"/>
+
+ <echo message="Java dir: ${java.dir}"/>
+ <echo message="Copyright: ${copyright-holder}"/>
+ <echo message="Author: ${author}"/>
+ <echo message="Force: ${xdoclet.force}"/>
+
+ <hibernate-doclet
+ destdir="${java.dir}"
+ excludedtags="@version,@author,@todo,@see"
+ addedtags="@copyright ${copyright-holder},@author ${author}"
+ force="${xdoclet.force}"
+ verbose="true">
+
+ <fileset dir="${java.dir}">
+ <include name="**/*.java"/>
+ </fileset>
+
+ <hibernate version="2.0"/>
+
+ </hibernate-doclet>
+ </target>
+
+</project>
+

Added:
development/laboratory/spells/xdoclet/plugin-test/hibernate.build.properties
==============================================================================
--- (empty file)
+++
development/laboratory/spells/xdoclet/plugin-test/hibernate.build.properties
Sun Jan 9 15:11:41 2005
@@ -0,0 +1,5 @@
+java.dir=${basedir}/src/main
+xdoclet.lib=J:/temp/xdoclet/lib
+xdoclet.force = true
+copyright-holder=Digital Product Meta Laboratory
+author=David Leangen

Added:
development/laboratory/spells/xdoclet/plugin-test/src/main/net/dpml/tutorial/magic/spell/HelloWorld.hbm.xml
==============================================================================
--- (empty file)
+++
development/laboratory/spells/xdoclet/plugin-test/src/main/net/dpml/tutorial/magic/spell/HelloWorld.hbm.xml
Sun Jan 9 15:11:41 2005
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 2.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd";>
+
+<hibernate-mapping
+>
+ <class
+ name="net.dpml.tutorial.magic.spell.HelloWorld"
+ table="HELLO_WORLD"
+ dynamic-update="true"
+ dynamic-insert="false"
+ select-before-update="false"
+ >
+
+ <id
+ name="id"
+ column="HELLO_ID"
+ type="int"
+ >
+ <generator class="assigned">
+ <!--
+ To add non XDoclet generator parameters, create a file
named
+ hibernate-generator-params-HelloWorld.xml
+ containing the additional parameters and place it in your
merge dir.
+ -->
+ </generator>
+ </id>
+
+ <property
+ name="helloText"
+ type="java.lang.String"
+ update="true"
+ insert="true"
+ access="property"
+ column="HELLO_TEXT"
+ />
+
+ <!--
+ To add non XDoclet property mappings, create a file named
+ hibernate-properties-HelloWorld.xml
+ containing the additional properties and place it in your merge
dir.
+ -->
+
+ </class>
+
+</hibernate-mapping>

Added:
development/laboratory/spells/xdoclet/plugin-test/src/main/net/dpml/tutorial/magic/spell/HelloWorld.java
==============================================================================
--- (empty file)
+++
development/laboratory/spells/xdoclet/plugin-test/src/main/net/dpml/tutorial/magic/spell/HelloWorld.java
Sun Jan 9 15:11:41 2005
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2005 David Leangen
+ *
+ * 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 net.dpml.tutorial.magic.spell;
+
+/**
+ * This class is a very simple class for use with the "Plugin Tutorial".
+ *
+ * @hibernate.class table="HELLO_WORLD" dynamic-update="true"
+ * @author <a href="mailto:dev-dpml AT lists.ibiblio.org";>The Digital Product
Meta Library</a>
+ * @version $Id: Artifact.java 183 2004-10-23 16:53:31Z niclas $
+ */
+public class HelloWorld
+{
+
+ private int m_id;
+ private String m_helloText = "Hello World";
+
+ public HelloWorld()
+ {
+ // Default constructor
+ }
+
+ public void setId( final int id )
+ {
+ m_id = id;
+ }
+
+ /**
+ * @hibernate.id column="HELLO_ID" generator-class="assigned"
+ */
+ public int getId()
+ {
+ return m_id;
+ }
+
+ public void setHelloText( final String text )
+ {
+ m_helloText = text;
+ }
+
+ /**
+ * @hibernate.property column="HELLO_TEXT"
+ */
+ public String getHelloText()
+ {
+ return m_helloText;
+ }
+
+}
+

Added: development/laboratory/spells/xdoclet/plugin/build.xml
==============================================================================
--- (empty file)
+++ development/laboratory/spells/xdoclet/plugin/build.xml Sun Jan 9
15:11:41 2005
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<project name="lab-spells-xdoclet-plugin" default="install" basedir="."
+ xmlns:magic="antlib:net.dpml.magic"
xmlns:x="plugin:dpml/magic/dpml-magic-core" >
+
+ <magic:import uri="artifact:template:dpml/magic/standard"/>
+
+ <target name="init" depends="standard.init">
+ <x:filter feature="plugin" token="PLUGIN-URI"/>
+ </target>
+
+ <target name="package" depends="standard.package">
+ <x:export>
+ <antlib
+ resource="net/dpml/lab/spell/xdoclet/antlib.xml"
+ urn="plugin:dpml/lab/spells/xdoclet/lab-spells-xdoclet-plugin"/>
+ </x:export>
+ </target>
+
+</project>

Added:
development/laboratory/spells/xdoclet/plugin/src/main/net/dpml/lab/spell/xdoclet/antlib.xml
==============================================================================
--- (empty file)
+++
development/laboratory/spells/xdoclet/plugin/src/main/net/dpml/lab/spell/xdoclet/antlib.xml
Sun Jan 9 15:11:41 2005
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<antlib>
+
+ <!-- taskdefs -->
+ <taskdef name="hibernate-doclet"
classname="xdoclet.modules.hibernate.HibernateDocletTask"/>
+ <taskdef name="hibernate"
classname="xdoclet.modules.hibernate.HibernateSubTask"/>
+
+</antlib>

Added: development/laboratory/spells/xdoclet/standard-test/build.xml
==============================================================================
--- (empty file)
+++ development/laboratory/spells/xdoclet/standard-test/build.xml Sun
Jan 9 15:11:41 2005
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<project name="lab-spells-xdoclet-standard-test" default="install"
basedir="."
+ xmlns:magic="antlib:net.dpml.magic"
xmlns:x="plugin:dpml/magic/dpml-magic-core" >
+
+ <magic:import uri="artifact:template:dpml/magic/standard"/>
+ <property file="hibernate.build.properties"/>
+
+ <target name="install" depends="xdoclet.hibernate, standard.install"/>
+
+ <target name="xdoclet.hibernate" depends="init">
+ <taskdef
+ name="hibernate-doclet"
+ classname="xdoclet.modules.hibernate.HibernateDocletTask"
+ >
+ <classpath>
+ <fileset dir="${xdoclet.lib}">
+ <include name="**/*.jar"/>
+ </fileset>
+ </classpath>
+ </taskdef>
+
+ <echo message="Java dir: ${java.dir}"/>
+ <echo message="Copyright: ${copyright-holder}"/>
+ <echo message="Author: ${author}"/>
+ <echo message="Force: ${xdoclet.force}"/>
+
+ <hibernate-doclet
+ destdir="${java.dir}"
+ excludedtags="@version,@author,@todo,@see"
+ addedtags="@copyright ${copyright-holder},@author ${author}"
+ force="${xdoclet.force}"
+ verbose="true">
+
+ <fileset dir="${java.dir}">
+ <include name="**/*.java"/>
+ </fileset>
+
+ <hibernate version="2.0"/>
+
+ </hibernate-doclet>
+ </target>
+
+</project>
+

Added:
development/laboratory/spells/xdoclet/standard-test/hibernate.build.properties
==============================================================================
--- (empty file)
+++
development/laboratory/spells/xdoclet/standard-test/hibernate.build.properties
Sun Jan 9 15:11:41 2005
@@ -0,0 +1,5 @@
+java.dir=${basedir}/src/main
+xdoclet.lib=J:/temp/xdoclet/lib
+xdoclet.force = true
+copyright-holder=Digital Product Meta Laboratory
+author=David Leangen

Added:
development/laboratory/spells/xdoclet/standard-test/src/main/net/dpml/tutorial/magic/spell/HelloWorld.hbm.xml
==============================================================================
--- (empty file)
+++
development/laboratory/spells/xdoclet/standard-test/src/main/net/dpml/tutorial/magic/spell/HelloWorld.hbm.xml
Sun Jan 9 15:11:41 2005
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 2.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd";>
+
+<hibernate-mapping
+>
+ <class
+ name="net.dpml.tutorial.magic.spell.HelloWorld"
+ table="HELLO_WORLD"
+ dynamic-update="true"
+ dynamic-insert="false"
+ select-before-update="false"
+ >
+
+ <id
+ name="id"
+ column="HELLO_ID"
+ type="int"
+ >
+ <generator class="assigned">
+ <!--
+ To add non XDoclet generator parameters, create a file
named
+ hibernate-generator-params-HelloWorld.xml
+ containing the additional parameters and place it in your
merge dir.
+ -->
+ </generator>
+ </id>
+
+ <property
+ name="helloText"
+ type="java.lang.String"
+ update="true"
+ insert="true"
+ access="property"
+ column="HELLO_TEXT"
+ />
+
+ <!--
+ To add non XDoclet property mappings, create a file named
+ hibernate-properties-HelloWorld.xml
+ containing the additional properties and place it in your merge
dir.
+ -->
+
+ </class>
+
+</hibernate-mapping>

Added:
development/laboratory/spells/xdoclet/standard-test/src/main/net/dpml/tutorial/magic/spell/HelloWorld.java
==============================================================================
--- (empty file)
+++
development/laboratory/spells/xdoclet/standard-test/src/main/net/dpml/tutorial/magic/spell/HelloWorld.java
Sun Jan 9 15:11:41 2005
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2005 David Leangen
+ *
+ * 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 net.dpml.tutorial.magic.spell;
+
+/**
+ * This class is a very simple class for use with the "Plugin Tutorial".
+ *
+ * @hibernate.class table="HELLO_WORLD" dynamic-update="true"
+ * @author <a href="mailto:dev-dpml AT lists.ibiblio.org";>The Digital Product
Meta Library</a>
+ * @version $Id: Artifact.java 183 2004-10-23 16:53:31Z niclas $
+ */
+public class HelloWorld
+{
+
+ private int m_id;
+ private String m_helloText = "Hello World";
+
+ public HelloWorld()
+ {
+ // Default constructor
+ }
+
+ public void setId( final int id )
+ {
+ m_id = id;
+ }
+
+ /**
+ * @hibernate.id column="HELLO_ID" generator-class="assigned"
+ */
+ public int getId()
+ {
+ return m_id;
+ }
+
+ public void setHelloText( final String text )
+ {
+ m_helloText = text;
+ }
+
+ /**
+ * @hibernate.property column="HELLO_TEXT"
+ */
+ public String getHelloText()
+ {
+ return m_helloText;
+ }
+
+}
+

Added: development/laboratory/spells/xdoclet/tutorial/build.properties
==============================================================================
--- (empty file)
+++ development/laboratory/spells/xdoclet/tutorial/build.properties Sun
Jan 9 15:11:41 2005
@@ -0,0 +1,6 @@
+project.docs.anchor.url =
https://paris.apache.org/svn/metro/main/central/site/src/xdocs
+project.docs.logo.left.file = images/globe.png
+
+project.javadoc.enabled = true
+
+dpml.magic.build.process=standard

Added: development/laboratory/spells/xdoclet/tutorial/build.xml
==============================================================================
--- (empty file)
+++ development/laboratory/spells/xdoclet/tutorial/build.xml Sun Jan 9
15:11:41 2005
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<project name="lab-spells-xdoclet-tutorial" default="update" basedir="."
+ xmlns:magic="antlib:net.dpml.magic"
+ xmlns:x="plugin:dpml/magic/dpml-magic-core" >
+
+ <magic:import uri="artifact:template:dpml/magic/standard"/>
+
+ <target name="init" depends="standard.init">
+ <x:filter key="dpml-metro-main" feature="version"
+ token="RUNTIME-VERSION"/>
+ <x:filter key="dpml-logging-api" feature="spec"
+ token="LOGGING-API-SPEC"/>
+ <x:filter key="dpml-activity-api" feature="spec"
+ token="ACTIVITY-API-SPEC"/>
+ <x:filter key="dpml-configuration-api" feature="spec"
+ token="CONFIGURATION-API-SPEC"/>
+ <x:filter key="dpml-service-api" feature="spec"
+ token="SERVICE-API-SPEC"/>
+ <x:filter key="dpml-system-impl" feature="plugin"
+ token="SYSTEM-PLUGIN-URI"/>
+ <x:filter key="dpml-composition-impl" feature="plugin"
+ token="COMPOSITION-PLUGIN-URI"/>
+ <x:filter key="dpml-logging-logkit-impl" feature="plugin"
+ token="LOGGING-LOGKIT-PLUGIN-URI"/>
+ <x:filter key="dpml-logging-log4j" feature="plugin"
+ token="LOGGING-LOG4J-PLUGIN-URI"/>
+ <x:filter key="dpml-activation-impl" feature="plugin"
+ token="RUNTIME-PLUGIN-URI"/>
+ <x:filter key="dpml-activation-avalon-provider" feature="plugin"
+ token="AVALON-RUNTIME-PLUGIN-URI"/>
+ <x:filter key="dpml-activation-metro-provider" feature="plugin"
+ token="METRO-RUNTIME-PLUGIN-URI"/>
+ <x:filter key="dpml-metro-main" feature="plugin"
+ token="METRO-PLUGIN-URI"/>
+ <x:filter key="dpml-magic-core" feature="plugin"
token="MAGIC-PLUGIN-URI"/>
+ <x:filter key="dpml-transit-plugin" feature="plugin"
token="TRANSIT-PLUGIN-URI"/>
+ <x:filter key="dpml-transit" feature="api" token="TRANSIT-DOCS-PATH"/>
+ <x:filter key="dpml-magic" feature="api" token="MAGIC-DOCS-PATH"/>
+ <x:filter key="dpml-metro" feature="api" token="METRO-JAVADOC-PATH"/>
+ </target>
+
+ <target name="javadoc" depends="prepare"/>
+
+ <target name="docs" depends="prepare">
+ <x:property name="spec" feature="plugin" key="dpml-magic-doc"/>
+ <magic:plugin uri="${spec}">
+ <task class="net.dpml.magic.doc.DocTask" name="docs"/>
+ </magic:plugin>
+ <docs/>
+ </target>
+
+ <target name="update" depends="docs">
+ <publish xmlns="plugin:dpml/magic/dpml-magic-publish"
path="dpml/laboratory/spells/xdoclet"/>
+ </target>
+
+ <target name="install" depends="docs"/>
+
+</project>
+

Added:
development/laboratory/spells/xdoclet/tutorial/src/docs/create_plugin.xml
==============================================================================
--- (empty file)
+++ development/laboratory/spells/xdoclet/tutorial/src/docs/create_plugin.xml
Sun Jan 9 15:11:41 2005
@@ -0,0 +1,217 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document>
+ <properties>
+ <author email="dleangen AT dpml.net">David Leangen</author>
+ <title>DPML Tutorials</title>
+ </properties>
+
+ <body>
+ <section name="Plugin Tutorial">
+
+ <subsection name="Creating the Plugin">
+ <p>
+ In this section, we will be creating the XDoclet plugin for our
+ sample Hibernate project. With the plugin installed, we will no
longer
+ have to worry about managing dependencies, as this will be taken
care of
+ by Magic.
+ </p>
+
+ <p>
+ This step involves the following tasks:
+ <ol>
+ <li>Modifying the index.xml file</li>
+ <li>Creating the build.xml file</li>
+ <li>Creating the antlib.xml file</li>
+ </ol>
+ </p>
+
+ <subsection name="Modifying the index.xml File">
+ <p>
+ Our first task is to modify our index.xml file to include our
plugin
+ project. We need to add the following:
+ </p>
+
+ <source>
+ &lt;import uri="artifact:module:dpml/metro/dpml-metro#SNAPSHOT"/&gt;
+
+ &lt;project basedir="./xdoclet/plugin"&gt;
+ &lt;info&gt;
+ &lt;group&gt;dpml/lab/spells/xdoclet&lt;/group&gt;
+ &lt;name&gt;lab-spells-xdoclet-plugin&lt;/name&gt;
+ &lt;version&gt;SNAPSHOT&lt;/version&gt;
+ &lt;/info&gt;
+ &lt;dependencies&gt;
+ &lt;include key="ant"/&gt;
+ &lt;include key="dpml-magic-core"/&gt;
+ &lt;include key="commons-collections"/&gt;
+ &lt;include key="commons-logging"/&gt;
+ &lt;include key="log4j"/&gt;
+ &lt;include key="xdoclet"/&gt;
+ &lt;include key="xdoclet-hibernate-module"/&gt;
+ &lt;include key="xdoclet-xdoclet-module"/&gt;
+ &lt;include key="xjavadoc"/&gt;
+ &lt;/dependencies&gt;
+ &lt;/project&gt;
+
+ &lt;resource&gt;
+ &lt;info&gt;
+ &lt;group&gt;xdoclet&lt;/group&gt;
+ &lt;name&gt;xdoclet&lt;/name&gt;
+ &lt;version&gt;1.2.2&lt;/version&gt;
+ &lt;/info&gt;
+ &lt;/resource&gt;
+
+ &lt;resource&gt;
+ &lt;info&gt;
+ &lt;group&gt;xdoclet&lt;/group&gt;
+ &lt;name&gt;xdoclet-hibernate-module&lt;/name&gt;
+ &lt;version&gt;1.2.2&lt;/version&gt;
+ &lt;/info&gt;
+ &lt;/resource&gt;
+
+ &lt;resource&gt;
+ &lt;info&gt;
+ &lt;group&gt;xdoclet&lt;/group&gt;
+ &lt;name&gt;xdoclet-xdoclet-module&lt;/name&gt;
+ &lt;version&gt;1.2.2&lt;/version&gt;
+ &lt;/info&gt;
+ &lt;/resource&gt;
+
+ &lt;resource&gt;
+ &lt;info&gt;
+ &lt;group&gt;xjavadoc&lt;/group&gt;
+ &lt;name&gt;xjavadoc&lt;/name&gt;
+ &lt;version&gt;1.0.3&lt;/version&gt;
+ &lt;/info&gt;
+ &lt;/resource&gt;
+ </source>
+
+ <p>
+ We did not need to add all the resources declared as dependencies
+ thanks to the import statement:
+ </p>
+
+ <source>&lt;import
uri="artifact:module:dpml/metro/dpml-metro#SNAPSHOT"/&gt;</source>
+
+ <p>
+ Note that the list of dependencies contains all the files in our
+ ${xdoclet.lib} directory, as well as a few additional
dependencies generally
+ required when creating a plugin.
+ </p>
+
+ </subsection>
+
+ <subsection name="Creating the build.xml File">
+ <p>
+ Our build.xml file looks like the following.
+ </p>
+
+ <source>
+&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
+
+&lt;project name="lab-spells-xdoclet-plugin" default="install" basedir="."
+ xmlns:magic="antlib:net.dpml.magic"
xmlns:x="plugin:dpml/magic/dpml-magic-core" &gt;
+
+ &lt;magic:import uri="artifact:template:dpml/magic/standard"/&gt;
+
+ &lt;target name="init" depends="standard.init"&gt;
+ &lt;x:filter feature="plugin" token="PLUGIN-URI"/&gt;
+ &lt;/target&gt;
+
+ &lt;target name="package" depends="standard.package"&gt;
+ &lt;x:export&gt;
+ &lt;antlib
+ resource="net/dpml/lab/spell/xdoclet/antlib.xml"
+ urn="plugin:dpml/lab/spells/xdoclet/lab-spells-xdoclet-plugin"/&gt;
+ &lt;/x:export&gt;
+ &lt;/target&gt;
+
+&lt;/project&gt;
+ </source>
+
+ <p>
+ The "&lt;x:export&gt;" statement in the build file creates the
following meta file:
+ </p>
+
+ <source>
+#
+# Meta classifier.
+#
+meta.domain = net.dpml
+meta.version = 1.0
+
+#
+# Artifact descriptor.
+#
+dpml.artifact.group = dpml/lab/spells/xdoclet
+dpml.artifact.name = lab-spells-xdoclet-plugin
+dpml.artifact.version = SNAPSHOT
+dpml.artifact.signature = 20050109.133734
+
+#
+# Antlib.
+#
+dpml.plugin.resource = net/dpml/lab/spell/xdoclet/antlib.xml
+dpml.plugin.urn = plugin:dpml/lab/spells/xdoclet/lab-spells-xdoclet-plugin
+
+#
+# Implementation dependencies.
+#
+dpml.artifact.dependency.0 = artifact:jar:ant/ant#1.6.2
+dpml.artifact.dependency.1 = artifact:jar:dpml/magic/dpml-magic-core#SNAPSHOT
+dpml.artifact.dependency.2 =
artifact:jar:dpml/magic/dpml-magic-bootstrap#SNAPSHOT
+dpml.artifact.dependency.3 =
artifact:jar:dpml/transit/dpml-transit-main#SNAPSHOT
+dpml.artifact.dependency.4 = artifact:jar:ant/ant-junit#1.6.2
+dpml.artifact.dependency.5 = artifact:jar:junit/junit#3.8.1
+dpml.artifact.dependency.6 =
artifact:jar:commons-collections/commons-collections#3.1
+dpml.artifact.dependency.7 =
artifact:jar:commons-logging/commons-logging#1.0.4
+dpml.artifact.dependency.8 = artifact:jar:log4j/log4j#1.2.8
+dpml.artifact.dependency.9 = artifact:jar:xdoclet/xdoclet#1.2.2
+dpml.artifact.dependency.10 =
artifact:jar:xdoclet/xdoclet-hibernate-module#1.2.2
+dpml.artifact.dependency.11 =
artifact:jar:xdoclet/xdoclet-xdoclet-module#1.2.2
+dpml.artifact.dependency.12 = artifact:jar:xjavadoc/xjavadoc#1.0.3
+dpml.artifact.dependency.13 =
artifact:jar:dpml/lab/spells/xdoclet/lab-spells-xdoclet-plugin#SNAPSHOT
+
+#
+# EOF.
+#
+ </source>
+
+ <p>
+ This meta file contains all the information required when
referencing a
+ plugin from a Magic project.
+ </p>
+ </subsection>
+
+ <subsection name="Creating the antlib.xml File">
+ <p>
+ The final step is creating the actual antlib file that declares
our
+ tasks. In this project, we have declared our antlib file as
residing
+ at "net/dpml/lab/spell/xdoclet/antlib.xml". We therefore need to
create
+ the antlib.xml file in the directory
"src/main/net/dpml/lab/spell/xdoclet".
+ </p>
+
+ <source>
+&lt;?xml version="1.0"?&gt;
+&lt;antlib&gt;
+
+ &lt;!-- taskdefs --&gt;
+ &lt;taskdef name="hibernate-doclet"
classname="xdoclet.modules.hibernate.HibernateDocletTask"/&gt;
+ &lt;taskdef name="hibernate"
classname="xdoclet.modules.hibernate.HibernateSubTask"/&gt;
+
+&lt;/antlib&gt;
+ </source>
+ </subsection>
+
+ </subsection>
+
+ <p>
+ &lt;&lt; <a href="standard_task.html">Previous</a> | <a
href="use_plugin.html">Next &gt;&gt;</a>
+ </p>
+
+ </section>
+
+ </body>
+</document>
+

Added: development/laboratory/spells/xdoclet/tutorial/src/docs/index.xml
==============================================================================
--- (empty file)
+++ development/laboratory/spells/xdoclet/tutorial/src/docs/index.xml Sun
Jan 9 15:11:41 2005
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document>
+ <properties>
+ <author email="dleangen AT dpml.net">David Leangen</author>
+ <title>DPML Tutorials</title>
+ </properties>
+
+ <body>
+ <section name="Plugin Tutorial">
+
+ <p role="intro">
+ This tutorial will provide you with a concrete example of how
+ to create a Magic plugin from an existing application.
+ </p>
+
+ <subsection name="Overview">
+ <p>
+ For this tutorial, we will create a plugin from a popular
open-source tool
+ called "XDoclet". XDoclet is a tool that allows you to build on
the Java
+ Doclet tool to use "@xxx" tags in your Javadoc comments. Based on
the tags,
+ XDoclet will generate some type of output. For more information,
see:
+ <a
href="http://xdoclet.sourceforge.net/xdoclet/index.html";>http://xdoclet.sourceforge.net/xdoclet/index.html</a>.
+ For this tutorial, we are using version 1.2.2.
+ </p>
+
+ <p>
+ Since XDoclet provides many different types of doclet tasks, for
simplicity,
+ we will focus our efforts on one particular task: generating
Hibernate
+ descriptor files.
+ </p>
+
+ <p>
+ Hibernate (<a
href="http://www.hibernate.org/";>http://www.hibernate.org/</a>)
+ is another open source project that provides a persistence layer
for
+ <a href="#">POJOs</a>. Understanding Hibernate is not necessary
for this
+ tutorial. All the reader needs to know is that, based on "@xxx"
tags
+ written into some Java code, XDoclet should produce an XML file as
+ output. The focus here is on how to adapt the XDoclet system to be
used
+ as a Magic plugin.
+ </p>
+ </subsection>
+
+ <subsection name="Requirements">
+ <p>
+ Before starting this tutorial, ensure that:
+ <ul>
+ <li><a href="#">Magic</a> is correctly installed on your
system</li>
+ <li>you understand the essentials of how to use Magic</li>
+ <li>
+ you are familiar with Ant and have at least some notion of
+ how to create an Ant task
+ </li>
+ <li>anything else???</li>
+ </ul>
+ </p>
+ </subsection>
+
+ <subsection name="Contents">
+ This tutorial contains the following sections:
+ <ol>
+ <li><a href="standard_task.html">Setting up XDoclet as a standard
Ant task</a></li>
+ <li><a href="create_plugin.html">Create the plugin</a></li>
+ <li><a href="use_plugin.html">Use the plugin from your project
build</a></li>
+ </ol>
+ </subsection>
+
+ <p>
+ &lt;&lt; Previous | <a href="standard_task.html">Next &gt;&gt;</a>
+ </p>
+
+ </section>
+
+ </body>
+</document>
+

Added: development/laboratory/spells/xdoclet/tutorial/src/docs/navigation.xml
==============================================================================
--- (empty file)
+++ development/laboratory/spells/xdoclet/tutorial/src/docs/navigation.xml
Sun Jan 9 15:11:41 2005
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Copyright 2005 David Leangen
+
+ 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.dpml.net/central/about/legal/
+
+ 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.
+-->
+
+<project>
+
+ <title>DPML</title>
+
+ <body>
+
+ <links>
+ <!--<item name="Services" href="services/index.html"/>-->
+ </links>
+
+ <menu>
+ <item name="Overview" href="index.html"/>
+ <item name="Standard Task" href="standard_task.html"/>
+ <item name="Create Plugin" href="create_plugin.html"/>
+ <item name="Use Plugin" href="use_plugin.html"/>
+
+ <sponsors>
+ <sponsor>
+ </sponsor>
+ </sponsors>
+ </menu>
+
+ </body>
+
+</project>

Added:
development/laboratory/spells/xdoclet/tutorial/src/docs/standard_task.xml
==============================================================================
--- (empty file)
+++ development/laboratory/spells/xdoclet/tutorial/src/docs/standard_task.xml
Sun Jan 9 15:11:41 2005
@@ -0,0 +1,296 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document>
+ <properties>
+ <author email="dleangen AT dpml.net">David Leangen</author>
+ <title>DPML Tutorials</title>
+ </properties>
+
+ <body>
+ <section name="Plugin Tutorial">
+
+ <subsection name="Setting up XDoclet as a standard Ant task">
+ <p>
+ Before attempting to install XDoclet as a Magic plugin, we will
first
+ ensure that XDoclet is properly set up and can be run as a standard
+ Ant task.
+ </p>
+
+ <p>
+ This step involves the following tasks:
+ <ol>
+ <li>Download and install the XDoclet JAR files</li>
+ <li>Create a project build.xml file</li>
+ <li>Create a hibernate.build.properties file</li>
+ <li>Create an index.xml file for the project</li>
+ <li>Create a HelloWorld Java class</li>
+ <li>Run and test the build</li>
+ </ol>
+ </p>
+
+ <subsection name="Installing XDoclet">
+ <p>
+ First, download the XDoclet binaries from the <a href="">XDoclet
website</a>.
+ Install all the related JAR files in a directory. For this
tutorial, we will
+ assume that you are have installed the JARs in a folder called
${xdoclet.lib}.
+ </p>
+
+ <p>
+ In particular, you need to ensure that the following JARs are
installed:
+ <ul>
+ <li>commons-collections-2.0.jar</li>
+ <li>commons-logging.jar</li>
+ <li>log4j.jar</li>
+ <li>xdoclet-1.2.2.jar</li>
+ <li>xdoclet-hibernate-module-1.2.2.jar</li>
+ <li>xdoclet-xdoclet-module-1.2.2.jar</li>
+ <li>xjavadoc-1.0.3.jar</li>
+ </ul>
+ </p>
+
+ <p>
+ Note that we have renamed the JARs to be consistent with Magic
+ naming schemes.
+ </p>
+ </subsection>
+
+ <subsection name="Create the build.xml file">
+ <p>
+ Create a build.xml file such as the following:
+ </p>
+
+ <source>
+&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
+
+&lt;project name="lab-spells-xdoclet-standard-test"
+ default="install" basedir="."
+ xmlns:magic="antlib:net.dpml.magic"
+ xmlns:x="plugin:dpml/magic/dpml-magic-core" &gt;
+
+ &lt;magic:import uri="artifact:template:dpml/magic/standard"/&gt;
+ &lt;property file="hibernate.build.properties"/&gt;
| [1]
+
+ &lt;target name="install" depends="xdoclet.hibernate,
standard.install"/&gt; | [2]
+
+ &lt;target name="xdoclet.hibernate" depends="init"&gt;
+ &lt;taskdef
|
+ name="hibernate-doclet" |
+ classname="xdoclet.modules.hibernate.HibernateDocletTask" |
+ &gt;
|
+ &lt;classpath&gt;
| [3]
+ &lt;fileset dir="${xdoclet.lib}"&gt;
|
+ &lt;include name="**/*.jar"/&gt;
|
+ &lt;/fileset&gt;
|
+ &lt;/classpath&gt;
|
+ &lt;/taskdef&gt;
|
+
+ &lt;echo message="Java dir: ${java.dir}"/&gt;
|
+ &lt;echo message="Copyright: ${copyright-holder}"/&gt;
| [4]
+ &lt;echo message="Author: ${author}"/&gt;
|
+ &lt;echo message="Force: ${xdoclet.force}"/&gt;
|
+
+ &lt;hibernate-doclet
|
+ destdir="${java.dir}" |
+ excludedtags="@version,@author,@todo,@see" |
+ addedtags="@copyright ${copyright-holder},@author ${author}" |
+ force="${xdoclet.force}" |
+ verbose="true"&gt;
|
+ |
[5]
+ &lt;fileset dir="${java.dir}"&gt;
|
+ &lt;include name="**/*.java"/&gt;
|
+ &lt;/fileset&gt;
|
+ |
+ &lt;hibernate version="2.0"/&gt;
|
+ |
+ &lt;/hibernate-doclet&gt;
|
+ &lt;/target&gt;
+
+&lt;/project&gt;
+ </source>
+
+ <p>
+ Notes:
+ <ol>
+ <li>
+ We will create this file in the next step. The
hibernate.build.properties
+ file will contain some additional information needed for
this build.
+ </li>
+
+ <li>
+ We will build on the standard Magic task "install" by
creating a dependent
+ task called "xdoclet.hibernate". It is in the
xdoclet.hibernate task that
+ we will call our custom task.
+ </li>
+
+ <li>
+ This is a standard Ant task declaration. The
hibernate-doclet task is
+ defined by the class
xdoclet.modules.hibernate.HibernateDocletTask
+ contained in the XDoclet library. For more information about
creating
+ Ant tasks, refer to the
+ <a href="http://ant.apache.org/manual/index.html";>Ant
documentation</a>.
+ </li>
+
+ <li>
+ We simply included some verbose information to make sure
that our
+ project properties are correct.
+ </li>
+
+ <li>
+ This is the hibernate-doclet task. Again, since the focus of
this
+ tutorial is not about understanding Hibernate, there is no
need
+ to understand the details of this task. As long as you copy
everything
+ verbatim, this should work fine.
+ </li>
+ </ol>
+ </p>
+ </subsection>
+
+ <subsection name="Create the hibernate.build.properties file">
+ <p>
+ Create the file hibernate.build.properties and adjust the values
+ as necessary.
+ </p>
+
+ <source>
+java.dir=${basedir}/src/main
+xdoclet.lib=C:/xdoclet/lib
+xdoclet.force = true
+copyright-holder=Digital Product Meta Laboratory
+author=David Leangen
+ </source>
+ </subsection>
+
+ <subsection name="Create an index.xml File for the Project">
+ <p>
+ Create an index.xml file for the project in standard Magic
fashon.
+ </p>
+
+ <source>
+&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
+
+&lt;index&gt;
+
+ &lt;import uri="artifact:module:dpml/magic/dpml-magic#SNAPSHOT"/&gt;
+
+ &lt;project basedir="./xdoclet/standard-test"&gt;
+ &lt;info&gt;
+ &lt;group&gt;dpml/lab/spells/xdoclet&lt;/group&gt;
+ &lt;name&gt;lab-spells-xdoclet-standard-test&lt;/name&gt;
+ &lt;type&gt;doc&lt;/type&gt;
+ &lt;/info&gt;
+ &lt;plugins&gt;
+ &lt;include key="dpml-magic-publish" /&gt;
+ &lt;/plugins&gt;
+ &lt;/project&gt;
+
+&lt;/index&gt;
+ </source>
+ </subsection>
+
+ <subsection name="Create the HelloWorld Java class">
+ <p>
+ The following is a very simple Java class that contains
+ tags necessary for generating a Hibernate descriptor file.
+ </p>
+
+ <source>
+/*
+ * Copyright 2005 David Leangen
+ *
+ * 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 net.dpml.tutorial.magic.spell;
+
+/**
+ * This class is a very simple class for use with the "Plugin Tutorial".
+ *
+ * @hibernate.class table="HELLO_WORLD" dynamic-update="true"
+ * @author <a href="mailto:dev-dpml AT lists.ibiblio.org";>The Digital Product
Meta Library</a>
+ */
+public class HelloWorld
+{
+
+ private int m_id;
+ private String m_helloText = "Hello World";
+
+ public HelloWorld()
+ {
+ // Default constructor
+ }
+
+ public void setId( final int id )
+ {
+ m_id = id;
+ }
+
+ /**
+ * @hibernate.id column="HELLO_ID" generator-class="assigned"
+ */
+ public int getId()
+ {
+ return m_id;
+ }
+
+ public void setHelloText( final String text )
+ {
+ m_helloText = text;
+ }
+
+ /**
+ * @hibernate.property column="HELLO_TEXT"
+ */
+ public String getHelloText()
+ {
+ return m_helloText;
+ }
+
+}
+
+ </source>
+ </subsection>
+
+ <subsection name="Run and Test the Build">
+ <p>
+ Now, run the build in standard Magic fashion with the following
command:
+ </p>
+
+ <source>$ ant</source>
+
+ <p>
+ If all went well, you should now have a file called
HelloWorld.hbm.xml along
+ side your HelloWorld source file.
+ </p>
+
+ <p>
+ Do not worry about the contents of the file: they are not
important for this
+ tutorial. The only thing that matters is that the file was
correctly generated.
+ If you did encounter problems generating the file, but sure to
drop us a line
+ at <a
href="mailto:support-dpml AT lists.ibiblio.org";>support-dpml AT lists.ibiblio.org</a>.
+ We'd love to hear from you!
+ </p>
+ </subsection>
+
+ </subsection>
+
+ <p>
+ &lt;&lt; <a href="index.html">Previous</a> | <a
href="create_plugin.html">Next &gt;&gt;</a>
+ </p>
+
+ </section>
+
+ </body>
+</document>
+

Added: development/laboratory/spells/xdoclet/tutorial/src/docs/use_plugin.xml
==============================================================================
--- (empty file)
+++ development/laboratory/spells/xdoclet/tutorial/src/docs/use_plugin.xml
Sun Jan 9 15:11:41 2005
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document>
+ <properties>
+ <author email="dleangen AT dpml.net">David Leangen</author>
+ <title>DPML Tutorials</title>
+ </properties>
+
+ <body>
+ <section name="Plugin Tutorial">
+
+
+ <subsection name="Using the Plugin">
+ <p>
+ Now all we have left to do is use the plugin we just created.
+ We have already done most of the work when we tested our task
+ as a standard Ant task.
+ </p>
+
+ <p>
+ This step involves only the following simple tasks:
+ <ol>
+ <li>Modifying the build.xml file</li>
+ <li>Running the buld</li>
+ </ol>
+ </p>
+
+ <subsection name="Modifying the build.xml File">
+ <p>
+ You can modify the build file or copy the entire project
+ to a new location in order to keep the working project as
+ a reference. In our case, we copied the project to a new
+ project called "lab-spells-xdoclet-plugin-test".
+ </p>
+
+ <p>
+ We only need to modify a few lines of the build.xml file so it
+ becomes:
+ </p>
+
+ <source>
+&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
+
+&lt;project name="lab-spells-xdoclet-plugin-test"
+ default="install" basedir="."
+ xmlns:magic="antlib:net.dpml.magic"
+ xmlns:x="plugin:dpml/magic/dpml-magic-core" &gt;
+
+ &lt;magic:import uri="artifact:template:dpml/magic/standard"/&gt;
+ &lt;property file="hibernate.build.properties"/&gt;
+
+ &lt;target name="install" depends="xdoclet.hibernate,
standard.install"/&gt;
+
+ &lt;target name="xdoclet.hibernate" depends="init"&gt;
+ &lt;magic:plugin
| ***
+
uri="artifact:meta:dpml/lab/spells/xdoclet/lab-spells-xdoclet-plugin#SNAPSHOT"/&gt;
|
+
+ &lt;echo message="Java dir: ${java.dir}"/&gt;
+ &lt;echo message="Copyright: ${copyright-holder}"/&gt;
+ &lt;echo message="Author: ${author}"/&gt;
+ &lt;echo message="Force: ${xdoclet.force}"/&gt;
+
+ &lt;hibernate-doclet
+ destdir="${java.dir}"
+ excludedtags="@version,@author,@todo,@see"
+ addedtags="@copyright ${copyright-holder},@author ${author}"
+ force="${xdoclet.force}"
+ verbose="true"&gt;
+
+ &lt;fileset dir="${java.dir}"&gt;
+ &lt;include name="**/*.java"/&gt;
+ &lt;/fileset&gt;
+
+ &lt;hibernate version="2.0"/&gt;
+
+ &lt;/hibernate-doclet&gt;
+ &lt;/target&gt;
+
+&lt;/project&gt;
+ </source>
+ </subsection>
+
+ <subsection name="Running the Build">
+ <p>
+ Running the build is this simple!
+ </p>
+
+ <source>$ ant</source>
+ </subsection>
+
+ </subsection>
+
+ <p>
+ &lt;&lt; <a href="create_plugin.html">Previous</a>
+ </p>
+
+ </section>
+
+ </body>
+</document>
+



  • svn commit: r1415 - in development/laboratory: cocoon-magic spells spells/cocoon spells/xdoclet spells/xdoclet/plugin spells/xdoclet/plugin-test spells/xdoclet/plugin-test/src spells/xdoclet/plugin-test/src/main spells/xdoclet/plugin-test/src/main/net spells/xdoclet/plugin-test/src/main/net/dpml spells/xdoclet/plugin-test/src/main/net/dpml/tutorial spells/xdoclet/plugin-test/src/main/net/dpml/tutorial/magic spells/xdoclet/plugin-test/src/main/net/dpml/tutorial/magic/spell spells/xdoclet/plugin/src spells/xdoclet/plugin/src/main spells/xdoclet/plugin/src/main/net spells/xdoclet/plugin/src/main/net/dpml spells/xdoclet/plugin/src/main/net/dpml/lab spells/xdoclet/plugin/src/main/net/dpml/lab/spell spells/xdoclet/plugin/src/main/net/dpml/lab/spell/xdoclet spells/xdoclet/standard-test spells/xdoclet/standard-test/src spells/xdoclet/standard-test/src/main spells/xdoclet/standard-test/src/main/net spells/xdoclet/standard-test/src/main/net/dpml spells/xdoclet/standard-test/src/main/net/dpml/tutorial spells/xdoclet/standard-test/src/main/net/dpml/tutorial/magic spells/xdoclet/standard-test/src/main/net/dpml/tutorial/magic/spell spells/xdoclet/tutorial spells/xdoclet/tutorial/src spells/xdoclet/tutorial/src/docs, dleangen, 01/09/2005

Archive powered by MHonArc 2.6.24.

Top of Page