svn commit: rev 21619 - in avalon/trunk: central/site/src/xdocs/central/tools/magic central/site/src/xdocs/central/tools/magic/spells tools tools/magic

[email protected]
Newsgroups gmane.comp.jakarta.avalon.cvs
Message-ID <[email protected]>
Author: mcconnell
Date: Wed Jun 23 22:09:33 2004
New Revision: 21619

Modified:
   avalon/trunk/central/site/src/xdocs/central/tools/magic/installation.xml
   avalon/trunk/central/site/src/xdocs/central/tools/magic/spells/index-creation.xml
   avalon/trunk/central/site/src/xdocs/central/tools/magic/spells/my-first-spell.xml
   avalon/trunk/tools/build.xml
   avalon/trunk/tools/magic/build.xml
Log:
doc updates and some fidling with magic to get a demo into the bar

Modified: avalon/trunk/central/site/src/xdocs/central/tools/magic/installation.xml
==============================================================================
--- avalon/trunk/central/site/src/xdocs/central/tools/magic/installation.xml	(original)
+++ avalon/trunk/central/site/src/xdocs/central/tools/magic/installation.xml	Wed Jun 23 22:09:33 2004
@@ -23,13 +23,13 @@
       <subsection name="Magic Setup">
 
         <p>
-        Using MAGIC_HOME ...
+        Using <strong>MAGIC_HOME</strong> ...
         </p>
 
         <p>
         Magic registers content in a common repository. If you want to 
         share the repository with Merlin or other repository enabled products
-        you should define the MAGIC_HOME environment variable with a value 
+        you should define the <code>MAGIC_HOME</code> environment variable with a value 
         pointing to a directory within which the repository will be created.  If 
         undefined, the installation will create the magic installation in 
         ${user.home}/.magic.
@@ -48,10 +48,11 @@
 </source>
 
         <p>
-        The above command invokes the ant 
-        which downloads the magic library and installs this under 
-        ${user.home}/.ant/lib.  It also checks for the presence of Junit
-        libraries and will download these if required.
+        The above command invokes ant.  Ant will downloads the magic 
+        library and installs this under ${user.home}/.ant/lib as an antlib 
+        extension.  In addition the procedure will also check for the 
+        presence of JUnit libraries in Ant's claspath and if required the 
+        necessary jar files will be download and installed.
         </p>
 
       </subsection>

Modified: avalon/trunk/central/site/src/xdocs/central/tools/magic/spells/index-creation.xml
==============================================================================
--- avalon/trunk/central/site/src/xdocs/central/tools/magic/spells/index-creation.xml	(original)
+++ avalon/trunk/central/site/src/xdocs/central/tools/magic/spells/index-creation.xml	Wed Jun 23 22:09:33 2004
@@ -9,7 +9,42 @@
   <body>
     <section name="Creating a project index.">
 
-      <p>IN PREPARATION</p>
+      <p>
+      A magic buildfile gets information about the project it is 
+      building from an index file.  The following example shows 
+      a minimal index file containing two projects. The 
+      example is available under your merlin installation main
+      repository (sub-directory avalon/tools/demos) or alternatively
+      from <code><a href="http://www.dpml.net/avalon/tools/demos/demo.zip">
+      ${magic.home}/main/avalon/tools/demos/demo.zip</a></code>.
+      </p>
+
+      <p><i>index.xml</i></p>
+
+<source><![CDATA[
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<system>
+
+  <project basedir="gizmo">
+    <info>
+      <group>demo</group>
+      <name>gizmo</name>
+    </info>
+  </project>
+
+  <project basedir="widget">
+    <info>
+      <group>demo</group>
+      <name>widget</name>
+    </info>
+    <dependencies>
+      <include key="gizmo"/>
+    </dependencies>
+  </project>
+
+</system>
+ ]]></source>
 
     </section>
   </body>

Modified: avalon/trunk/central/site/src/xdocs/central/tools/magic/spells/my-first-spell.xml
==============================================================================
--- avalon/trunk/central/site/src/xdocs/central/tools/magic/spells/my-first-spell.xml	(original)
+++ avalon/trunk/central/site/src/xdocs/central/tools/magic/spells/my-first-spell.xml	Wed Jun 23 22:09:33 2004
@@ -9,7 +9,107 @@
   <body>
     <section name="My First Spell">
 
