Unable to build multi-module project with fmp 3.5.34
See original GitHub issueDescription
When trying to build this multi module project with fmp 3.5.34
I get the following error
[ERROR] Failed to execute goal io.fabric8:fabric8-maven-plugin:3.5.34:build (fmp) on project spring-boot-configmap-parent: Failed to execute the build: Unable to create the build archive: Failed to create assembly for docker image (with mode 'dir'): Error creating assembly archive docker: You must set at least one file.. If you include the build artifact please ensure that you have built the artifact before with 'mvn package' (should be available in the target/ dir). Please see the documentation (section "Assembly") for more information.
I should not that when building other non multi-module projects, everything worked just fine.
In order to bypass the problem, I downgraded to fmp 3.5.33
, where everything worked as expected
Info
- f-m-p version : 3.5.34
- Maven version (
mvn -v
) : 3.5.2
- Kubernetes / OpenShift setup and version : Openshift 3.7
- If it’s a bug, how to reproduce : Run mvn clean verify -Popenshift,openshift-it on the sb-1.5.10 brach
Notes
You can easily switch versions of fmp in the project by setting the fabric8-maven-plugin.version
Maven property
Issue Analytics
- State:
- Created 6 years ago
- Comments:36 (23 by maintainers)
Top Results From Across the Web
Cannot build multi-module Maven project with Azure Pipelines
However, whenever I try to build an implementation it fails. It seems the agent, when executing the task, cannot find the previously built...
Read more >fabric8io/fabric8-maven-plugin
The fabric8-maven-plugin (f8-m-p) brings your Java applications on to Kubernetes and OpenShift. It provides a tight integration into Maven ...
Read more >Creating a multi-module application - Open Liberty
A getting started tutorial and an example on how to use Maven to build a Java or Jakarta EE application with multiple modules...
Read more >Unable to build multi-module maven project using maven-git ...
Hi @Yaroslav Bedrov . No, it doesn't help. I am uploading a sample project and two screenshot showing dependencies information for both IDEA...
Read more >SonarQube Scanner for Gradle - multi-module project with src ...
/!\ A multi-module project can't have source folders, so '/path/to/proj/grails-app/controllers' won't ...
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 FreeTop 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
Top GitHub Comments
I agree: breaking changes should be reserved to major versions and shouldn’t occur on micro versions (as is the case here).
Let me just briefly explain the motivation for the original change which was not meant to break backwards compatibility.
For projects of type
pom
by default fabric8-maven-plugin is always skipped. However, there are very valid uses cases which define a fabric8-maven-plugin configuration for only building images (without compiling). In order to not skip such projects the default behaviour was changed, that the fmp run is skipped inpom
typed projects only when no fmp build configuration is attached. The rationale is that, if you configure the plugin, then you expect it to run (or the other way round, people were suprised that it has been not run although a plugin has been configured). Having the plugin be skipped by default is very confusing and caused several hours of debugging.So, it should be backwards compatible if your pom does not contain a build configuration in the fmp plugin configuration. If used as default for multi module children, the configuration should go in a
<pluginManagement>
section anyway (and not in a<plugin>
configuration directly), so that the build is skipped like before.Actually, I’m happy to revert this behaviour, if we add it to a minor release change (e.g. for 3.6) as it is really counter intuitive, if you configure a f-m-p build in a
pom
typed project (e.g. when this project is only used for building, nothing else) and then the build doesn’t work because ‘skip’ is the default.But maybe it would also work for you, too, to move the default fmp build configuration in a parent pom.xml from a
<plugin>
to a<pluginManagement>
section ? (which I would do anyway).Let me know, how you would like to proceed …