To build the JBoss Application Server source files with Apache ANT, from a terminal change directory to where the unzipped source files are. In the following example we are assuming that the source files were copied and unzipped in the logged in user's downloads
folder.
[user@localhost]$ cd /home/user/downloads/jboss-4.2.2.GA-src/build [user@localhost build]$ ls build.bat build.log build.sh build.xml eclipse.psf local.properties VersionRelease.java build-distr.xml build-release.xml build-thirdparty.xml docs etc output
From the contents of the build
directory above, you can see the build.xml
file which is used by Apache ANT as a configuration file when building your source files. The next step is to perform the build using Apache ANT as illustrated below.
[user@localhost build]$ ant compile-classes: [mkdir] Created dir: /jboss/jboss-4.2.2.GA-src/tomcat/output/classes [javac] Compiling 89 source files to /jboss/jboss-4.2.2.GA-src/tomcat/output/classes .... ....content truncated ..... ..... _buildmagic:build-bypass-check: jars: most: main: BUILD SUCCESSFUL Total time: 2 seconds
A successful build will have the above message. If your build fails, please check the error log and ensure that your configuration files and environment variables are correctly set. The JBoss Application Server files are built under the build/jboss-4.2.2.GA
directory as indicated below.
[user@localhost build]$ ls build.bat build.log build.sh build.xml eclipse.psf jboss-4.2.2.GA local.properties VersionRelease.java build-distr.xml build-release.xml build-thirdparty.xml docs etc outputjboss-4.2.2.GA [user@localhost build]$ cd jboss-4.2.2.GA [user@localhost build]$ ls bin client docs lib server
The jboss-4.2.2.GA
contains your successful JBoss Application Server files. You can copy this folder to a different location or run the server from this folder after setting the JBOSS_HOME environment variable in your .bashrc
file. Next you need to set your JBOSS_HOME environment variables. This is discussed in Chapter 5, Setting the JBOSS_HOME variable.