1. Introduction
This guide provides step-by-step instructions for installing and deploying the backend microservice component of Virifi's Solution Proposal for the Central Bank of Jordan (CBJ) Digital Signature Challenge. The backend is responsible for handling signing operations, validation, and PKI interactions.
2. Prerequisites
Ensure the following components are installed on the deployment system:
JDK 21.0.2
Apache Tomcat 10.1.40
Apache Maven
Ensure Maven is installed and configured correctly on your system.
3. Build Instructions
Navigate to your project directory and perform the following steps:
3.1 Compile the Project
Clean old compiled files and compile the project:
mvn clean compile
3.2 Package the Project
Compile and create the JAR or WAR file inside the target/ directory:
mvn clean package
3.3 Install Locally
Compile, package, and install the output into your local Maven repository:
mvn clean install
3.4 Skipping Tests (Optional)
If you wish to skip tests during the build:
mvn clean install -DskipTests
3.5 Using Maven Wrapper (Optional)
If the project includes a Maven Wrapper (mvnw file), use:
./mvnw clean compile
3.6 Using an IDE
In IntelliJ IDEA or Eclipse, right-click the project, select Maven, and choose compile, package, or install.
4. Deploying on Apache Tomcat
Once the project is successfully built:
Navigate to:
%PATH%\cbj-java-dss-integration\apache-tomcat-10.1.40\bin
Run the startup script:
For Windows:
startup.bat
For Linux/MacOS:
./startup.sh
The Java server will start running on the default port:
http://localhost:8080
5. Stopping the Server
To gracefully stop the server:
For Windows:
shutdown.bat
For Linux/MacOS:
./shutdown.sh
6. Notes
Ensure environment variables like
JAVA_HOMEandMAVEN_HOMEare set properly.Ports can be customized by editing the
server.xmlfile inside the Tomcatconf/directory.Validate Maven and Java installations using
mvn -vandjava -versionbefore beginning the build.
