Ok, I think I get this.

But I am wonding: How we will handle the 'little things' in the environment, 
like (1) copying junit.jar to ANT_HOME and (2) copying 
xml-commons-resolver-1.1.jar to ANT_HOME (which Forrest requires)?  

Is this just a matter of having good docs to explain it to people?


-----Original Message-----
From: Eddie O'Neil 
Sent: Tuesday, December 07, 2004 3:31 PM
To: Beehive Developers
Subject: Re: svn commit: r111151 -
/incubator/beehive/trunk/beehive.properties
/incubator/beehive/trunk/beehiveEnv.cmd
/incubator/beehive/trunk/beehiveEnv.sh
/incubator/beehive/trunk/build.xml



   Comments in-line...

Steve Hanson wrote:
> I think this is fine idea.

Great!  Glad we're in agreement.  :)

> 
> But I have questions about how this would work:
> 
> (1) Would we be *removing* trunk/external/apache-ant-1.6.2, etc.?  

Yes.  We'd require that Beehive developers have a specific version of 
Ant available and on their PATH.  We'd still likely need ANT_HOME to be 
set so that we can pickup JAR references.

> (2) Are we keeping some sort of "bootstrap" target, which will go and grab an 
> officially approved set of 3rd party tools?  

Depends.  Right now, "bootstrap" installs four things:

- Ant
- Tomcat
- JSR 173 APIs
- Forrest

Ant and Tomcat we'd remove and require be installed locally.  As Bob has 
rightfully pointed out, our build can't presume to know enough about all 
of our developer's machines to do this setup correctly.  So, doing 
things like installing Ant and then trying to copy "junit.jar" into
$ANT_HOME could break on a Linux machine when Ant is owned by root and 
installed in /usr/local/lib.

So, we'll leave the Ant / Tomcat type software, which is runtime 
dependent but not build-time dependent, as things the user would 
install.  Forrest seems to fall into this category (at least to me).

As far as JSR 173, this is a build-time dependency as we need it to 
build XSDs with XMLBeans.  This might still come down in the form of the 
JSR 173 RI JAR; that remains to be seen...  But, once this is all done, 
"bootstrap" will probably just grab one thing:

- JSR 173 APIs

Generally, resources that we require at *build* time will be checked in 
or downloaded (the servlet 2.4 / JSP 2.0 APIs, for example).

Other 3rd party tools used to build or run a Beehive app should be 
provided by the user.  Of course, this is a general rule and we've not 
made these changes yet, so I'm sure this will all flex a little bit as 
we go along.  For example, we've not gathered enough information on the 
ramifications on using Tomcat for testing.  But, it seems like the right 
direction to go.

Does that help?  Other thoughts / comments?


