7.5 Build Process

The Build-Process in an XMA application is based on an Apache Ant build.xml file. This File is based on different Targets with different effects. One Target can look like this:

build target

Figure 7.13. build target


You can use each target for self, but the dependent between the Targets ist very importent. So we have some Targets like "All" or "all_undeploy_deploy" which will help you to become a fast and correct result.

But the most necessary is that you have the "Ant" Plugin in your "eclipse\plugins" folder!!

You can find the "build.xml" in the folder "script".

project directory structure

Figure 7.14. project directory structure


On right Click on this build.xml ant "Run Ant..." this dialog will open:

Run Ant Dialog

Figure 7.15. Run Ant Dialog


The Build-Targets can also reached with the Ant-View. If you haven´t open this View click: Window -> Show View -> Ant

Ant View

Figure 7.16. Ant View


  1. all[default]

    You can use this target to build a application.war file. It starts Compile and Pack

  2. all_undeploy_deploy

    This Target build the application.war file and redeployed the tomcat server. Only if Tomcat is already started.

  3. clean

    this target will delete following directories:

  4. common_jars

    build the CommonClient.jar and the CommonServer.jar file

  5. compile

    compile all .java files and copy them into the classes directory

  6. component-jar

    build a jar file for each component in the project

  7. init

    defines all varialbes in the build script

  8. jar

    build one jar file

  9. make_hash_for_jar

    builds the xma-hash-code for an unsinged (3rd party) jar

  10. preconditions

    define the global include(property) file and set the projects class path

  11. prepare

    create the lib and the classes directory

  12. tomcat-deploy

    deploy tomcat while server is still running with the server username and password by using the Tomcat Manager

  13. tomcat-list_applications

    list all applications from the tomcat server on the eclipse console

  14. tomcat-undeploy

    undeply tomcat while server is stikk running with the server username and password

  15. tomcat_deploy_copy_only

    deploy to tomcat, copy application.war (see: http://java.sun.com/j2ee/1.3/docs/ servlet specification (2.3) -> Chapter 9 : Web Applications ) file to domain-dir. requries restart; use this target if the server is stopped and you can copy the files to tomcat

  16. tomcat_stop_server

    as expected this target stops the server

  17. tomcat_undeploy_delete_only

    delete war-file and webapplication from tomcat. Requires that tomcat ist stopped. Use this target if the server is stopped and you can delete the files from tomcat

  18. webapp

    this target build the webapp and copy all required files into

  19. weblogic_deploy

    copy the application.war file into the weblogic directory which is define in the common.properties file in the script directory

[Caution]

Before you can deploy a web-application while tomcat is running, be shure that the server username and password are correct.

The actually username and password can be found in the file {TOOLS}/tomcat41/conf/tomcat-users.xml.

user username="admin" password="xxxxx" roles="admin,manager"

It is very important to find the username and password by the roles "manager", because we use this Tomcat Manager to provide you the possibility to deploy while Tomcat is running.