@@ -10,14 +10,23 @@ COPY ./LICENSE ${GEN_DIR}
10
10
# Required to compile openapi-generator
11
11
COPY ./google_checkstyle.xml ${GEN_DIR}
12
12
13
+ # All poms are copied, then we go offline, to allow for better caching of code changes without fetching all dependencies each time
14
+ COPY ./modules/openapi-generator-gradle-plugin/pom.xml ${GEN_DIR}/modules/openapi-generator-gradle-plugin/
15
+ COPY ./modules/openapi-generator-maven-plugin/pom.xml ${GEN_DIR}/modules/openapi-generator-maven-plugin/
16
+ COPY ./modules/openapi-generator-online/pom.xml ${GEN_DIR}/modules/openapi-generator-online/
17
+ COPY ./modules/openapi-generator-cli/pom.xml ${GEN_DIR}/modules/openapi-generator-cli/
18
+ COPY ./modules/openapi-generator-core/pom.xml ${GEN_DIR}/modules/openapi-generator-core/
19
+ COPY ./modules/openapi-generator/pom.xml ${GEN_DIR}/modules/openapi-generator/
20
+ COPY ./pom.xml ${GEN_DIR}
21
+ RUN mvn dependency:go-offline
22
+
13
23
# Modules are copied individually here to allow for caching of docker layers between major.minor versions
14
24
COPY ./modules/openapi-generator-gradle-plugin ${GEN_DIR}/modules/openapi-generator-gradle-plugin
15
25
COPY ./modules/openapi-generator-maven-plugin ${GEN_DIR}/modules/openapi-generator-maven-plugin
16
26
COPY ./modules/openapi-generator-online ${GEN_DIR}/modules/openapi-generator-online
17
27
COPY ./modules/openapi-generator-cli ${GEN_DIR}/modules/openapi-generator-cli
18
28
COPY ./modules/openapi-generator-core ${GEN_DIR}/modules/openapi-generator-core
19
29
COPY ./modules/openapi-generator ${GEN_DIR}/modules/openapi-generator
20
- COPY ./pom.xml ${GEN_DIR}
21
30
22
31
# Pre-compile openapi-generator-cli
23
32
RUN mvn -B -am -pl "modules/openapi-generator-cli" package
0 commit comments