setup tests for HelloWorldService

This commit is contained in:
2025-12-05 18:04:38 +01:00
parent 290131269e
commit c5c602d599
8 changed files with 625 additions and 3 deletions

View File

@ -1,6 +1,22 @@
# Multi-stage Dockerfile for JAX-WS Hello World Service
# Stage 1: Build the application
# Stage 1: Test the application
FROM maven:3.8.6-openjdk-8 AS tester
# Set working directory
WORKDIR /app
# Copy pom.xml and download dependencies (for better caching)
COPY pom.xml .
RUN mvn dependency:go-offline -B
# Copy source code
COPY src ./src
# Run tests
RUN mvn test
# Stage 2: Build the application
FROM maven:3.8.6-openjdk-8 AS builder
# Set working directory
@ -16,7 +32,7 @@ COPY src ./src
# Build the application
RUN mvn clean package -DskipTests
# Stage 2: Run the application
# Stage 3: Run the application
FROM tomcat:9.0-jdk8
# Remove default Tomcat applications