5.4.1. Building The Application

5.4.1. Building The Application

Let's look at building the example application and then explore the configuration files in detail.

In Chapter 4, About the Example Applications, we looked at the directory structure of the jsfejb3 sample application. At the command line, go to the jsfejb3 directory. There you will see a build.xml file. This is our Ant build script for compiling and packaging the archives. To build the application, just type the command ant and your output should look like this:

[vrenish@vinux jsfejb3]$ ant
Buildfile: build.xml

compile:
    [mkdir] Created dir: /home/vrenish/jboss-eap-4.2/doc/examples/gettingstarted/jsfejb3/build/classes
    [javac] Compiling 4 source files to /home/vrenish/jboss-eap-4.2/doc/examples/gettingstarted/jsfejb3
    /build/classes
    [javac] Note: /home/vrenish/jboss-eap-4.2/doc/examples/gettingstarted/jsfejb3/src/TodoDao.java uses
    unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.

war:
    [mkdir] Created dir: /home/vrenish/jboss-eap-4.2/doc/examples/gettingstarted/jsfejb3/build/jars
      [war] Building war: /home/vrenish/jboss-eap-4.2/doc/examples/gettingstarted/jsfejb3/build/jars/
      app.war

ejb3jar:
      [jar] Building jar: /home/vrenish/jboss-eap-4.2/doc/examples/gettingstarted/jsfejb3/build/jars/
      app.jar

ear:
      [ear] Building ear: /home/vrenish/jboss-eap-4.2/doc/examples/gettingstarted/jsfejb3/build/jars/
      jsfejb3.ear

main:

BUILD SUCCESSFUL
Total time: 2 seconds
(vrenish@vinux jsfejb3)$

If you get the BUILD SUCCESSFUL message, you will find a newly created build directory with 2 sub-directories in it: