Follow the links on the left to subprojects for
The datacenter build is quite byzantine - partly because it does a lot, partly to work-around maven flaws and bugs. Is should be possible to rationalize it a bit, but its probably best to wait for the proper maven v1.0 release.
The datacenter is made up of a set of sub-projects. Each is in a separate subdirectory - /client, /server, /pal, /implementations/*.
Each subproject requires a project.xml project.properties and maven.xml. To save replication and simplify modifications, each project extends templates in the /build directory. Common resources - such as checkstyle and license files - can also be shared between projects by placing them in build directory.
This section is now out of date and will be updated shortly
The nightly build script calls the following maven goals
These work fine for building a single project. However, the datacenter comprises a group of separate sub-projects - each with their own maven project.xml files,etc. There are dependencies between the sub-projects, so they need to be run in the correct order.
The subprojects are tied together by the top-level datacenter project (that's the one you're reading now). This contains no code, provides a bit of additional site documentation, and the maven script that binds the sub-projects together.
Building the correct sequence of sub-projects is shoe-horned into the nightly build by defining 'preGoals' for the important goals in the list above. These are defined for this top-level project in (datacenter/maven.xml)
These pregoals use the multiproject plugin, or the reactor tag - both do the same thing - attain a single goal in a group of interrelated-projects. Furthermore, if subproject A has a dependency on subproject B, multiproject/reactor ensures that the goal is executed on B before A.
So what really happens during the nightly build is:
In summary, the main goals are site, followed by jar:deploy-snapshot
Clearly, there's a lot of redundancy and wasted computatioin here, due to the mis-match between what the nightly build thinks the datacenter project should do, and what we want it to do.
I've been talking to folk about replacing the long list of predefined goals in the nightly build by a list of goals such as:
cd into any sub-project (client,server,implementations/*)and issue commands there to build just that project. They behave just like any other maven project. e.g.
cd datacenter/client
maven site builds single site for the client project.
maven jar:install-snapshot builds snapshot jar for client, places in local repository where it can
be found by other projects.
To build PAL by hand, you need to build all its prerequisites - the jars it depends on, plus the javadocs and dist bundles it grabs. Do the following:
cd datacenter
maven multiproject:clean ; maven multiproject:site ; maven jar:install-snapshot
then go and have a cup of coffee
multiproject:site is optional (IIRC)- pal grabs some extra documentation from the site build for each project. I think it will manage without it though.
jar:install-snapshot has a preGoal in maven.xml, which is similar to that for jar:deploy-snapshot used in the nightly build.
The result is a pal-SNAPSHOT, which is left in your local repository - usually ~/.maven/repository/astrogrid-datacenter/wars/pal-SNAPSHOT.war
See documentation for the PAL project for further build instructions.