Version 0.1
Copyright © 2005 BRICKS Consortium.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation. A copy of the license is included in the section entitled Appendix A.
| Revision History | ||
|---|---|---|
| Revision 0.1 | 16.04.2005 | PK |
|
Initial version | ||
| Revision 0.2 | 19.04.2005 | BH |
|
Added testing section | ||
The authors of the document assume that the reader has already knowledge in:
Installing and using Apache Ant (i.e. running Ant tasks)
Basic usage of a CVS repository, i.e. being able to checkout, update, add, remote, and commit content
![]() | Java IDEs and Ant Integration |
|---|---|
Almost all popular Java IDEs are integrated more or less with Ant. How the integration can be done with every single IDE is out of the scope of the presented content. |
A necessary step before starting development is to check out
the project source tree from the CVS repository. You should
user your BRICKSforge username and password to set up
CVSROOT
CVSROOT=:ext:username@develop.bricksfactory.org:/cvsroot
where module name is bindings/java
![]() | Note |
|---|---|
In the rest of the document, we assume that the project
is checkouted in the directory
|
framework.test.dir=/test/bricks framework.host=localhost framework.port=8080
Figure 1.
framework.properties file
After a successful checkout, your local project copy must be configured. In order to do so,
you should copy file framework.properties.template located in
/$HOME/bindings/java into
framework.properties. A possible content of the file is
shown on Figure 1. Basically, it is only
important to fill properly framework.test.dir: it should be
a directory where the test framework will be copied and started. Additionally,
one can change the address/name of the machine where the test framework will be
executed (framework.host) and the port on which the framework will be available
(framework.port).
![]() | Developers Using Windows |
|---|---|
DO NOT USE WHITESPACES IN PATHS, JAVA DOES NOT LIKE THEM. If you want to use backslashes (\) then you must repeat them twice e.g. c:\\foo\\bar or you can use just slashes, e.g. c:/foo/bar |
In order to run JUnit test later, you need to copy lib/build/junit.jar
into
.
$ANT_HOME/lib
Additionally, in the root of /$HOME/bindings/java
are the also the following files:
project.properties(Figure 2), contains system-wide project informations like project name and version.![[Important]](admon/important.png)
Important Edit it only if you now what you are doing. Usually the file will be modified only when a new software release will be ready.
README, various information for developersLicense.txt, BRICKS software licenseRELEASE-NOTES, release informations for usersbuild.xml, main Ant build script
bindings/java
framework (Jakarta Tomcat 5.0 installation)
axis (Apache Axis installation)
components (BNode source code)
component1 (component1 subtree)
component2 (component2 subtree)
component3 (component3 subtree)
.
.
componentN (componentN subtree)
lib (common project libs)
build (needed only during build)
endorsed (JDK endorsed libs)
installer (IzPack installation)
licenses (various licenses)
legal
3rdparty.xml (external component tracking and licenses)
build (place for storing build results)
installer (standalone installer for software release)
Figure 3. Project Directory Hierarchy
Figure 3 shows project code tree that exist
in your local project copy. framework
contains Jakarta Tomcat installation. Currently used version is 5.0.28.
Directory lib contains various libraries
needed for the proper building and running BNode software. Additionally, subdirectories
contain libraries:
needed during build phase (
lib/build)Apache Axis installation (
axis)Endorsed libraries (
lib/endorsed)IzPack installer (
installer)Various licenses (
legal)
Directory
components is just a container for BRICKS components, which
code structure is presented on Figure 4.
componentX is just an example name, every component
should have a name that gives better descriptions (e.g. api, core, usermanagement,..).
component1 main src (source code) resources (various needed resources) lib (needed libs, but not other BNode components) endorsed (endorsed libs) build (place for building the component) lib (generated jar files) classes (generated classes) web (web interfaces) test (test cases) src (source code) resources (various needed resources) build.xml (component build script) README (for developers)
Figure 4. Component Directory Hierarchy
Component source code should be place under main/src
. A component might need some additional resources (e.g. config files),
and they should be placed under main/resources.
Various tests (including JUnit tests) should be placed under test/src
, and the appropriate resources under test/resources
Similarly to the main lib directory, component
lib directory contains needed libraries, but only those
that are specific for the component. If the component depends on some libraries already
included in the main lib directory, or part of the
framework installation, they should be copied again here; they will be simply used
during building and deploying phase.
If you want to make a web interface for controlling your components, needed
.html, .jsp and other files should be placed under
web directory. These files will
be copied on the appropriate place during deployment and installation phase.
![]() | Important |
|---|---|
Please notice that |
The following Ant targets can be used from the main or component build file (build.xml)
during development process:
compilethe componenttestthe componentbuildthe component.jarfilecleanthe component build results
![]() | Note |
|---|---|
If the targets are invoked from a component build file, they are performed only on the component; otherwise calling them from the main build file, they will applied on the whole source tree, i.e. the complete project will be compiled, tested, or built. |
Additionally, the following target are available only in the main build file:
make-component, create new component undercomponentsdirectoryjavadoc, generate javadoc for the BNode softwarestart-framework, copy and start the framework, and software components in the test directorystop-framework, stop the test framework runningfull-installer, generate release with installer that includes framework + all software componentsinstaller, generate release without installersdk, generate SDK release
API
org.bricksorg.bricks.coreorg.bricks.services.*org.bricks.modeles.*
CORE
org.bricks.framework.*org.bricks.util
Component implementations
org.bricks.impl.*
![]() | Note |
|---|---|
Javadoc is generated only for API and Core. |
![]() | Be careful when you chose files for committing back to CVS |
|---|---|
|


![[Note]](admon/note.png)
