Open nicolasduminil opened 7 months ago
Finally, I adopted another solution: I simply defined
...
<properties>
...
<maven.deploy.skip>true</maven.deploy.skip>
...
</properties>
...
in the master POM and:
...
<properties>
...
<maven.deploy.skip>false</maven.deploy.skip>
...
</properties>
...
in the module where I want to do the push
. But it doesn't work neither, I get the following:
INFO] --- docker:0.44.0:start (default-start) @ k8s-web ---
[INFO] DOCKER> [k8s-tests/undertow:latest]: Start container a5814d59d295
[INFO]
[INFO] --- failsafe:3.0.0-M4:integration-test (default-integration-test) @ k8s-web ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running fr.simplex_software.k8s.tests.it.UndertowServerIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.913 s - in fr.simplex_software.k8s.tests.it.UndertowServerIT
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] --- docker:0.44.0:copy (default-copy) @ k8s-web ---
[INFO]
[INFO] --- docker:0.44.0:stop (default-stop) @ k8s-web ---
[INFO] DOCKER> [k8s-tests/undertow:latest]: Stop and removed container a5814d59d295 after 0 ms
[INFO]
[INFO] --- failsafe:3.0.0-M4:verify (default-verify) @ k8s-web ---
[INFO]
[INFO] --- docker:0.44.0:push (default-push) @ k8s-web ---
[INFO] DOCKER> [k8s-tests/undertow:latest] : Skipped pushing
So, the plugin performs the start
, integration-test
and stop
goals bound to the install
phase but skips the push
one, bound to the deploy
phase.
This seems to be specifically related to this plugin and to the docker
packaging.
Description
I'm trying to use the
io.fabric8:docker-maven-plugin:0.44.0
plugin in a multi-module project. One of the modules has<packaging>docker</packaging>
. In this module i want to push the built image. Here is a fragment ofpom.xml
:Now, if I execute
mvn clean deploy
, such that to perform thepush
operation which is bound to thedeploy
phase, I get the following maven exception:This exception is raised in the master POM which tries to execute the default
deploy
goal and it doesn't find the target repository. In order to avoid that, I'm adding the following to the master POM:But then running
mvn clean deploy
thepush
operation is skipped.How could I skip the deploy goal everywhere but in a single module ?
Info
docker-maven-plugin version : 0.44.0
Maven version (
mvn -v
) :Apache Maven 3.9.5 (57804ffe001d7215b5e7bcb531cf83df38f93546) Maven home: /opt/apache-maven-3.9.5 Java version: 17.0.6, vendor: Oracle Corporation, runtime: /usr/lib/jvm/jdk-17 Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "5.15.0-101-generic", arch: "amd64", family: "unix"
Docker version :
Docker version 25.0.5, build 5dc9bcc
If it's a bug, how to reproduce :
Don't have a reproducer