Maven naming conventions for hierarchical multiple module projects

In earlier days with maven I followed the following structure which you have described: appname +— appname-module1 +— appname-module2 +— appname-module2-chhild1 +— appname-module2-chhild2 +— appname-module3 But this will become ridiculous if you get more levels. So I decided to change my mind and now using things like: appname +— module1 +— module2 +— chhild1 +— … Read more

Maven multi-module project – copying all “package” JARS from submodules into parent/target/

You could try the maven-dependency-plugin:copy plugin:goal. You will have to add this to the pom of all submodules that you want to copy. EDIT: Or just in the parent pom (see comments). <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <id>copy-artifact</id> <phase>package</phase> <goals> <goal>copy</goal> </goals> <configuration> <artifactItems> <artifactItem> <groupId>${project.groupId}</groupId> <artifactId>${project.artifactId}</artifactId> <version>${project.version}</version> <type>${project.packaging}</type> </artifactItem> </artifactItems> <outputDirectory>../Main/target/dependencies</outputDirectory> </configuration> … Read more

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 Just add the following to the additional module pom.xml: <build> <plugins> … 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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)