> (3) If we are keeping a bootstrap target, will it grab the tools off the web 
> (instead of from trunk/external)?
> 
> -Steve Hanson
> 
> 
> 
> 
> 
> -----Original Message-----
> From: Eddie O'Neil 
> Sent: Tuesday, December 07, 2004 2:38 PM
> To: Beehive Dev
> Subject: Re: svn commit: r111151 -
> /incubator/beehive/trunk/beehive.properties
> /incubator/beehive/trunk/beehiveEnv.cmd
> /incubator/beehive/trunk/beehiveEnv.sh
> /incubator/beehive/trunk/build.xml
> 
> 
> Steve--
> 
>    Hey; in an effort to keep Beehive from growing into owning the 
> install for every open source project that we use, it's probably best to 
> remove the FORREST_HOME environment variable that is set by the Beehive 
> scripts.  So, something like this:
> 
>    set FORREST_HOME=%BEEHIVE_HOME%\installed\apache-forrest-0.6\src\core
> 
> would go away.
> 
>    The problem is that we already have the Ant and Tomcat installers 
> checked into Beehive and need to remove these from our SVN tree so that 
> users can use Ant / Tomcat installs that are local and configured to 
> their own environments.  IMHO, Forrest would be the same thing -- a tool 
> that devs need to have installed in order to run the doc targets but 
> something that is *local* and not provided by us.
> 
>    It's still possible to do good error checking around running the 
> "forrest" tool.  For example, before running targets that use it, you 
> can use the Ant <available> task to ensure that it is available and 
> setup as needed.
> 
>    Just an effort to keep Beehive from owning the installs and 
> environment variables for all of the 3rd party tools we use; there is an 
> effort underway (or will be!) to get Ant and Tomcat out of our builds as 
> well.
> 
>    Thoughts?
> 
> Eddie
> 
> 
> 
> 
> [EMAIL PROTECTED] wrote:
> 
>>Author: steveh
>>Date: Tue Dec  7 14:07:49 2004
>>New Revision: 111151
>>
>>URL: http://svn.apache.org/viewcvs?view=rev&rev=111151
>>Log:
>>beehiveEnv.cmd/.sh: new environmental variables related to the Forrest docs.
>>build.xml: new build targets ("bootstrap" and "docs") related to Forrest docs.
>>Modified:
>>   incubator/beehive/trunk/beehive.properties
>>   incubator/beehive/trunk/beehiveEnv.cmd
>>   incubator/beehive/trunk/beehiveEnv.sh
>>   incubator/beehive/trunk/build.xml
>>
>>Modified: incubator/beehive/trunk/beehive.properties
>>Url: 
>>http://svn.apache.org/viewcvs/incubator/beehive/trunk/beehive.properties?view=diff&rev=111151&p1=incubator/beehive/trunk/beehive.properties&r1=111150&p2=incubator/beehive/trunk/beehive.properties&r2=111151
>>==============================================================================
>>--- incubator/beehive/trunk/beehive.properties        (original)
>>+++ incubator/beehive/trunk/beehive.properties        Tue Dec  7 14:07:49 2004
>>@@ -19,6 +19,7 @@
>> 
>> tomcat.dir=${os.CATALINA_HOME}
>> ant.dir=${os.ANT_HOME}
>>+forrest.dir=${os.FORREST_HOME}
>> 
>> ant.jar=${ant.dir}/lib/ant.jar
>> tools.jar=${os.JAVA_HOME}/lib/tools.jar
>>
>>Modified: incubator/beehive/trunk/beehiveEnv.cmd
>>Url: 
>>http://svn.apache.org/viewcvs/incubator/beehive/trunk/beehiveEnv.cmd?view=diff&rev=111151&p1=incubator/beehive/trunk/beehiveEnv.cmd&r1=111150&p2=incubator/beehive/trunk/beehiveEnv.cmd&r2=111151
>>==============================================================================
>>--- incubator/beehive/trunk/beehiveEnv.cmd    (original)
>>+++ incubator/beehive/trunk/beehiveEnv.cmd    Tue Dec  7 14:07:49 2004
>>@@ -10,5 +10,6 @@
>> 
>> set ANT_HOME=%BEEHIVE_HOME%\installed\apache-ant-1.6.2
>> set CATALINA_HOME=%BEEHIVE_HOME%\installed\jakarta-tomcat-5.0.25
>>+set FORREST_HOME=%BEEHIVE_HOME%\installed\apache-forrest-0.6\src\core
>> 
>>-set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;%PATH%
>>\ No newline at end of file
>>+set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;%FORREST_HOME%\bin;%PATH%
>>\ No newline at end of file
>>
>>Modified: incubator/beehive/trunk/beehiveEnv.sh
>>Url: 
>>http://svn.apache.org/viewcvs/incubator/beehive/trunk/beehiveEnv.sh?view=diff&rev=111151&p1=incubator/beehive/trunk/beehiveEnv.sh&r1=111150&p2=incubator/beehive/trunk/beehiveEnv.sh&r2=111151
>>==============================================================================
>>--- incubator/beehive/trunk/beehiveEnv.sh     (original)
>>+++ incubator/beehive/trunk/beehiveEnv.sh     Tue Dec  7 14:07:49 2004
>>@@ -10,5 +10,6 @@
>> 
>> export CATALINA_HOME=$BEEHIVE_HOME/installed/jakarta-tomcat-5.0.25
>> export ANT_HOME=$BEEHIVE_HOME/installed/apache-ant-1.6.2
>>+export FORREST_HOME=$BEEHIVE_HOME/installed/apache-forrest-0.6/src/core
>> 
>>-export PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH
>>+export PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$FORREST_HOME/bin:$PATH
>>
>>Modified: incubator/beehive/trunk/build.xml
>>Url: 
>>http://svn.apache.org/viewcvs/incubator/beehive/trunk/build.xml?view=diff&rev=111151&p1=incubator/beehive/trunk/build.xml&r1=111150&p2=incubator/beehive/trunk/build.xml&r2=111151
>>==============================================================================
>>--- incubator/beehive/trunk/build.xml (original)
>>+++ incubator/beehive/trunk/build.xml Tue Dec  7 14:07:49 2004
>>@@ -12,6 +12,7 @@
>>     <property name="tomcat.installer" 
>> location="${beehive.external.dir}/tomcat/jakarta-tomcat-5.0.25.zip"/>
>>     <property name="ant.installer" 
>> location="${beehive.external.dir}/ant/apache-ant-1.6.2-bin.zip"/>
>>     <property name="jsr173.installer" 
>> location="${beehive.external.dir}/xmlbeans/jsr173_api.jar"/>
>>+    <property name="forrest.installer" 
>>location="${beehive.external.dir}/forrest/apache-forrest-0.6.zip"/>
>> 
>>     <target name="bootstrap" depends="ensure.proxysettings" 
>> description="Install external dependencies to the installed/ directory">
>>         <antcall target="install.deps"/>
>>@@ -79,6 +80,7 @@
>>         <antcall target="ensure.ant"/>
>>         <antcall target="ensure.tomcat"/>
>>         <antcall target="ensure.jsr173"/>
>>+        <antcall target="ensure.forrest"/>
>>     </target>
>> 
>>     <target name="uninstall.deps" description="Uninstall the external 
>> dependencies">
>>@@ -146,6 +148,37 @@
>>              ignoreerrors="false"/>
>>         <unzip src="${jsr173.installer}" 
>> dest="${beehive.installed.dir}/jsr173"/>
>>     </target>
>>+    
>>+    <!-- ============================================= -->
>>+    <!--                                               -->
>>+    <!-- Forrest == this is required for building Beehive documentation.     
>>     -->
>>+    <!--                                               -->
>>+    <!-- ============================================= -->
>>+
>>+    <target name="ensure.forrest">
>>+        <echo>Ensuring Forrest present in directory: 
>>${beehive.installed.dir}</echo>
>>+        <available file="${forrest.dir}" type="dir" 
>>property="forrest.present"/>
>>+        <echo>forrest.present: ${forrest.present}</echo>
>>+        <antcall target="unzip.forrest"/>
>>+    </target>
>>+
>>+    <target name="unzip.forrest" unless="forrest.present">
>>+        <echo>Unzipping Forrest to directory: ${beehive.installed.dir} from 
>>installer ${forrest.installer}</echo>
>>+        <unzip src="${forrest.installer}" dest="${beehive.installed.dir}"/>
>>+        <!-- Copying xml-commons-resolver-1.1.jar into the Ant lib dir is 
>>necessary for Ant to call Forrest targets. -->
>>+        <copy 
>>file="${beehive.installed.dir}/apache-forrest-0.6/lib/core/xml-commons-resolver-1.1.jar"
>> todir="${beehive.installed.dir}/apache-ant-1.6.2/lib"/>
>>+        <chmod 
>>dir="${beehive.installed.dir}/apache-forrest-0.6/src/core/bin" perm="755" 
>>includes="**/*.sh"/>
>>+    </target>
>>+    
>>+    <!-- 
>>+    
>>+        <copy todir="site\src\documentation\content\reference" 
>>overwrite="true">
>>+            <fileset dir="controls\build\docs\reference"/>
>>+            <fileset dir="netui\build\docs\reference"/>
>>+            <fileset dir="wsm\build\docs\reference"/>
>>+        </copy>
>>+    -->
>>+    
>> 
>>     <!-- ============================================= -->
>>     <!--                                               -->
>>@@ -203,17 +236,12 @@
>>     <!-- ============================================= -->
>> 
>>     <target name="docs" description="Generate the Beehive documentation">
>>+        <ant dir="docs" target="site"/>
>>         <ant dir="controls" target="docs" inheritAll="false"/>
>>         <ant dir="netui" target="docs" inheritAll="false"/>
>>         <ant dir="wsm" target="docs" inheritAll="false"/>
>>-    </target>
>>-
>>-    <target name="copy-to-forrest" description="Copy the documentation to 
>>forrest">
>>-        <copy todir="site\src\documentation\content\reference" 
>>overwrite="true">
>>-            <fileset dir="controls\build\docs\reference"/>
>>-            <fileset dir="netui\build\docs\reference"/>
>>-            <fileset dir="wsm\build\docs\reference"/>
>>-        </copy>
>>+        
>>+        
>>     </target>
>> 
>>     <!-- ============================================= -->
>>@@ -227,6 +255,7 @@
>> 
>>         <antcall target="build.dist.core"/>
>>         <antcall target="build.dist.samples"/>
>>+        <antcall target="build.dist.docs"/>
>>     </target>
>> 
>>     <target name="build.dist.core">
>>@@ -389,16 +418,19 @@
>>     </target>
>> 
>>     <target name="build.dist.docs" depends="docs" description="Builds 
>> documentation for a Beehive distribution">
>>-        <mkdir dir="${dist.docs.dir}"/>
>>+        <mkdir dir="${dist.dir}"/>
>>         <!-- copy javadocs to dist -->
>>-        <copy todir="${dist.docs.dir}/docs/javadoc" failOnError="true">
>>+        <copy todir="${dist.dir}/docs/javadoc" failOnError="true">
>>             <fileset dir="controls/build/docs/reference"/>
>>             <fileset dir="netui/build/docs/reference"/>
>>             <fileset dir="wsm/build/docs/reference"/>
>>         </copy>
>>-        <copy todir="${dist.docs.dir}/docs" failOnError="true">
>>+        <copy todir="${dist.dir}/docs" failOnError="true">
>>             <fileset file="netui/docs/index.html"/>
>>         </copy>
>>+        <copy todir="${dist.dir}/docs" failOnError="">
>>+            <fileset dir="docs/forrest/build/site"/>
>>+        </copy>
>>     </target>
>> 
>>     <target name="build.dist.archives" description="Builds all Beehive 
>> distribution archives (.zip, .tar.gz, etc)">
>>@@ -428,7 +460,7 @@
>> <!--        <fail unless="beehive.version" message="Could not build 
>> distribution archive; beehive.version was not specified"/> -->
>> 
>>         <mkdir dir="build/jars"/>
>>-        <jar destfile="build/jars/${dist.name}-docs.jar" 
>>basedir="${dist.docs.dir}"/>
>>+        <jar destfile="build/jars/${dist.name}-docs.jar" 
>>basedir="${dist.dir}"/>
>>     </target>
>> 
>>     <target name="clean.dist">
>>

Reply via email to