A "starter" project for building a one-page-web app using AngularJS, Bootstrap, ApacheCXF and Hibernate.
- Prerequisites
- Ant 1.9.3 or >
- JDK 1.7 or >
- MySql 5.5 or >
- App source: clone repo or download source .zip
- Download dependencies and create user properties file
cd build
ant init
Should download all dependencies and then report an error wrt a missing properties files. Create this file in build
folder
- Build release
ant release
A .zip file will be created in the release
folder
App should work with any modern servlet engine. Steps to deploy are:
- Create an etc folder and place folders from /etc folder of zip into it
- Edit the files in etc folder changing paths, passworsd etc
- Use database scripts found in /sql to create the database
- Copy the opwas.war file into your container's web apps folder
- Configure your container with a system property named opwas.config.file and set it to the location of the opwas.properties file
The project includes config files to run the app under Vagrant. To use them do the following:
- Build a release of the app as detailed above
- Install Vagrant from https://www.vagrantup.com/
- Create a folder to run vagrant from (eg opwas-vagrant)
- Copy the files from src/vagrant into opwas-vagrant
- Download jetty 8.1.16 .tar.gz file and place into opwas-vagrant http://eclipse.org/downloads/download.php?file=/jetty/stable-8/dist/jetty-distribution-8.1.16.v20140903.tar.gz&r=1
- Copy the etc,sql folders and opwas.war from release/files into opwas-vagrant
- Edit opwas-vagrant/etc/log4j-opwas.xml and change
/play/one-page-web-app-starter/tmp/opwas.log
to/vagrant/logs
- From in opwas-vagrant run
vagrant up
- Once the VM is running browse to http://localhost:8080/opwas/
-
Create a build using Ant as above to ensure environment is set up
-
Install Eclipse Jetty Integration via the Eclipse Marketplace http://eclipse-jetty.sourceforge.net/
-
Import project
-
Right click project, select run as, run with jetty. You will need to ensure that you set a -Dopwas.config.file VM parameter pointing at src/etc/opwas.properties file for run configuration
-
Browse to http://localhost:8080/