-      <p>IN PREPARATION</p>
+      <p>
+      Unpack the demo and you will see a root directory containing
+      an index and two sub-directories - one for the <code>widget</code> project
+      and another for the <code>gizmo</code> project.
+      </p>
+      <p>
+      The following command invokes a reactor build that initates 
+      the build of all registered projects with a basedir within
+      the scope of the current directory (i.e. widget and gizmo).
+      </p>
+
+<source>
+$ cd demo
+$ ant
+</source>
+
+<pre>
+$ ant
+Buildfile: build.xml
+
+install:
+[x:reactor] Preparing build sequence.
+------------------------------------------------------------------------
+[demo/gizmo]
+[demo/widget]
+------------------------------------------------------------------------
+
+info:
+------------------------------------------------------------------------
+name: gizmo
+------------------------------------------------------------------------
+
+init:
+
+prepare:
+[x:prepare] creating target directory
+    [mkdir] Created dir: F:\dev\avalon\tools\magic\etc\test\demo\gizmo\target
+    [mkdir] Created dir: F:\dev\avalon\tools\magic\etc\test\demo\gizmo\target\build\main
+     [copy] Copying 1 file to F:\dev\avalon\tools\magic\etc\test\demo\gizmo\target\build\main
+    [mkdir] Created dir: F:\dev\avalon\tools\magic\etc\test\demo\gizmo\target\build\test
+     [copy] Copying 1 file to F:\dev\avalon\tools\magic\etc\test\demo\gizmo\target\build\test
+
+build:
+    [mkdir] Created dir: F:\dev\avalon\tools\magic\etc\test\demo\gizmo\target\classes
+    [javac] Compiling 1 source file to F:\dev\avalon\tools\magic\etc\test\demo\gizmo\target\classes
+
+package:
+    [mkdir] Created dir: F:\dev\avalon\tools\magic\etc\test\demo\gizmo\target\deliverables\jars
+      [jar] Building jar: F:\dev\avalon\tools\magic\etc\test\demo\gizmo\target\deliverables\jars\gizmo.jar
+    [x:jar] Creating md5 checksum
+
+test:
+    [mkdir] Created dir: F:\dev\avalon\tools\magic\etc\test\demo\gizmo\target\test\classes
+    [javac] Compiling 1 source file to F:\dev\avalon\tools\magic\etc\test\demo\gizmo\target\test\classes
+    [mkdir] Created dir: F:\dev\avalon\tools\magic\etc\test\demo\gizmo\target\test\reports
+    [junit] Running org.apache.playground.gizmo.test.GizmoTestCase
+    [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.078 sec
+
+
+install:
+     [copy] Copying 2 files to F:\system\magic\main\demo
+
+info:
+------------------------------------------------------------------------
+name: widget
+------------------------------------------------------------------------
+
+init:
+
+prepare:
+[x:prepare] creating target directory
+    [mkdir] Created dir: F:\dev\avalon\tools\magic\etc\test\demo\widget\target
+    [mkdir] Created dir: F:\dev\avalon\tools\magic\etc\test\demo\widget\target\build\main
+     [copy] Copying 1 file to F:\dev\avalon\tools\magic\etc\test\demo\widget\target\build\main
+    [mkdir] Created dir: F:\dev\avalon\tools\magic\etc\test\demo\widget\target\build\test
+     [copy] Copying 1 file to F:\dev\avalon\tools\magic\etc\test\demo\widget\target\build\test
+
+build:
+    [mkdir] Created dir: F:\dev\avalon\tools\magic\etc\test\demo\widget\target\classes
+    [javac] Compiling 1 source file to F:\dev\avalon\tools\magic\etc\test\demo\widget\target\classes
+
+package:
+    [mkdir] Created dir: F:\dev\avalon\tools\magic\etc\test\demo\widget\target\deliverables\jars
+      [jar] Building jar: F:\dev\avalon\tools\magic\etc\test\demo\widget\target\deliverables\jars\widget.jar
+    [x:jar] Creating md5 checksum
+
+test:
+    [mkdir] Created dir: F:\dev\avalon\tools\magic\etc\test\demo\widget\target\test\classes
+    [javac] Compiling 1 source file to F:\dev\avalon\tools\magic\etc\test\demo\widget\target\test\classes
+    [mkdir] Created dir: F:\dev\avalon\tools\magic\etc\test\demo\widget\target\test\reports
+    [junit] Running org.apache.playground.widget.test.WidgetTestCase
+    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.047 sec
+
+
+install:
+     [copy] Copying 2 files to F:\system\magic\main\demo
+
+BUILD SUCCESSFUL
+Total time: 14 seconds
+</pre>
+
 
     </section>
   </body>

Modified: avalon/trunk/tools/build.xml
==============================================================================
--- avalon/trunk/tools/build.xml	(original)
+++ avalon/trunk/tools/build.xml	Wed Jun 23 22:09:33 2004
@@ -2,7 +2,7 @@
 
 <project name="tools" default="default" basedir="." xmlns:x="antlib:org.apache.avalon.tools">
 
-  <property file="build.properties"/>
-  <import file="${project.home}/build/reactor.xml"/>
+  <x:home index="../central/system"/>
+  <import file="${magic.templates}/reactor.xml"/>
 
 </project>

Modified: avalon/trunk/tools/magic/build.xml
==============================================================================
--- avalon/trunk/tools/magic/build.xml	(original)
+++ avalon/trunk/tools/magic/build.xml	Wed Jun 23 22:09:33 2004
@@ -14,7 +14,7 @@
   </target>
 
   <target name="test" depends="standard.test">
-    <ant dir="target/test/temp/demo" target="test"/>
+    <ant dir="target/test/temp/demo" target="install"/>
     <mkdir dir="${basedir}/target/deliverables/demos"/>
     <zip destfile="${basedir}/target/deliverables/demos/demo.zip"
       basedir="etc/test/demo"/>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.