# Multi-stage Docker image for Activiti multi-module project # Build stage: use official Maven image with IBM Java 8 to compile the project FROM maven:3.9.15-ibmjava-8 AS build WORKDIR /workspace # Copy the entire repository into the container COPY . . # Build and install all modules; skip running tests for faster builds RUN mvn -B -DskipTests install # Runtime stage: use a slim OpenJDK runtime image to run applications FROM eclipse-temurin:17-jre-focal AS runtime WORKDIR /app # Bring Maven's local repository (built artifacts) into the runtime image COPY --from=build /root/.m2 /root/.m2 # Optional: you can add a specific entrypoint/command here depending on the target artifact # Since this is a multi-module project (packaged as a pom), there is no single runnable jar by default. # The container will remain ready for integration and inspection. CMD ["sh", "-c", "echo 'Activiti multi-module project built. Artifacts are available in /root/.m2/repository' && sleep infinity]
- Failing step (command/step):
- [build 4/4] RUN mvn -B -DskipTests install
- Exact error message and exit code:
- The build ends with:
- "ERROR] Failed to execute goal com.mycila:license-maven-plugin:5.0.0:check (validate-license) on project activiti-parent:
- ERROR] The plugin com.mycila:license-maven-plugin:5.0.0 has unmet prerequisites:
- ERROR] Required Java version 11 is not met by current version: 1.8.0_491
- ERROR] -> [Help 1]
- ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
- ERROR] Re-run Maven using the -X switch to enable full debug logging.
- ERROR] For more information about the errors and possible solutions:
- ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginIncompatibleException"
- Exit code: 1
- Missing packages or files mentioned:
- None. The issue is a Java version mismatch rather than a missing dependency/file.
- Version mismatch information:
- Plugin: com.mycila:license-maven-plugin:5.0.0 (check/validate-license)
- Required Java version: 11
- Current Java version: 1.8.0_491 (Java 8)
- Build environment uses Maven image with IBM Java 8 (maven:3.9.15-ibmjava-8), contributing to the Java version mismatch.# Multi-stage Docker image for Activiti multi-module project # Build stage: use official Maven image with OpenJDK 11 to compile the project FROM maven:3.9.15-openjdk-11 AS build WORKDIR /workspace # Copy the entire repository into the container COPY . . # Build and install all modules; skip running tests for faster builds RUN mvn -B -DskipTests install # Runtime stage: use a slim OpenJDK runtime image to run applications FROM eclipse-temurin:17-jre-slim AS runtime WORKDIR /app # Bring Maven's local repository (built artifacts) into the runtime image COPY --from=build /root/.m2 /root/.m2 # Optional: you can add a specific entrypoint/command here depending on the target artifact # Since this is a multi-module project (packaged as a pom), there is no single runnable jar by default. # The container will remain ready for integration and inspection. CMD ["sh", "-c", "echo 'Activiti multi-module project built. Artifacts are available in /root/.m2/repository' && sleep infinity]
Image maven:3.9.15-openjdk-11 NOT found on Docker Hub.
Image maven:3.9.15 exists on Docker Hub.
Concise summary of actionable items and details
- Project/branch notes
- Activiti project; master now contains content from the previous development branch. For 6.x contributions, use the 6.x branch.
- Homepage: http://activiti.org
- GitBook: https://activiti.gitbooks.io/activiti-7-developers-guide/content/
- Repos/files references
- License header file: `[Alfresco_Software.xml](./ide-configuration/intellij-configuration/copyright/Alfresco_Software.xml)`
- IntelliJ configuration (quick-start)
- Force language level 21 (Project Structure > Modules > Sources > Language level = 21 ...)
- Resource patterns: set to `!?*.java`
- JVM options to avoid StackOverflowError: add `-J-Xss1024k` in Java Compiler
- Google Java Style: import and activate GoogleStyle XML
- EditorConfig presence; editorconfig usage for encoding/line endings
- File encoding/line endings: Global Encoding UTF-8; Default encoding for properties ISO-8859-1; Line separator Unix
- Tab/indent: Java: Use tab = off; Tab size 4; Indent 4; Continuation 8; XML: Use tab = off; Tab size 2; Indent 2; Continuation 4
- File headers: remove `@author` and default Javadoc
- License header: Import `Alfresco_Software.xml` and set Default project copyright to “Alfresco Software”
- FAQ (key rationale)
- Avoid `@author` in source: maintenance pain, ownership issues; Git history is the authoritative authorship source; credit via Open Hub and GitHub.
- Development commands
- Add license header: `mvn license:format`
- Checkstyle: `mvn checkstyle:check -DskipCheckstyle=false`
- Site: `mvn clean site site:stage` (site at `target/staging/index.html`)
- CI/CD (GitHub Actions)
- Secrets required:
- BOT_GITHUB_TOKEN: token to launch other builds on GH
- BOT_GITHUB_USERNAME: username to issue propagation PRs
- NEXUS_USERNAME: internal Maven repo username
- NEXUS_PASSWORD: internal Maven repo password
- SLACK_NOTIFICATION_BOT_TOKEN: token to notify Slack on failure
- Dependabot PRs must have label: “CI” to be validated by CI
- Extras
- Read more via the GitBook link above; badges are present in the repo README.# Multi-stage Docker image for Activiti multi-module project # Build stage: use official Maven image with a reasonably new JDK to compile the project FROM maven:3.9.15 AS build WORKDIR /workspace # Copy the entire repository into the container COPY . . # Build and install all modules; skip running tests for faster builds RUN mvn -B -DskipTests install # Runtime stage: use a slim OpenJDK runtime image to run applications FROM eclipse-temurin:17-jre WORKDIR /app # Bring Maven's local repository (built artifacts) into the runtime image COPY --from=build /root/.m2 /root/.m2 # Expose a default command that keeps the container alive while allowing inspection CMD ["bash", "-lc", "echo 'Activiti multi-module project built. Artifacts are available in /root/.m2/repository'; sleep infinity"]
# Docker ignore file for Activiti project .git node_modules target **/*.log .DS_Store *.tmp *.bak .env .settings/ .idea/ *.iml "artifactId-placeholder"
Build timed out after 600s
# Multi-stage Docker image for Activiti multi-module project # Build stage: use official Maven image with a reasonably new JDK to compile the project FROM maven:3.9.15 AS build WORKDIR /workspace # Copy the entire repository into the container COPY . . # Build and install all modules; skip running tests for faster builds # Also skip license checks to avoid Java version constraints in CI environments RUN mvn -B -Dlicense.skip=true -DskipTests install # Runtime stage: use a slim OpenJDK runtime image to run applications FROM eclipse-temurin:17-jre WORKDIR /app # Bring Maven's local repository (built artifacts) into the runtime image COPY --from=build /root/.m2 /root/.m2 # Expose a default command that keeps the container alive while allowing inspection # Uses sh for compatibility CMD ["sh", "-lc", "echo 'Activiti multi-module project built. Artifacts are available in /root/.m2/repository'; sleep infinity"]
Build timed out after 600s
# Multi-stage Docker image for Activiti multi-module project # Build stage: use official Maven image with a reasonably new JDK to compile the project FROM maven:3.9.15 AS build WORKDIR /workspace # Copy the entire repository into the container COPY . . # Build only the top-level activiti-api module (and its internal modules as needed), skipping tests for speed WORKDIR /workspace/activiti-api RUN mvn -B -DskipTests install # Runtime stage: use a slim OpenJDK runtime image to run applications FROM eclipse-temurin:17-jre WORKDIR /app # Bring Maven's local repository (built artifacts) into the runtime image COPY --from=build /root/.m2 /root/.m2 # Expose a default command that keeps the container alive while allowing inspection # Uses sh for compatibility CMD ["sh", "-lc", "echo 'Activiti multi-module project built. Artifacts are available in /root/.m2/repository'; sleep infinity"]
Concerns: The runtime image does not start any service; the provided CMD only echoes a message and sleeps, so smoke tests must rely on artifacts in /root/.m2 to exercise functionality, which may not provide a realistic health endpoint., The build step builds only the activiti-api module by chdir-ing into /workspace/activiti-api, which may fail if the module layout or parent POM requires reactor build from the repo root. Consider building the full reactor (e.g., mvn -B -DskipTests install from root with -am -pl ...), or explicitly document the intended module to build., COPY . . copies the entire repo into the image during build; this can bloat the image and may include unnecessary files. If possible, constrain to necessary files for the build., No explicit EXPOSE or non-root user setup is provided; for production readiness you may want to expose a port for a service and run as a non-root user. Smoke [FAIL]: sh -lc 'jar tf /root/.m2/repository/org/activiti/activiti-api/*/activiti-api-*.jar | head -n 1 Output: sh: 2: Syntax error: Unterminated quoted string Smoke [FAIL]: sh -lc 'jar tf /root/.m2/repository/org/activiti/activiti-api/*/activiti-api-*.jar | head -n 1 | grep -q ".class Output: sh: 2: Syntax error: Unterminated quoted string Smoke [FAIL]: sh -lc 'if ls /root/.m2/repository/org/activiti/activiti-engine/*/activiti-engine-*.jar >/dev/null 2>&1; then echo JAR_FOUND; else echo FAIL; exit 1; fi Output: sh: 2: Syntax error: Unterminated quoted string
# Multi-stage Docker image for Activiti multi-module project # Build stage: use official Maven image with a reasonably new JDK to compile the project FROM maven:3.9.15 AS build WORKDIR /workspace # Copy the entire repository into the container COPY . . # Build all modules; skip running tests for faster builds RUN mvn -B -DskipTests install # Runtime stage: use a slim OpenJDK runtime image to run applications FROM eclipse-temurin:17-jre WORKDIR /app # Bring Maven's local repository (built artifacts) into the runtime image COPY --from=build /root/.m2 /root/.m2 # Provide a minimal, safe default command to keep the container alive for inspection # Uses sh for compatibility CMD ["sh", "-lc", "echo Activiti multi-module project built. Artifacts are in /root/.m2/repository; sleep infinity"]
Build timed out after 600s
# Multi-stage Docker image for Activiti multi-module project # Build stage: use official Maven image with a reasonably new JDK to compile the project FROM maven:3.9.15 AS build WORKDIR /workspace # Copy the entire repository into the container COPY . . # Build only a subset of modules to speed up the build (and ensure jars exist in local repo) # Build the Activiti API Process Model module and its dependencies RUN mvn -B -DskipTests -Dlicense.skip=true -pl activiti-api/activiti-api-process-model -am install # Runtime stage: use a slim OpenJDK runtime image to run applications FROM eclipse-temurin:17-jre WORKDIR /app # Bring Maven's local repository (built artifacts) into the runtime image COPY --from=build /root/.m2 /root/.m2 # Provide a minimal, safe default command to keep the container alive for inspection # Uses sh for compatibility CMD ["sh", "-lc", "echo Activiti multi-module project built. Artifacts are in /root/.m2/repository; sleep infinity"]
Concerns: The runtime image contains no runnable service or startup script; smoke tests rely on validating artifacts inside the Maven local repository, which is unusual for a runtime image, COPY . . in the build stage may pull unnecessary files and could bloat the build context; consider using a more selective copy or a .dockerignore, Module path used in -pl activiti-api/activiti-api-process-model might be brittle if the module structure changes; ensure this matches the actual module path Smoke [FAIL]: sh -lc "j=$(find /root/.m2 -name activiti-api-process-model-*.jar -print -quit); if [ -z \"$j\" ]; then echo FAIL_NO_JAR; exit 1; fi; echo Found jar: $j; jar tf \"$j\" | head -n 5 Output: sh: 2: Syntax error: Unterminated quoted string
# Multi-stage Docker image for Activiti multi-module project # Build stage: use official Maven image with a reasonably new JDK to compile the project FROM maven:3.9.15 AS build WORKDIR /workspace # Copy the entire repository into the container COPY . . # Build the full reactor to produce all artifacts in the local Maven repository RUN mvn -B -DskipTests install # Runtime stage: use a slim OpenJDK runtime image to run applications FROM eclipse-temurin:17-jre WORKDIR /app # Bring Maven's local repository (built artifacts) into the runtime image COPY --from=build /root/.m2 /root/.m2 # Provide a minimal, safe default command to keep the container alive for inspection # Uses sh for compatibility CMD ["sh", "-lc", "echo Activiti multi-module project built. Artifacts are in /root/.m2/repository; sleep infinity"]
Build timed out after 600s
# Multi-stage Docker image for Activiti multi-module project # Build stage: use official Maven image with a reasonably new JDK to compile the project FROM maven:3.9.15 AS build WORKDIR /workspace # Copy the entire repository into the container COPY . . # Build all modules; skip running tests for faster builds # Also skip license checks to avoid Java version constraints in CI environments RUN mvn -B -DskipTests -Dlicense.skip=true install # Runtime stage: use a slim OpenJDK runtime image to run applications FROM eclipse-temurin:17-jre-slim AS runtime WORKDIR /app # Bring Maven's local repository (built artifacts) into the runtime image COPY --from=build /root/.m2 /root/.m2 # Provide a minimal, safe default command to keep the container alive for inspection # Uses /bin/sh for compatibility CMD ["sh", "-c", "echo Activiti multi-module project built. Artifacts are in /root/.m2/repository; sleep 86400"]
Image eclipse-temurin:17-jre-slim NOT found on Docker Hub.
Image eclipse-temurin:17-jre exists on Docker Hub.
# Multi-stage Docker image for Activiti multi-module project # Build stage: use official Maven image with a reasonably new JDK to compile the project FROM maven:3.9.15 AS build WORKDIR /workspace # Copy the entire repository into the container COPY . . # Build all modules; skip running tests for faster builds RUN mvn -B -DskipTests install # Runtime stage: use a slim OpenJDK runtime image to run applications FROM eclipse-temurin:17-jre AS runtime WORKDIR /app # Bring Maven's local repository (built artifacts) into the runtime image COPY --from=build /root/.m2 /root/.m2 # Provide a minimal, safe default command to keep the container alive for inspection # Uses /bin/sh for compatibility CMD ["sh", "-c", "echo Activiti multi-module project built. Artifacts are in /root/.m2/repository; sleep 86400"]
Build timed out after 600s
# Multi-stage Docker image for Activiti multi-module project # Build stage: use official Maven image with a reasonably new JDK to compile the project FROM maven:3.9.15 AS build WORKDIR /workspace # Copy the entire repository into the container COPY . . # Build all modules; skip running tests for faster builds RUN mvn -B -DskipTests -Dlicense.skip=true install # Runtime stage: use a slim OpenJDK runtime image to run applications FROM eclipse-temurin:17-jre AS runtime WORKDIR /app # Bring Maven's local repository (built artifacts) into the runtime image COPY --from=build /root/.m2 /root/.m2 # Provide a minimal, safe default command to keep the container alive for inspection # Uses /bin/sh for compatibility CMD ["sh", "-c", "echo Activiti multi-module project built. Artifacts are in /root/.m2/repository; sleep 86400"]
FROM maven:3.9.15-eclipse-temurin-17 AS builder
WORKDIR /workspace/activiti-api
COPY . .
RUN mvn -B -DskipTests install -f pom.xml
FROM eclipse-temurin:17-jre-slim AS runtime
WORKDIR /app
COPY --from=builder /workspace/activiti-api /app/activiti-api
# Create a startup script that locates and runs the built JAR
RUN set -e; \
cat > /app/activiti-api/run.sh << 'EOS'
#!/bin/sh
set -e
JAR=$(find . -name "*.jar" 2>/dev/null | head -n 1)
if [ -z "$JAR" ]; then
echo "No runnable jar found"
exit 1
fi
echo "Running $JAR"
exec java -jar "$JAR"
EOS
RUN chmod +x /app/activiti-api/run.sh
EXPOSE 8080
CMD ["/bin/sh", "/app/activiti-api/run.sh"]
FROM maven:3.9.15-eclipse-temurin-17 AS builder
WORKDIR /workspace
COPY . .
RUN mvn -B -DskipTests install -f activiti-api/pom.xml
FROM eclipse-temurin:17-jre AS runtime
WORKDIR /app
COPY --from=builder /workspace /app
RUN set -e; \
cat > /app/run.sh <<'EOS'
#!/bin/sh
set -e
JAR=$(find /app -name "*.jar" -type f 2>/dev/null | head -n 1)
if [ -z "$JAR" ]; then
echo "No runnable jar found"
exit 1
fi
echo "Running $JAR"
exec java -jar "$JAR"
EOS
RUN chmod +x /app/run.sh
EXPOSE 8080
CMD ["/bin/sh", "/app/run.sh"]
- Build status: build_failed
- Key concerns
- Final image copies the entire workspace; may include sources/build artifacts. Recommendation: copy only the built jar to reduce image size.
- Health checks rely on /actuator/health or /health; these paths may vary. Recommendation: add an explicit HEALTHCHECK in the Dockerfile.
- Build error
- Failing step: RUN mvn -B -DskipTests install -f activiti-api/pom.xml
- Maven error: org.apache.maven.plugins:maven-enforcer-plugin:3.6.2:enforce (enforce-java) on project activiti-api
- Rule 0: RequireJavaVersion failed
- Detected JDK /opt/java/openjdk is version 17.0.19 which is not in the allowed range [25,)
- Help hints: re-run with -e or with -X for debug
- Dockerfile context:
- Dockerfile:4
- 2 | WORKDIR /workspace
- 3 | COPY . .
- 4 | >>> RUN mvn -B -DskipTests install -f activiti-api/pom.xml
- 5 |
- 6 | FROM eclipse-temurin:17-jre AS runtime
- Outcome: Docker build failed: process "/bin/sh -c mvn -B -DskipTests install -f activiti-api/pom.xml" did not complete successfully: exit code: 1
- Missing packages/files
- No explicit missing packages/files reported. The failure is due to Java version enforcement, not a missing file.
- Version mismatch details
- Detected JDK version: 17.0.19
- Enforcer rule: RequireJavaVersion → [25,)
- Conclusion: Java version mismatch; build requires Java 25+ but JDK 17 is used.
- Suggested fixes
- Use a base image/JDK version that satisfies the enforcer (Java 25+), or adjust the enforcer/java-version requirements.
- Align Dockerfile to build with the required Java version (or adjust steps to copy only the built artifact).FROM maven:3.9.15-eclipse-temurin-25 AS builder
WORKDIR /workspace
COPY . .
RUN mvn -B -DskipTests install
FROM eclipse-temurin:25-jre AS runtime
WORKDIR /app
COPY --from=builder /workspace /app/workspace
# Launch script: find a runnable jar and execute it
RUN set -e; \
cat > /app/run.sh << 'EOS'
#!/bin/sh
set -e
JAR=$(find /app/workspace -name "*.jar" -print -quit 2>/dev/null)
if [ -z "$JAR" ]; then
echo "No runnable jar found in /app/workspace"
exit 1
fi
echo "Running $JAR"
exec java -jar "$JAR"
EOS
RUN chmod +x /app/run.sh
EXPOSE 8080
CMD ["/bin/sh", "/app/run.sh"]
Build timed out after 600s
Image maven:3.9.15-eclipse-temurin-25 exists on Docker Hub.
Build timed out after 600s
FROM maven:3.9.15-eclipse-temurin-25 AS builder
WORKDIR /workspace
COPY . .
RUN mvn -B -DskipTests install
FROM eclipse-temurin:25-jre AS runtime
WORKDIR /app
COPY --from=builder /workspace /app/workspace
# Launch script: find a runnable jar and execute it
RUN set -e; \
cat > /app/run.sh << 'EOS'
#!/bin/sh
set -e
JAR=$(find /app/workspace -name "*.jar" -print -quit 2>/dev/null)
if [ -z "$JAR" ]; then
echo "No runnable jar found in /app/workspace"
exit 1
fi
echo "Running $JAR"
exec java -jar "$JAR"
EOS
RUN chmod +x /app/run.sh
EXPOSE 8080
CMD ["/bin/sh", "/app/run.sh"]
# Ignore source control and build outputs .git .gitignore target **/target node_modules build Dockerfile README.md LICENSE.txt *.md *.log .vscode .idea *.iml .settings **/*.class **/*.jar
# Ignore source control and build outputs .git .gitignore target **/target node_modules build Dockerfile README.md LICENSE.txt *.md *.log .vscode .idea *.iml .settings **/*.class **/*.jar
Build timed out after 600s
FROM maven:3.9.15-eclipse-temurin-25 AS builder
WORKDIR /workspace
# Copy only the Activiti API multi-module project to keep build context small
COPY activiti-api /workspace/activiti-api
# Build the whole Activiti API project (multi-module) from source
RUN mvn -B -DskipTests install -f activiti-api/pom.xml
FROM eclipse-temurin:25-jre AS runtime
WORKDIR /app
# Copy built project artifacts
COPY --from=builder /workspace/activiti-api /app/activiti-api
# Simple startup script to launch the main runnable jar produced by the build
RUN set -e; \
cat > /app/run.sh << 'EOS'
#!/bin/sh
set -e
# Attempt to locate a runnable jar produced by the build (prefer the runtime module if present)
JAR=$(find /app/activiti-api -name "*.jar" -print 2>/dev/null | head -n 1)
if [ -z "$JAR" ]; then
echo "No runnable jar found in /app/activiti-api"
exit 1
fi
echo "Running $JAR"
exec java -jar "$JAR"
EOS
RUN chmod +x /app/run.sh
EXPOSE 8080
CMD ["/bin/sh","/app/run.sh"]
- VerifyBuild status: build_failed
- Command: Dockerfile:7 RUN mvn -B -DskipTests install -f activiti-api/pom.xml
- Exit code: 1
- Error: Non-resolvable parent POM for org.activiti:activiti-api:9.1.0-SNAPSHOT: Could not find artifact org.activiti:activiti-parent:pom:9.1.0-SNAPSHOT (absent) and 'parent.relativePath' points at wrong local POM @ line 5, 11
- Project: org.activiti:activiti-api:9.1.0-SNAPSHOT (/workspace/activiti-api/pom.xml) has 1 error
- Missing artifacts/files: org.activiti:activiti-parent:pom:9.1.0-SNAPSHOT (absent); note that 'parent.relativePath' points at wrong local POM
- Version/environment context:
- Maven image: maven:3.9.15-eclipse-temurin-25
- Runtime base: eclipse-temurin:25-jre
- Project version: activiti-api:9.1.0-SNAPSHOT (parent 9.1.0-SNAPSHOT not resolvable)
- Additional guidance:
- Re-run Maven with -e for full stack trace; -X for full debug logging
- Help: http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
- Context note: The failure occurs during the multi-module Activiti API build when resolving the parent POM, not during compilation steps.FROM maven:3.9.15-eclipse-temurin-25 AS builder
WORKDIR /workspace
COPY . .
RUN mvn -B -DskipTests install
FROM eclipse-temurin:25-jre AS runtime
WORKDIR /app
COPY --from=builder /workspace /app/workspace
# Startup script to locate and run a runnable jar produced by the build
RUN set -e; \
cat > /app/run.sh << 'EOS'
#!/bin/sh
set -e
JAR=$(find /app/workspace -name "*.jar" -type f -print -quit 2>/dev/null)
if [ -z "$JAR" ]; then
echo "No runnable jar found in /app/workspace"
exit 1
fi
echo "Running $JAR"
exec java -jar "$JAR"
EOS
RUN chmod +x /app/run.sh
EXPOSE 8080
CMD ["/bin/sh", "/app/run.sh"]