ADR-004: webservice is packaged as a WAR
Status: Accepted (reason not recorded; observable facts documented 2026-11-06)
Context
Every SOA runs as a container built from the same pattern: eclipse-temurin:25-jdk-alpine, the artifact copied to /opt/app, java -jar.
Six of the seven services default to jar packaging. glacez-soa-webservice/impl is the only module with <packaging>war</packaging>, and its image adds a *.war:
ADD glacez-soa-webservice*.war /opt/app.war
CMD ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "/opt/app.war"]
Decision
webservice keeps WAR packaging. It is still executed with java -jar — an executable archive, not a deployment into an external servlet container.
The reason for choosing WAR originally is not recorded anywhere in the repositories. This ADR records the fact and its consequences rather than inventing a rationale; if the packaging is ever changed, the change is a decision that should be captured here.
Alternatives considered
- Switch to
jarfor uniformity. Low risk on paper (the artifact is executed, not deployed), but it touches the build, the Dockerfile, the CI image step and the only service whose MVC setup is hand-written. Not worth doing without a reason. - Deploy the WAR into a real servlet container. Would change the runtime model of the API surface and gains nothing the current image does not already provide.
Consequences
- Servlet-related configuration and the container's class-loading shape differ from the other six services; a packaging-sensitive change must be verified on
webservicespecifically. - The build output path and the Dockerfile's
ADDglob are WAR-specific (target/…/WEB-INF/classes), so a build mistake here surfaces as a missing class in the image, not as a compile error. - Build and release steps for
webserviceare not interchangeable with the other SOAs.