You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ek...@apache.org on 2005/08/24 18:07:58 UTC

svn commit: r239701 - in /beehive/trunk/docs/forrest/release/src/documentation/content/xdocs: controls/images/ controls/projects.xml setup.xml

Author: ekoneil
Date: Wed Aug 24 09:07:55 2005
New Revision: 239701

URL: http://svn.apache.org/viewcvs?rev=239701&view=rev
Log:
More content on building Control projects.

BB: self
DRT: build.release pass


Removed:
    beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/controls/images/
Modified:
    beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/controls/projects.xml
    beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/setup.xml

Modified: beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/controls/projects.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/controls/projects.xml?rev=239701&r1=239700&r2=239701&view=diff
==============================================================================
--- beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/controls/projects.xml (original)
+++ beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/controls/projects.xml Wed Aug 24 09:07:55 2005
@@ -23,6 +23,8 @@
             can be used to compile Control sources for a project.  It can be used in an Ant build file as:
             </p>
             <source><![CDATA[
+                <import file="${beehive.home}/ant/beehive-tools.xml"/>
+
                 <build-controls srcdir="src/"
                                 destdir="classes/"
                                 tempdir="tmp/"
@@ -30,18 +32,54 @@
             ]]>
             </source>
             <p>
+            This will build the Control sources from <code>src/</code> into <code>classes/</code> and perform code generation of
+            Control beans into <code>tmp/</code> using the classpath <code>project.classpath</code>.  The resulting .class files
+            can then be used in your Java projects just as any other .class files.
             </p>
         </section>
         <section id="jar-project">
             <title>JAR Projects</title>
             <p>
-            todo
+            It is often useful to build Beehive Controls into a standalone JAR that can be copied into or shared among many 
+            Java projects.  This can be done by first building the controls and then JAR-ing them into a standard <code>.jar</code>
+            file.  The Controls runtime also provides an Ant 
+            <a href="../apidocs/classref_controls/org/apache/beehive/controls/runtime/packaging/ControlJarTask.html">task</a> that 
+            is used to perform additional processing for JARs that contain Controls.  The Control JAR task can be used like this
+            example:
+            </p>
+            <source><![CDATA[
+                <taskdef name="control-jar" 
+                         classname="org.apache.beehive.controls.runtime.packaging.ControlJarTask" 
+                         classpath="${beehive.home}/lib/controls/beehive-controls.jar" onerror="fail"/>
+
+                <control-jar destfile="foo-controls.jar" basedir="classes/">
+                  <manifest>
+                    <attribute name="Extension-Name" value="Foo Control"/>
+                    <attribute name="Specification-Title" value="Foo Control"/>
+                    <attribute name="Specification-Vendor" value="AnyCorp"/>
+                    <attribute name="Specification-Version" value="1.0.1"/>
+                     <attribute name="Implementation-Title" value="Foo Control"/>
+                    <attribute name="Implementation-Vendor" value="AnyCorp"/>
+                    <attribute name="Implementation-Version" value="1.0.1"/>
+                  </manifest>
+                </control-jar>
+            ]]>
+            </source>
+            <p>
+            The <code>&lt;coontrol-jar></code> task also merges any <code>.manifest</code> files that were generated while
+            processing control annotations.  Use of this Ant task is not required, but it should be used any time Control 
+            manifest attributes need to be merted into a <code>META-INF/MANIFEST.MF</code> file.
             </p>
         </section>
         <section id="integrated-project">
             <title>Integrating into Existing Projects</title>
             <p>
-            todo
+            Controls can also be used in existing Java projects by adding both the <code>&lt;build-controls></code> call to 
+            build Control sources.  Optionally, the <code>&lt;control-jar></code> can be used to build the result into a 
+            JAR file; while this is best practice, it is not required.  If Beehive Controls are added to existing Java
+            projects, take care to resolve source file dependencies correctly.  Because Controls perform code generation 
+            of Control Bean classes, clients of Control Bean classes need to be compiled <strong>after</strong> Controls
+            have been built.
             </p>
         </section>
     </body>

Modified: beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/setup.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/setup.xml?rev=239701&r1=239700&r2=239701&view=diff
==============================================================================
--- beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/setup.xml (original)
+++ beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/setup.xml Wed Aug 24 09:07:55 2005
@@ -14,7 +14,7 @@
             <ul>
                 <li>Beehive Binary Distribution -- download from <a class="fork" href="site:beehive-release/current">http://cvs.apache.org/dist/incubator/beehive/v1.0m1</a></li>
                 <li>Ant 1.6.2 -- download from <a class="fork" href="site:ant16/download">http://ant.apache.org/bindownload.cgi</a></li>
-                <li>Java 5 JDK -- download from <a class="fork" href="site:java5download">http://java.sun.com/j2se/1.5.0/download.jsp</a></li>
+                <li>J2SE 5.0 JDK -- download from <a class="fork" href="site:java5download">http://java.sun.com/j2se/1.5.0/download.jsp</a></li>
             </ul>
             <p>(2) Make sure that the following environmental variables are set in your shell.</p>
                 <ul>