Skip to content

Commit fff6ffe

Browse files
romainVanheeMayuriXx
authored andcommitted
fix(use-new-docker-compose): use exec-maven-plugin instead of docker-compose-maven-plugin librairy
1 parent 32fbd26 commit fff6ffe

1 file changed

Lines changed: 38 additions & 19 deletions

File tree

pom.xml

Lines changed: 38 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -198,38 +198,57 @@
198198
</executions>
199199
</plugin>
200200
<plugin>
201-
<groupId>com.dkanejs.maven.plugins</groupId>
202-
<artifactId>docker-compose-maven-plugin</artifactId>
203-
<version>4.0.0</version>
204-
<configuration>
205-
<skip>${skipDocker}</skip>
206-
<composeFile>${project.basedir}/docker-compose.yml</composeFile>
207-
<detachedMode>true</detachedMode>
208-
<removeVolumes>false</removeVolumes>
209-
<removeOrphans>true</removeOrphans>
210-
</configuration>
201+
<groupId>org.codehaus.mojo</groupId>
202+
<artifactId>exec-maven-plugin</artifactId>
203+
<version>3.3.0</version>
211204
<executions>
212205
<!-- Clean up any leftover container from a previous run -->
213206
<execution>
214207
<id>docker-compose-down-before</id>
215208
<phase>pre-integration-test</phase>
216-
<goals>
217-
<goal>down</goal>
218-
</goals>
209+
<goals><goal>exec</goal></goals>
210+
<configuration>
211+
<skip>${skipDocker}</skip>
212+
<executable>docker</executable>
213+
<arguments>
214+
<argument>compose</argument>
215+
<argument>-f</argument>
216+
<argument>${project.basedir}/docker-compose.yml</argument>
217+
<argument>down</argument>
218+
<argument>--remove-orphans</argument>
219+
</arguments>
220+
</configuration>
219221
</execution>
220222
<execution>
221223
<id>docker-compose-up</id>
222224
<phase>pre-integration-test</phase>
223-
<goals>
224-
<goal>up</goal>
225-
</goals>
225+
<goals><goal>exec</goal></goals>
226+
<configuration>
227+
<skip>${skipDocker}</skip>
228+
<executable>docker</executable>
229+
<arguments>
230+
<argument>compose</argument>
231+
<argument>-f</argument>
232+
<argument>${project.basedir}/docker-compose.yml</argument>
233+
<argument>up</argument>
234+
<argument>-d</argument>
235+
</arguments>
236+
</configuration>
226237
</execution>
227238
<execution>
228239
<id>docker-compose-down</id>
229240
<phase>post-integration-test</phase>
230-
<goals>
231-
<goal>down</goal>
232-
</goals>
241+
<goals><goal>exec</goal></goals>
242+
<configuration>
243+
<skip>${skipDocker}</skip>
244+
<executable>docker</executable>
245+
<arguments>
246+
<argument>compose</argument>
247+
<argument>-f</argument>
248+
<argument>${project.basedir}/docker-compose.yml</argument>
249+
<argument>down</argument>
250+
</arguments>
251+
</configuration>
233252
</execution>
234253
</executions>
235254
</plugin>

0 commit comments

Comments
 (0)