Version 10

    Building Mail Services For JBoss


    Getting the materials


    There may be more up to date instructions in the root of the jboss-mail module; however, its likely these will be more up to date because its easier to edit :-).


    • First off you need ant 1.6.1 or later (other 1.6s may work but we've only tested 1.6.1).  MailServicesBuilding/ApacheAnt1.6.1Bin.tar.bz2

    • Next, you need to get the source.

    • You'll need a copy of junit.jar to run the unit tests.  You should find a copy here.

    • copy that junit.jar into your $ANT_HOME/lib

    • Lastly, you'll need a recent JBoss 3.2 build mainly for running the tests (mail server per-se doesn't demand a very-recent version).  We haven't tested with 4.0 yet, and recommend jboss-3.2.4RC2 or 3.2.4RC1 or later.


    Setting up the environment


    • make sure your Java environment is set up

    • export JBOSS_HOME=/path/to/jboss - the build uses this to resolve dependencies, note that it assumes server/default exists.

    • export ANT_HOME=/path/to/ant

    • export PATH=$ANT_HOME/bin:$PATH


    Running the build


    • If ant is working (type ant -version) -- then you're all set

    • ant dist - creates the installer in build/dist/install.jar

    • ant (enter) - runs the main target, packages everything and sticks it in build/deploy ready to be copied into your $JBOSS_HOME/server/xxx/deploy directory!

    • ant test - runs the junit tests.  Its important that all code contributions include a unit test

    • ant compile - just runs the compile and puts the classes under build/classes

    • ant clean - deletes the build directory




    • copy the mail.ear file to your $JBOSS_HOME/server/xxx/deploy directory (for example $JBOSS_HOME/server/default/deploy)

    • I believe JMS queues are created automatically when mail.ear is deployed. if not, you'll need to create the JMS queues or topics which JBMail depends on, its best to look at the $JBMAIL_SRC/src/META-INF descriptors to find out what they are.  MailServicesCreatingJMSTopics

    • Start JBoss. 

    • We're running on Port 9000 at the moment to avoid folks thinking its production ready or inadvertantly putting it into production.