You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 of pom.xml:
Now, if I execute mvn clean deploy, such that to perform the push operation which is bound to the deploy phase, I get the following maven exception:
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for k8s-tests :: the master POM 1.0-SNAPSHOT:
[INFO]
[INFO] k8s-tests :: the master POM ........................ FAILURE [ 0.108 s]
[INFO] k8s-tests :: The EKS platform module ............... SKIPPED
[INFO] k8s-tests :: the web server module ................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.750 s
[INFO] Finished at: 2024-03-28T18:12:28+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:3.1.1:deploy (default-deploy) on project k8s-tests: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::url parameter -> [Help 1]
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:
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
The text was updated successfully, but these errors were encountered: