MavenError: Failed to execute goal on project: Could not resolve dependencies In Maven Multimodule project

In case anybody comes back to this, I think the problem here was failing to install the parent pom first, which all these submodules depend on, so the Maven Reactor can’t collect the necessary dependencies to build the submodule. So from the root directory (here D:\luna_workspace\empire_club\empirecl) it probably just needs a: mvn clean install (Aside: … Read more

How to create a Jandex index in Quarkus for classes in a external module

Quarkus automatically indexes the main module but, when you have additional modules containing CDI beans, entities, objects serialized as JSON, you need to explicitly index them. There are a couple of different (easy to implement) options to do so. Using the Jandex Maven plugin Add the following to the pom.xml of the module you want … Read more

Spring Boot: autowire beans from library project

Just found the solution. Instead of defining base packages to scan from separate library, I’ve just created configuration class inside this library with whole bunch of annotation and imported it to my main MyApplication.class: package runnableProject.application; import com.myProject.customLibrary.configuration.SharedConfigurationReference.class @SpringBootApplication @Import(SharedConfigurationReference.class) public class MyApplication { public static void main(String[] args) { SpringApplication.run(MyApplication.class, args); } } package … Read more

Execute gradle task on sub projects

Not entirely sure which of these you’re after, but they should cover your bases. 1. Calling the tasks directly You should just be able to call gradle :other/projC:hello :other/projD:hello I tested this with: # Root/build.gradle allprojects { task hello << { task -> println “$task.project.name” } } and # Root/settings.gradle include ‘projA’ include ‘projB’ include … Read more

Build order of Maven multimodule project?

The build order is determined by the Maven reactor which is a mechanism that automatically ensures correct build order for multimodule builds by sorting the projects. See the official documentation for how it works. It says: The following relationships are honoured when sorting projects: a project dependency on another module in the build a plugin … Read more