These steps will quickly get JumpStart 4.2.n running and editable.
- Unzip. Unzip the downloaded file, which will give you a directory called jumpstart-4.2.0 or similar.
- Get Jetty. This will be your web server during development.
- Go to Jetty Downloads and choose to download jetty-5.1.14.tgz.
- Once downloaded, unzip it. Move it to a suitable location (eg. /devel/jetty-5.1.14).
- Get JettyLauncher. This allows Eclipse to run and restart Jetty easily.
- Open the Eclipse update facility (Help > Software Updates > Find and install...).
- Choose Search for new features to install and click Next.
- Click New Remote Site.... Set Name to JettyLancher. Set URL to http://jettylauncher.sourceforge.net/updates/. Click OK.
- Click Finish. JettyLauncher will be installed.
- Get OpenEJB. This will be your embedded EJB container during development.
- Go to OpenEJB Downloads and choose to download openejb-3.1.zip.
- Once downloaded, unzip it. Move it to a suitable location (eg. /devel/openejb-3.1).
- In Eclipse, choose Window > Preferences > Java > Build Path > User Libraries (or in OS X, choose Eclipse > Preferences > Java > Build Path > User Libraries), and
- create a new user library called openejb-3.1-lib, then
- add every JAR in OpenEJB's lib/ directory to the new user library.
- Move JumpStart to your development projects location. Move jumpstart-4.2.0/ (or similar name) to your development area, eg. /devel/jumpstart-4.2.0/ . DO NOT choose a directory whose path contains any spaces, eg. do not use a directory whose path includes C:/Documents and Settings/.
- Open it in Eclipse. Open Eclipse, choose File > New > Java Project, then choose Create project from existing source and set the Directory to your jumpstart directory eg. /devel/jumpstart-4.0.0/. The project can't build just yet so it will show errors.
- Ensure Eclipse is using Java 5.0. Right-click on the project and choose Properties then Java Compiler and ensure Compiler compliance level is 5.0. You may have to turn on Enable project specific settings.
- Run the get-dependent-files target
in the project's build.xml file. You can do it in Eclipse with these steps...
- Open the Ant view and drag build.xml onto it.
- If your internet connection is through a proxy then
modify the setproxy tag in build.xml, eg.
- Run the get-dependent-files target in the project's build.xml file. If it has problems due to the maven repository being slow or inaccessible, open the project's build.properties and choose a different maven.repo.root, then try running the target again.
business/src/main/lib-compile/ /lib-provided/ /lib-runtime/ /lib-runtime-openejb/ /test/lib-test/ web/src/main/lib-compile/ /lib-provided/
- Refresh the project by right-clicking on the project in Eclipse and choosing Refresh. This should build the project successfully and show no errors. It will also run exploder.xml, which will build the exploded/ directory. You can see how has this been configured by displaying the project's properties and choosing Builders.
- Set exploded directory to derived by right-clicking on it in Eclipse, choosing Properties, and ticking the derived checkbox. Then click OK.
- Overwrite the database. OpenEJB will use its own Hypersonic database (HSQLDB) by default. We will overwrite its contents. In Eclipse...
- Open the data_util.properties file and modify the hsqldb.jar.dir and hsqldb.data.dir properties. Use relative paths eg. ../openejb-3.1/lib .
- Run the reset-database-hsqldb target in the project's build.xml file. It will prompt you to confirm. It will then replace the database contents in OpenEJB.
- Configure and Start Jetty. In Eclipse...
- Choose Run > Open Run Dialog.... The Run window will appear.
- Right-click on Jetty Web and choose New.
- Set the variables to values similar to those shown in the diagram on the left.
NCSA logging is logging of the URLs received by Jetty. It is optional.
- Click on the Arguments tab.
- Click on the Classpath tab.
- Click Run.
- Check JumpStart is running by pointing your web browser at http://localhost:8080/jumpstart.
- Confirm you can log in by going to http://localhost:8080/jumpstart/theapp/login and logging in with secofr for the Login ID and secofr for the Password.
- Finished! There are 2 other users: admin and john, with passwords admin and john, respectively.
- Try making a mod! As another quick test...
- In Eclipse, locate the template of the front page -
- and modify it a little.
If you change the template or java of a page you'll see the change just a moment later in your running application.
- Remember - if the application isn't running then you can still immediately preview the mod by opening the .tml file with a web browser, or in Eclipse try Open With > Web Browser if that option is available. This is one of Tapestry's many strengths.
- In Eclipse, locate the template of the front page - web/src/main/java/pages/Index.tml - and modify it a little.
- Explore! Visit the Orientation, Tips, Troubleshooting and Bugs & Enhancements pages for more info.