This is a GITB validator wrapping the e-Ark validator for the validation of eArchiving information packages.
The service is implemented in Java, using the Spring Boot framework. It is built and packaged using Apache Maven.
The following prerequisites are required:
- To build: JDK 17+, Maven 3.2+.
- To run: JRE 17+.
- Build using
mvn clean package
. - Once built you can run the application in two ways:
a. With maven:mvn spring-boot:run
.
b. Standalone:java -jar ./target/eark-validator-VERSION.jar
. - The service's WSDL file is accessible at http://localhost:8080/services/validation?WSDL.
This project uses Spring Boot's live reloading capabilities. When running the application from your IDE or through Maven, any change in classpath resources is automatically detected to restart the application.
Running this application as a Docker container is very simple as described in Spring Boot's Docker documentation. The first step is to Install Docker and ensure it is up and running. The next steps depend on whether or not you are running Docker natively or through a virtual machine.
In this case you can build the Docker image through Maven:
- Build JAR file with
mvn package
. - Build the Docker image with
mvn dockerfile:build
.
In this case you will need to build the image manually:
- Create a temporary folder.
- Copy in this folder the JAR file from the
target
folder. - Copy in this folder the
Dockerfile
file from the project root. - Build from this folder using
docker build -t local/eark-validator --build-arg JAR_FILE=eark-validator-VERSION.jar .
.
Note that the local/eark-validator name for the image matches what is configured for the Maven build. You can adapt this
as needed in the commands or the pom.xml
file.
Assuming an image name of local/eark-validator
, it can be ran using docker --name eark-validator -p 8080:8080 -d local/eark-validator
.
The WSDL file can now be accessed at http://DOCKER_MACHINE:8080/services/validation?WSDL.