Detection
migetpacks detects a Java application when any of the following files are present in the project root:pom.xml(Maven)build.gradle(Gradle, Groovy DSL)build.gradle.kts(Gradle, Kotlin DSL)
Version Detection
Java version is resolved in the following priority order:Version Normalization
Legacy version formats are normalized for Docker image compatibility:Build Process
Build Tool Detection
migetpacks automatically detects the build tool:Gradle Wrapper
Ifgradlew is present in the project root, migetpacks uses the Gradle Wrapper instead of the system Gradle for correct version compatibility.
Generated Dockerfile
Run Command
The default run command depends on the build tool output:RUN_COMMAND or a Procfile:
JVM Configuration
The following environment variables are set for production:Caching
Layer Caching
Dependencies are cached by copying build definition files before the full source:BUILD_CACHE_DIR
WhenBUILD_CACHE_DIR is set, build tool caches persist at:
DHI Support
Docker Hardened Images are supported for Java builds.
DHI Notes
- Eclipse Temurin DHI images do not include Maven or Gradle. Build tools are installed via
apt-getin the builder stage. - Runtime images are distroless (no shell, no
apt-get). - The
nonrootuser is used instead of themigetuser. - Version normalization applies:
1.8becomes8,1.11becomes11.