Skip to content

Commit

Permalink
Replace dockerfile-maven-plugin by exec-maven-plugin for building doc…
Browse files Browse the repository at this point in the history
…ker images

Signed-off-by: Denis Neuling <[email protected]>
  • Loading branch information
denisneuling committed May 5, 2022
1 parent 833f692 commit 717e92a
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 79 deletions.
42 changes: 25 additions & 17 deletions edc-controlplane/edc-controlplane-cosmosdb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -293,39 +293,47 @@
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>${project.artifactId}:${project.version}</id>
<id>docker-build-${project.artifactId}:${project.version}</id>
<phase>package</phase>
<goals>
<goal>build</goal>
<goal>tag</goal>
<goal>exec</goal>
</goals>
<configuration>
<tag>${project.version}</tag>
<executable>docker</executable>
<workingDirectory>${project.basedir}</workingDirectory>
<arguments>
<argument>build</argument>
<argument>-f</argument>
<argument>src/main/docker/Dockerfile</argument>
<argument>--build-arg</argument>
<argument>JAR=target/${project.artifactId}.jar</argument>
<argument>-t</argument>
<argument>${project.artifactId}:${project.version}</argument>
<argument>.</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>${project.artifactId}:latest</id>
<id>docker-tag-${project.artifactId}:latest</id>
<phase>package</phase>
<goals>
<goal>tag</goal>
<goal>exec</goal>
</goals>
<configuration>
<tag>latest</tag>
<executable>docker</executable>
<workingDirectory>${project.basedir}</workingDirectory>
<arguments>
<argument>tag</argument>
<argument>${project.artifactId}:${project.version}</argument>
<argument>${project.artifactId}:latest</argument>
</arguments>
</configuration>
</execution>
</executions>
<configuration>
<contextDirectory>.</contextDirectory>
<dockerfile>src/main/docker/Dockerfile</dockerfile>
<repository>${project.artifactId}</repository>
<buildArgs>
<JAR>target/${project.artifactId}.jar</JAR>
</buildArgs>
</configuration>
</plugin>
</plugins>
</build>
Expand Down
42 changes: 25 additions & 17 deletions edc-controlplane/edc-controlplane-memory/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -235,39 +235,47 @@
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>${project.artifactId}:${project.version}</id>
<id>docker-build-${project.artifactId}:${project.version}</id>
<phase>package</phase>
<goals>
<goal>build</goal>
<goal>tag</goal>
<goal>exec</goal>
</goals>
<configuration>
<tag>${project.version}</tag>
<executable>docker</executable>
<workingDirectory>${project.basedir}</workingDirectory>
<arguments>
<argument>build</argument>
<argument>-f</argument>
<argument>src/main/docker/Dockerfile</argument>
<argument>--build-arg</argument>
<argument>JAR=target/${project.artifactId}.jar</argument>
<argument>-t</argument>
<argument>${project.artifactId}:${project.version}</argument>
<argument>.</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>${project.artifactId}:latest</id>
<id>docker-tag-${project.artifactId}:latest</id>
<phase>package</phase>
<goals>
<goal>tag</goal>
<goal>exec</goal>
</goals>
<configuration>
<tag>latest</tag>
<executable>docker</executable>
<workingDirectory>${project.basedir}</workingDirectory>
<arguments>
<argument>tag</argument>
<argument>${project.artifactId}:${project.version}</argument>
<argument>${project.artifactId}:latest</argument>
</arguments>
</configuration>
</execution>
</executions>
<configuration>
<contextDirectory>.</contextDirectory>
<dockerfile>src/main/docker/Dockerfile</dockerfile>
<repository>${project.artifactId}</repository>
<buildArgs>
<JAR>target/${project.artifactId}.jar</JAR>
</buildArgs>
</configuration>
</plugin>
</plugins>
</build>
Expand Down
42 changes: 25 additions & 17 deletions edc-controlplane/edc-controlplane-postgresql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -280,39 +280,47 @@
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>${project.artifactId}:${project.version}</id>
<id>docker-build-${project.artifactId}:${project.version}</id>
<phase>package</phase>
<goals>
<goal>build</goal>
<goal>tag</goal>
<goal>exec</goal>
</goals>
<configuration>
<tag>${project.version}</tag>
<executable>docker</executable>
<workingDirectory>${project.basedir}</workingDirectory>
<arguments>
<argument>build</argument>
<argument>-f</argument>
<argument>src/main/docker/Dockerfile</argument>
<argument>--build-arg</argument>
<argument>JAR=target/${project.artifactId}.jar</argument>
<argument>-t</argument>
<argument>${project.artifactId}:${project.version}</argument>
<argument>.</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>${project.artifactId}:latest</id>
<id>docker-tag-${project.artifactId}:latest</id>
<phase>package</phase>
<goals>
<goal>tag</goal>
<goal>exec</goal>
</goals>
<configuration>
<tag>latest</tag>
<executable>docker</executable>
<workingDirectory>${project.basedir}</workingDirectory>
<arguments>
<argument>tag</argument>
<argument>${project.artifactId}:${project.version}</argument>
<argument>${project.artifactId}:latest</argument>
</arguments>
</configuration>
</execution>
</executions>
<configuration>
<contextDirectory>.</contextDirectory>
<dockerfile>src/main/docker/Dockerfile</dockerfile>
<repository>${project.artifactId}</repository>
<buildArgs>
<JAR>target/${project.artifactId}.jar</JAR>
</buildArgs>
</configuration>
</plugin>
</plugins>
</build>
Expand Down
42 changes: 25 additions & 17 deletions edc-dataplane/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -177,39 +177,47 @@
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>${project.artifactId}:${project.version}</id>
<id>docker-build-${project.artifactId}:${project.version}</id>
<phase>package</phase>
<goals>
<goal>build</goal>
<goal>tag</goal>
<goal>exec</goal>
</goals>
<configuration>
<tag>${project.version}</tag>
<executable>docker</executable>
<workingDirectory>${project.basedir}</workingDirectory>
<arguments>
<argument>build</argument>
<argument>-f</argument>
<argument>src/main/docker/Dockerfile</argument>
<argument>--build-arg</argument>
<argument>JAR=target/${project.artifactId}.jar</argument>
<argument>-t</argument>
<argument>${project.artifactId}:${project.version}</argument>
<argument>.</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>${project.artifactId}:latest</id>
<id>docker-tag-${project.artifactId}:latest</id>
<phase>package</phase>
<goals>
<goal>tag</goal>
<goal>exec</goal>
</goals>
<configuration>
<tag>latest</tag>
<executable>docker</executable>
<workingDirectory>${project.basedir}</workingDirectory>
<arguments>
<argument>tag</argument>
<argument>${project.artifactId}:${project.version}</argument>
<argument>${project.artifactId}:latest</argument>
</arguments>
</configuration>
</execution>
</executions>
<configuration>
<contextDirectory>.</contextDirectory>
<dockerfile>src/main/docker/Dockerfile</dockerfile>
<repository>${project.artifactId}</repository>
<buildArgs>
<JAR>target/${project.artifactId}.jar</JAR>
</buildArgs>
</configuration>
</plugin>
</plugins>
</build>
Expand Down
4 changes: 0 additions & 4 deletions edc-extensions/aas-controller/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>contract-spi</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>contract-spi</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>dataloading</artifactId>
Expand Down
18 changes: 11 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,21 @@
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<!-- plugins -->
<org.apache.maven.plugins.shade.version>3.3.0</org.apache.maven.plugins.shade.version>
<com.spotify.dockerfile.maven.plugin.version>1.4.13</com.spotify.dockerfile.maven.plugin.version>
<com.diffplug.spotless.maven.plugin.version>2.22.4</com.diffplug.spotless.maven.plugin.version>
<org.apache.maven.plugins.shade.version>3.3.0</org.apache.maven.plugins.shade.version>
<org.codehaus.mojo.exec.maven.plugin.version>3.0.0</org.codehaus.mojo.exec.maven.plugin.version>

<!-- dependency version -->
<org.eclipse.dataspaceconnector.version>0.0.1-SNAPSHOT</org.eclipse.dataspaceconnector.version>
<com.azure.sdk.bom.version>1.2.1</com.azure.sdk.bom.version>
<jakarta.ws.rs.api.version>3.1.0</jakarta.ws.rs.api.version>
<org.postgresql.version>42.3.4</org.postgresql.version>
<org.flywaydb.version>8.5.10</org.flywaydb.version>

<!-- test dependency version -->
<junit.jupiter.version>5.8.2</junit.jupiter.version>
<junit.platform.version>1.8.2</junit.platform.version>
<mockito.version>1.10.19</mockito.version>
Expand Down Expand Up @@ -82,16 +86,16 @@
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${org.codehaus.mojo.exec.maven.plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>${org.apache.maven.plugins.shade.version}</version>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<version>${com.spotify.dockerfile.maven.plugin.version}</version>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
Expand Down

0 comments on commit 717e92a

Please sign in to comment.