A Java EE 8 web application for displaying Jefferson Lab weather for use in Presenter.
This application requires a Java 11+ JVM and standard library to run, plus a Java EE 8+ application server (developed with Wildfly).
- Download Wildfly 26.1.3
- Configure Wildfly and start it
- Download weather.war and deploy it to Wildfly
- Navigate your web browser to localhost:8080/weather
Wildfly must be pre-configured before the first deployment of the app. The wildfly bash scripts can be used to accomplish this. Specifically the tuckey url rewrite lib needs to be installed in Wildfly. Example:
./server-setup.sh server.env config_provided
where server.env is of the form:
WILDFLY_APP_HOME=/opt/jboss/wildfly
WILDFLY_RUN_USER=jboss
WILDFLY_PASS=admin
WILDFLY_USER=admin
ADD_JBOSS_MODULES='global|org.tuckey.urlrewritefilter|https://repo1.maven.org/maven2/org/tuckey/urlrewritefilter/4.0.4/urlrewritefilter-4.0.4.jar|javaee.api,org.jboss.as.web'
Alternatively recompile the app with the tuckey lib already bundled in the war by replacing providedCompile
with implementation
in the Gradle build here.
Optionally set the environment variable ACCUWEATHER_API_KEY
. See: https://developer.accuweather.com. If unset or if the accuweather request fails then forecast data falls back to NWS data. If AccuWeather data is available, but you'd like to see NWS forecast data append URL parameter forceNWS
to the app url.
This project is built with Java 17 (compiled to Java 11 bytecode), and uses the Gradle 7 build tool to automatically download dependencies and build the project from source:
git clone https://github.com/JeffersonLab/weather
cd weather
gradlew build
Note: If you do not already have Gradle installed, it will be installed automatically by the wrapper script included in the source
Note for JLab On-Site Users: Jefferson Lab has an intercepting proxy
- Bump the version number in the VERSION file and commit and push to GitHub (using Semantic Versioning).
- The CD GitHub Action should run automatically invoking:
- The Create release GitHub Action to tag the source and create release notes summarizing any pull requests. Edit the release notes to add any missing details. A war file artifact is attached to the release.
At JLab this app is found at ace.jlab.org/weather and internally at acctest.acc.jlab.org/weather. However, those servers are proxies for wildfly6.acc.jlab.org
and wildflytest6.acc.jlab.org
respectively. A deploy script is provided to automate wget and deploy. Example:
/root/setup/deploy.sh weather v1.2.3
JLab Internal Docs: InstallGuideWildflyRHEL9