RichRates is a sample LGPL-licenced web application that demonstrates usage of Java EE 6 platform technologies such as JSF 2, RichFaces 4, CDI and Bean Validation. The application consists of three pages. The first page contains a calculator with which it is possible to convert Euros to about 30 foreign currencies and vice versa. The second page contains a table with all available exchange rates for selected day. The last page displays a chart for one selected currency. It is possible to select time range for which this chart will be displayed. All data are provided by European Central Bank. Since it is a demo application, there are only data for last 90 days, excluding weekends and state holidays.
The application demonstrates lot of new JSF features, such as bean annotations, new scopes, implicit navigation, View Declaration Language and JSF2's Ajax tag.
- Apache Maven 3.0.3 or newer
- OpenJDK 6 or Sun JDK 6 or newer
- JBoss AS 7.0.2 or newer
-
Open a command line and navigate to the root of the JBoss server directory.
-
The following shows the command line to start the server with the web profile:
For Linux: JBOSS_HOME/bin/standalone.sh For Windows: JBOSS_HOME\bin\standalone.bat
-
Make sure you have started the JBoss Server as described above.
-
Open a command line and navigate to the root directory of application.
-
Type this command to build and deploy the archive:
mvn clean package jboss-as:deploy
-
This will deploy
target/richrates.war
to the running instance of the server.
The application will be running at the following URL: http://localhost:8080/richrates.
-
Make sure you have started the JBoss Server as described above.
-
Open a command line and navigate to the root directory of application.
-
When you are finished testing, type this command to undeploy the archive:
mvn jboss-as:undeploy
There are three types of tests featured:
- TestNG unit tests;
- Arquillian functional tests; and
- Selenium functional tests.
To execute unit tests, run
mvn clean package
To execute only Arquillian functional tests, run
mvn clean verify -P jbossas-managed-71,ftest
To execute both unit tests and functional tests, run
mvn clean verify -P jbossas-managed-71,all-tests
All functional tests run in real Java EE container so the commands above will download JBoss AS 7.1.1.Final from a Maven repository, start the container, deploy the application, start Firefox, and execute the tests.
The application uses data provided by European Central Bank. The images of flags provided by RedpixArt Design.