1. Start by making a Fork of wcc-backend repository. Click on the Fork symbol in the top right corner.
2. Clone your new fork of the repository in the terminal/CLI on your computer with the following command:
git clone https://github.com/<your-github-username>/wcc-backend
This project uses Java 21, you can run in 21.0.2 or 21.0.3. If you have installed a different version on your machine and don't want to remove it, you can use SDKMAN development tool.
Open your terminal and run the following command:
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk list java
sdk install java 21.0.2-open
sdk use java 21.0.2-open
Set the default Java version for your system:
sdk default java 21.0.2-open
java -version
Install lombok plugin and enable Annotation Processing, as the image below:
Install checkstyle plugin and the configuration will be enabled
A google-java-format IntelliJ plugin is available from the plugin repository. To install it, go to your IDE's settings and select the Plugins category. Click the Marketplace tab, search for the google-java-format plugin, and click the Install button.
The plugin will be disabled by default. To enable it in the current project, go to File→Settings...→google-java-format Settings (or IntelliJ IDEA→Preferences...→Other Settings→google-java-format Settings on macOS) and check the Enable google-java-format checkbox. (A notification will be presented when you first open a project offering to do this for you.)
To enable it by default in new projects, use File→Other Settings→Default Settings....
When enabled, it will replace the normal Reformat Code and Optimize Imports actions.
The google-java-format plugin uses some internal classes that aren't available without extra configuration. To use the plugin, go to Help→Edit Custom VM Options... and paste in these lines:
--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
Once you've done that, restart the IDE.
./gradlew clean build
Note: Make sure you have docker daemon running locally to be able to run integration test, by
execute docker ps
./gradlew clean bootJar
docker run --pull always --name surrealdb -p 8000:8000 -d surrealdb/surrealdb:latest start
./gradlew bootRun
./gradlew test jacocoTestReport
./gradlew clean test jacocoTestCoverageVerification
./gradlew pmdMain
./gradlew pmdTest
Get the “SonarQube” image using the command
docker pull sonarqube
Start the "SonarQube" instance
docker run -d --name sonarqube -e SONAR_ES_BOOTSTRAP_CHECKS_DISABLE=true -p 9000:9000 sonarqube:latest
Ref: https://docs.sonarsource.com/sonarqube/latest/try-out-sonarqube/
Generate token to replace in the project.
./gradlew sonarQubeAnalysis -PlocalProfile
./gradlew clean bootJar
docker compose -f docker/docker-compose.yml up --build
cd docker
docker compose down
build create jar: ./gradlew clean bootJar
start app via docker
docker build -t wcc-backend .
docker run -d -p 8080:8080 --name wcc-backend-container wcc-backend
docker build -t wcc-backend .
docker run -p 8080:8080 -p 5005:5005 --name wcc-backend-container wcc-backend
If you are running your Spring Boot application inside a Docker container, ensure that the external directory path is accessible from within the container.
docker run -v ${PWD}/data:/app/data -d -p 8080:8080 --name wcc-backend-container wcc-backend
docker run -v $(pwd)/data:/app/data -d -p 8080:8080 --name wcc-backend-container wcc-backend
fly auth login
or create account fly auth signup
./gradlew clean bootJar
fly launch
./gradlew clean bootJar
fly deploy