Date: 2004-08-20T08:30:13 Editor: EddieOneil <[EMAIL PROTECTED]> Wiki: Apache Beehive Wiki Page: For Beehive Developers URL: http://wiki.apache.org/beehive/For Beehive Developers
no comment New Page: This page contains information useful to committers and contributors to Beehive. '''Contents''' [[TableOfContents]] = Building = Below are the steps for building Beehive: * download and install a 1.5 JDK from [http://java.sun.com/j2se/1.5.0/download.jsp here] or [http://java.sun.com/j2se/1.5.0/snapshots/ here]. Beehive requires b51 of the JDK or greater. * download and install Subversion from [http://subversion.tigris.org/ here] * sync the Beehive tree using these steps {{{ mkdir beehive cd beehive svn checkout svn checkout http://svn.apache.org/repos/asf/incubator/beehive/trunk }}} * install Ant 1.6.2 from `$BEEHIVE_HOME/external/apache-ant-1.6.2.zip` into `$BEEHIVE_HOME/installed`. This should create an `$BEEHIVE_HOME/installed/apache-ant-1.6.2` directory * define the shell variables JAVA_HOME and BEEHIVE_HOME to reference the root of the JDK 1.5 install and the root of the Beehive `trunk/` directory * run `ant clean deploy` = Build Conventions = The Beehive build is structured such that the Beehive components are peers and have a location in which to reference shared components. Artifacts of these shared components are defined as properties in the `/beehive.properties` file, which can be included by any downstream Ant build file. Some of these artifacts include references to the XMLBeans JAR, the Servlet and JSP API JARs, and the common JUnit JAR. The motivation behind this is to minimize the number of properties used to refer to the same resource, and when possible, these common properties should be used in component projects. The structure of the Beehive source tree from $BEEHIVE_HOME/ is: {{{ beehive.properties -- defines properties that are shared among Beehive components build.xml -- top-level build targets that can be used to clean, build, deploy, and test Beehive components build/ -- a transient top-level directory in which project wide build artifacts are placed controls/ -- the Controls component external/ -- 3rd party libraries / software that is shared among Beehive components installed/ -- installed 3rd party software such as Ant and Tomcat netui/ -- the NetUI component site/ -- the Beehive website test/ -- test infrastructure shared among Beehive components wsm/ -- the Web Service Metadata component. coming soon! }}} In order to track dependencies between Beehive components, it's best practice to define resources at the top-level that are shared across components. Otherwise, scoping resources to the components that use them makes them easier to change, and it's always easy to promote resources up the tree but harder to move them down. Generally, one component should never directly reference another for files, properties, etc. The top-level `test/` directory contains source and Ant files that are shared among components. This includes Ant which can be used to start / stop Tomcat (the default Servlet container for Beehive) and to deploy / undeploy / build a Beehive web application. The Ant files used to perform these operations are: * [http://cvs.apache.org/viewcvs.cgi/incubator/beehive/trunk/test/ant/buildWebapp.xml?root=Apache-SVN buildWebapp.xml] * [http://cvs.apache.org/viewcvs.cgi/incubator/beehive/trunk/test/ant/runTomcat.xml?root=Apache-SVN runTomcat.xml] and are defined as top-level properties in the beehive.properties file so that components need not reference the build files directly. In general, Beehive components are structured as: {{{ ant/ -- Ant build files used by a component build/ -- transient build directory that contains build and test artifacts docs/ -- documentation for a component external/ -- external libraries used by a Beehive component. For example, NetUI has the Struts runtime here. src/ -- root source directory <source modules> test/ -- test cases, sources, and Ant files tools/ -- tools used by a component }}} This project structure can be nested in the `tools/` and `test/` directories as needed. General guidelines: * build/ directories at the top-level and in components should not be checked into the tree * all artifacts generated during a build should be placed in the build/ directory so that a "clean" of Beehive can easily delete generated files. Note, philosophically speaking, this build structure isn't meant to be a set of hard-and-fast rules; rather, it's a set of guidelines defined with the intention of making understanding Beehive and its components easier and in keeping the build and test infrastructure manageable and loosely coupled. There are exceptions to every rule. <g> = Creating a web application to test Beehive (NetUI + Controls) = Coming soon!
