Ok, so the first thing I did was install the latest JDK. In installed by default to C:\Program Files\Java\jdk1.6.0_03 and as I would like to use ANT, I set the JAVA_HOME environment variable to that path as seen in the screenshot below.
You can get to the environment variable system properties by pressing the Windows key and the Pause button (or alternatively right click on my computer and select properties). From there navigate to the advanced tab and then environment variables. Click New to create a new System variable or double click on an existing one to edit its value.

With that done I downloaded the latest version of Apache Ant (1.7.0 as of this writing) I could find and extracted that to C:\Program Files\Apache Software Foundation\apache-ant-1.7.0 and added the bin folder to the System path. You can see a screenshot of the path modification below.

The next step is to install OpenLaszlo. By default it installs into the program files folder. Do not accept the default path! Install into C:\work\OpenLaszloServer4.0.6 (notice no spaces) as seen in the screenshot below.

The final step is to setup the folders for the development process. I've included a screenshot below of the layout I have.

- The lib subfolder contains all the jars that are dependent for Buccoo to compile properly.
- The res subfolder has a temporary work area (to make some automated tasks simpler) as well as being an easy spot to integrate anything else that may require more than just copying a jar to the lib folder.
- The src folder contains all the sources for the Tapestry side of Buccoo organized in the org.tobago.buccoo package.
- The war folder should be created by the ANT script. It contains the contents as it should be for the final Buccoo.war file. It would copy files from the lib, compiled classes as well as any WAR specific files from the web folder.
- The web folder contains any non-java resources (like Tapestry tml files) and meta-data (like the web.xml in the META-INF) that we want to include in the war.
That's it! Now we're ready to start writing the ant build.xml file to automate the compilation process.
1 comment:
Nice post. You'll find an example ANT build file showing how to compile LZX files out of ANT, bundle apps for deployment at
http://svn.openlaszlo.org/labs/lzproject/trunk/build.xml
The LZProject OpenLaszlo 4 blueprint application explains in detail how you can easily connect OpenLaszlo to a Java back-end.
http://labs.openlaszlo.org/lzproject/
Best regards,
Raju
OpenLaszlo Community Manager
Post a Comment