This dummy project shows how to use Gradle's Multi-project support to modularize the codebase of a Jersey-based web application into single Git repositories.
- Jersey-based web application
- Subprojects folder holds Gradle subprojects
- Automatic subproject discovery: Includes and compiles all subprojects with name prefix 'extension-', e.g. 'extension-loremipsum'.
- Embedded Jetty web server (powered by Gretty).
Clone this repo with git clone --recursive [email protected]:Alexander-Krause/jersey-gradle-multiproject.git
and run gradlew appStart
or gradlew appRun
inside the folder to start the web server.
Open your browser and navigate to http://localhost:8081/core/dummy/show
or http://localhost:8081/extension/loremipsum/show.
Build .war file with gradle build
and deploy on your own web server.
git clone [email protected]:Alexander-Krause/jersey-gradle-multiproject.git
cd jersey-gradle-multiproject
git submodule update --init --recursive
git submodule foreach --recursive git checkout master
- Use
gradle appStart
orgradle appRun
- For Eclipse: Import as gradle project.
- The embedded core subproject can be outsourced as well.