On 3/21/07, Stefano Bagnara <[EMAIL PROTECTED]> wrote:
robert burrell donkin ha scritto:
> this is the first step towards modularisation of the server code. the
> plan is to split the current code base into a number of modules in
> subdirectories.
>
> the modular build scripts are mostly done. should be able to tidy them
> up and commit them this weekend.
I just fixed the deployment build.xml to generate correct artifacts, but
I have problems understanding what to do to create api/function modules
in this "ant build". Can you at least isolate the "mailet-api" and
"mailet" modules (that was already creating separate jars) so I ca
understand what I have to do to split our source tree in modules?
yes :-)
i was just about to propose that i take this on this weekend
(been busy trying to generate sieve filters so that i can run fetchpop
to avoid issues i now having with my ISP :-/ should have them finished
tomorrow)
I tried to create folders and make copied of build-tools/*-build.xml to
each folders but I keep getting errors likes this one:
----
module-build.xml:33: Error: Module name must be set
The 'name.module' property must be specified by the module build
----
the idea is that the new modules are generated by the task including
build files. the build.xml in each generated module will import the
general macros and targets from standard builds in build. it should be
minimal.
builds should have reasonable document and defaults
for example:
$ cd build-tools
$ ant
Buildfile: build.xml
usage:
[echo] Execute 'ant -projecthelp' to list recommended targets
[echo] Execute 'ant -help' to learn how to run these targets
BUILD SUCCESSFUL
Total time: 0 seconds
$ ant -projecthelp
Buildfile: build.xml
Build utilities and builds for tools. Generation of new modules.
Main targets:
generate-api-module Generates API module outline. Usage: ant
-DMODULE=<modulename> generate-api-module.
generate-deployment-module Generates deployment module outline.
Usage: ant -DMODULE=<modulename> generate-deployment-module.
generate-function-module Generates function module outline. Usage:
ant -DMODULE=<modulename> generate-function-module.
generate-library-module Generates library module outline. Usage:
ant -DMODULE=<modulename> generate-library-module.
Default target: usage
so if you want to generate an api module (say) called whatever
$ ant -DMODULE=whatever generate-api-module
Buildfile: build.xml
generate-api-module:
[echo] Creating module at ../whatever-api
[mkdir] Created dir: /opt/development/james-workspace/whatever-api
[mkdir] Created dir:
/opt/development/james-workspace/whatever-api/src/main/java
[mkdir] Created dir:
/opt/development/james-workspace/whatever-api/src/main/resources
[mkdir] Created dir:
/opt/development/james-workspace/whatever-api/src/main/config
[mkdir] Created dir:
/opt/development/james-workspace/whatever-api/src/test/java
[mkdir] Created dir:
/opt/development/james-workspace/whatever-api/src/test/resources
[copy] Copying 1 file to /opt/development/james-workspace/whatever-api
[echo]
[echo] The contents of NOTICE.txt may need appropriate editing to
accurately
[echo] reflect the contents of this module.
[echo]
BUILD SUCCESSFUL
Total time: 1 second
$ ls -la ../whatever-api/
total 32
drwxr-xr-x 3 rob users 4096 Mar 21 21:46 .
drwxr-xr-x 9 rob users 4096 Mar 21 21:46 ..
-rw-r--r-- 1 rob users 11468 Mar 21 21:46 LICENSE.txt
-rw-r--r-- 1 rob users 398 Mar 21 21:46 NOTICE.txt
-rw-r--r-- 1 rob users 293 Mar 21 21:46 build.xml
drwxr-xr-x 4 rob users 4096 Mar 21 21:46 src
(had intended to post an example before now. hope that this is enough
to get you started)
- robert
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]