diff --git a/java/Dockerfile b/java/Dockerfile index f706cbe5..0c61789e 100644 --- a/java/Dockerfile +++ b/java/Dockerfile @@ -4,7 +4,7 @@ ARG MAVEN_VERSION=3.8 ARG JAVA_VERSION=16 FROM maven:${MAVEN_VERSION}-eclipse-temurin-${JAVA_VERSION} AS java - +WORKDIR /cucumber # Dummy stage for generated code, overriden in main build FROM scratch AS schema-codegen @@ -12,8 +12,9 @@ FROM scratch AS schema-codegen FROM java AS with-dependencies -COPY --link pom.xml maven-versions-rules.xml . -RUN mvn install +COPY --link pom.xml . +# verify loads additional dependencies without running the tests (they aren't copied in yet) +RUN mvn dependency:go-offline verify FROM java AS tested @@ -22,4 +23,4 @@ COPY --link . . COPY --link --from=with-dependencies /root/.m2 /root/.m2 COPY --link --from=schema-codegen / src/generated/java/io/cucumber/messages/types -RUN mvn test +RUN mvn verify