OpenGTS Web Applications (war)

A war file is a complete web application and contains more than Java *.class and *.jar files. The creation of *.war files adds resources to deploy a web application. The dependency graph can cause confusion, if you're not used to look at an ant build process. Another way to approach the process is to execute the targets one by one and look at the ant outputs on the console and the appearance of the new files.

ant build output

In order to do this you should open the console and

run C:\prox\OpenGTS_2.4.3>ant -buildfile buildLite.xml all to make sure everything works.

You should be aware that the initial target clean deletes the output folder:

Comparing the timestamps of the *.class files to the *.jar file reveals that ant is smart enough not to repeat dependent targets, if they were executed earlier. Ant also takes care of creating the gtsutils.jar\META-INF\MANIFEST.MF file. An finally it should be noted that the process has also copied 14 *.properties files into the jar.

Nevertheless they can not compile or run without additional packages of the Tracking System. In order to achieve an isolated track web application the previously compiled jars are simply moved into the war. The Ant program does all the work with a few simple directives:

The point in applying ant is that all dependent compilations are executed to create an up to date web archive and the move the compiled classes and jars into this archive. Finally the resulting track.war file can be deployed to any Tomcat server without depending on any other binary files or any files in %GTS_HOME%. The dependency graph reveals dependencies to plain Java executed in a Java Virtual Machine (gtsutils and gtsdb) and dependencies to servlet APIs executed by a servlet container (wartools):

conclusion

Now we have gone through the various steps of creating the complete GTS with ant. Yet there is still no need to go into the Java source, since OpenGTS offers a load of possibilities to configure the existing system without modifying Java. This external view should be well understood before starting any programming to avoid conflicts or reinventing existing mechanics of the system. - And even the process of investigating OpenGTS configurations can be experienced without using an IDE by using an ant target that is not part of the ant all compilation, yet depending on various steps. The track.deploy target offers a great setup to interactively test different configurations on the next page.