This project is an application skeleton for a typical JEE backend application. You can use it to quickly bootstrap your projects and dev environment.
The seed contains a Patient Management sample application and is preconfigured to install the JEE framework and a bunch of development and testing tools for instant development gratification.
The app doesn't do too much, just shows how to use different JEE standards and other suggested tools together:
You can also check out our Spring Boot implementation.
To get you started you can simply clone the seed-jee
repository and install the dependencies:
You need git to clone the seed-jee
repository.
You will need Java™ SE Development Kit 8 and Maven.
If you are working in a Windows environment, you could have some issues if the maven local repository is in a folder with a name containing white spaces (quite common as the default value is ${user.home}/.m2/repository). In order to avoid this, it is fully recommended that you specify another folder in your maven settings.xml file.
For example:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>/dev/repo</localRepository>
...
Clone the seed-jee
repository using git:
git clone https://github.com/systelab/seed-jee.git
cd seed-jee
If you just want to start a new project without the seed-jee
commit history then you can do:
git clone --depth=1 https://github.com/systelab/seed-jee.git <your-project-name>
The depth=1
tells git to only pull down one commit worth of historical data.
In order to install the dependencies you must run:
mvn install
To generate the reports including the Allure test report, you must run:
mvn site
Once the reports have been generated, you can check them by browsing the folder target/site and opening the file allure-maven.html
In order to run the application, you must install a WildFly and deploy the generated war file.
Another option could be to change the pom.xml file and remove the jacoco from the <cargo.jvmargs>.
<cargo.jvmargs>${cargo.container.debug.jvmargs}</cargo.jvmargs>
After the update type the following command:
mvn clean package cargo:run
Finally browse to: http://127.0.0.1:13080/seed/swagger/ (the port could changes as it is defined in the pom file).
Use 'Systelab' as username and password.
Note: If you are using the angular seed, remember to set the API_BASE_PATH in the environment to match the same port.
There is an Automated Build Task in Docker Cloud in order to build the Docker Image. This task, triggers a new build with every git push to your source code repository to create a 'latest' image. There is another build rule to trigger a new tag and create a 'version-x.y.z' image
You can always manually create the image with the following command:
docker build -t systelab/seed-jee .
The image created, will contain a wildfly server with the application war deployed.
docker run -e MYSQL_HOST=ip -e MYSQL_PORT=port -e MYSQL_DATABASE=database -e MYSQL_USER=user -e MYSQL_PASSWORD=password -p 8080:8080 systelab/seed-jee
The app will be available at http://localhost:8080
In the github root folder, you will find information on how to use docker-compose, a tool for define and run multi-container Docker applications.
In the github root folder, you will find information on how to run the solution in a Kubernetes cluster.