Imagenames are wrong in case of several profiles
See original GitHub issueHi we got the following describes setup. We are using two profiles. One to push into our own registry and one to push into the registry of our customer. If both profiles are executed with mvn clean package -P docker-image-to-customer-registry,docker-image-to-private-registry
I would expect to have 2 images in my local machine registry:
- customer/${project.artifactId}😒{project.version}
- private/${project.artifactId}😒{project.version}
The log shows clearly that both profiles are executed successfully but both profiles are building an image with the same name:
- private/project.artifactId}😒{project.version}
So it seems clear to me that the last setup name does always win.
<profile>
<id>docker-image-to-customer-registry</id>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${version.docker.maven.plugin}</version>
<executions>
<execution>
<id>build-for-customer</id>
<phase>package</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
<configuration>
<verbose>true</verbose>
<images>
<image>
<registry>${customer.url}</registry>
<name>customer/${project.artifactId}:${project.version}</name>
<build>
<contextDir>.</contextDir>
<assembly>
<mode>dir</mode>
<inline xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<files>
<file>
<source>
target/${project.artifactId}-exec.jar
</source>
</file>
</files>
</inline>
</assembly>
<tags>
<tag>latest</tag>
</tags>
</build>
</image>
</images>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
<profile>
<id>docker-image-to-private-registry</id>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${version.docker.maven.plugin}</version>
<executions>
<execution>
<id>build-for-private</id>
<phase>package</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
<configuration>
<verbose>true</verbose>
<images>
<image>
<registry>${private.url}</registry>
<name>private/${project.artifactId}:${project.version}</name>
<build>
<contextDir>.</contextDir>
<assembly>
<mode>dir</mode>
<inline xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<files>
<file>
<source>
target/${project.artifactId}-exec.jar
</source>
</file>
</files>
</inline>
</assembly>
<tags>
<tag>latest</tag>
</tags>
</build>
</image>
</images>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
Multiple profile pics? Wrong profile pics - Apple Community
Something very strange is happening with my Apple ID. I noticed that on my iPhone, the profile pic that is showing for me...
Read more >Bug? macOS Sierra Preview/Quick Look issues with rendering ...
I had this problem with High Sierra, Preview, and a DisplayCal profile. The latest version of DisplayCal, 3.5, has in its release notes:....
Read more >React Native - Image Require Module using Dynamic Names
I made a custom image component which takes in a boolean to check if the image is from web or is being passed...
Read more >Don't Use the @Profile Annotation in a Spring Boot App!
Why using Spring's @Profile annotation is a bad idea and what to do instead. ... The main use case for profiles in Spring...
Read more >Custom configuration - Testcontainers for Java
The configuration will be loaded from multiple locations. ... configuration property names should be set in upper case with underscore separators, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
here you go: https://github.com/Captain-P-Goldfish/maven-docker-plugin-issue-1439
oh great… I just tried to put the configuration into the execution-section and it works like this. This will at least do for me. But did not expect this. It’s the first time I am having problems with differnet plugin configurations over different profiles…