question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to build multi-module project with fmp 3.5.34

See original GitHub issue

Description

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:closed
  • Created 6 years ago
  • Comments:36 (23 by maintainers)

github_iconTop GitHub Comments

4reactions
metacosmcommented, Feb 26, 2018

I agree: breaking changes should be reserved to major versions and shouldn’t occur on micro versions (as is the case here).

Le 26 févr. 2018 à 07:39, Georgios Andrianakis notifications@github.com a écrit :

Hello @piyush1594,

That’s up to you 😃. I personally think that the default behavior should be reverted to what it was in FMP 3.5.33, but that’s just my opinion.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

2reactions
rhusscommented, Feb 26, 2018

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 in pom 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 …

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found