Skip to content

Commit

Permalink
properly go offline for maven
Browse files Browse the repository at this point in the history
run-it
  • Loading branch information
dphuang2 committed Oct 31, 2023
1 parent 61baf30 commit 8346af9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
9 changes: 7 additions & 2 deletions generator/konfig-generator-api/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ WORKDIR /konfig-generator-api

build-generator:
COPY pom.xml .
RUN mvn -B dependency:go-offline
# Go offline, ensuring all necessary dependencies are cached
RUN mvn --no-transfer-progress -B de.qaware.maven:go-offline-maven-plugin:resolve-dependencies

# Run 'clean' to ensure its dependencies are downloaded
RUN mvn --no-transfer-progress -B clean

COPY src src
RUN mvn -f pom.xml clean package
RUN mvn --offline clean package
SAVE ARTIFACT target/openapi-generator-api-1.0.0.jar

run-generator:
Expand Down
15 changes: 15 additions & 0 deletions generator/konfig-generator-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,21 @@
<build>
<sourceDirectory>src/main/java</sourceDirectory>
<plugins>
<plugin>
<groupId>de.qaware.maven</groupId>
<artifactId>go-offline-maven-plugin</artifactId>
<version>1.2.8</version>
<configuration>
<dynamicDependencies>
<DynamicDependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit-platform</artifactId>
<version>2.22.2</version>
<repositoryType>MAIN</repositoryType>
</DynamicDependency>
</dynamicDependencies>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
Expand Down

0 comments on commit 8346af9

Please sign in to comment.