Questions tagged [multi-module]

A multi-module project/application is composed by several modules each focusing on a certain concern, enforcing the SRP (Single Responsibility Principle) at module level.

A multi-module project/application is composed by several modules each focusing on a certain concern, enforcing the SRP (Single Responsibility Principle) at module level.

In , a multi-module project is handled via aggregation of an aggregator project providing list of aggregated modules.

Often, but not necessarily, the aggregator project is also the parent project of aggregated modules, providing further governance and common management on - for example - plugins, dependencies, properties.

More Info

886 questions
11
votes
3 answers

Is there a way to print the structure of a multi-module maven project?

I'm facing a rather large multi module maven project. I would like to see how the root (parent) project is composed out of subprojects/ child projects in the form of groupId:artifactId (possible with some identation to reflect the hierarchy. Of…
Sjaak
  • 3,602
  • 17
  • 29
10
votes
1 answer

How to assemble multimodule maven project into one WAR?

Similar question here. I would like to get ONE resulting WAR to be deployed from 3 different maven modules. The war modules are absolutely non-conflicting : First one that has Java classes and some WEB-INF/artifacts Second one are just API -…
lisak
  • 21,611
  • 40
  • 152
  • 243
10
votes
3 answers

How to define the Kotlin version for both buildSrc and an application module?

I am using a buildSrc module in a multi-module Kotlin project to manage dependency definitions and versions. The module makes use of kotlin-dsl as shown in the build.gradle.kts: plugins { `kotlin-dsl` } Alternative declaration: plugins { …
JJD
  • 50,076
  • 60
  • 203
  • 339
10
votes
1 answer

JaCoCo configuration when sources and tests classes are in different modules

I have a multi-module project with Gradle(2.2) + JaCoCo + Sonar. I'm using the sonar-runner plugin, and when I execute the tests, I can see in each module the test report under build/jacoco/jacoco.exec. So far so good. The problem is, I have some…
scorpfrog
  • 127
  • 9
10
votes
2 answers

Maven can't deploy from parent pom

i have just started building applications with Maven. One of my approaches is to build a multimodule web application. Working with Eclipse makes it very easy to build that kind of an application. So far everything works fine. The point at which i…
claim
  • 506
  • 6
  • 13
10
votes
5 answers

Scala Play 2.0. Compilation error: IO error while decoding

I downloaded multi-module Scala project from GitHub (https://github.com/henrikengstrom/roygbiv), and one of the module is Play 2.0 module. So I can run whole application using SBT's run command on each module, and all works fine. But when I add to…
WelcomeTo
  • 19,843
  • 53
  • 170
  • 286
10
votes
2 answers

In a multi-module project, can a maven module access transitive test-scoped dependencies of another module it depends on?

I have a multi-module Maven+Spring project. Some modules depend on other modules. Let's say we have a module named services that depends on the module named persistence. The services module : At Spring level, imports the persistence context At…
Pierre Henry
  • 16,658
  • 22
  • 85
  • 105
9
votes
5 answers

Is there any benefit in using Maven Multimodule when working in a small application?

We are building a small application using different architectural layers such as domain, interface, infrastructure and application. This follows the Onion DDD model. Now I am wondering if there is any benefit in splitting the application into a…
Marco
  • 15,101
  • 33
  • 107
  • 174
9
votes
2 answers

Maven doesn't find imported class from another module but Intellij does

I have multi-module maven project. The acceptance-tests module has dependency from api module in pom.xml (Replacing real company name by xxx to keep confidentiality). I am trying to import some classes from api module in my acceptance-tests. Here is…
9
votes
1 answer

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

Based on the following maven configuration from this SO question, answered for Maven builds, I need an equivalent bit of code for a Gradle setup. Looking around, I can't find a setup that does this for Gradle. Synopsis of issue from other question:…
Snappawapa
  • 1,697
  • 3
  • 20
  • 42
9
votes
5 answers

How to build a multi-module Maven project without a main class in one of the modules

I've been trying to find an answer to this issue in similar questions but I still don't know what is causing it. I have a multi-module maven project and I'm trying to run mvn install or mvn package and I get the following error [INFO] app…
chris
  • 2,490
  • 4
  • 32
  • 56
9
votes
3 answers

Why Configuration on demand is not supported by the current version of the Gradle plugin?

Configuration on demand is not supported by version 3.1.2 of the Android Gradle plugin when using Gradle version 4.6 or above. gradle Configuration on demand was pretty useful when working with multi-module android projects with lots of modules, to…
9
votes
2 answers

Kotlin Multi-module Project Dependency is Unresolved in test Lifecycle

Project structure: Pure Kotlin as multi module maven application kotlinspringboot (root-module) api integration-tests Problem: When I run $ cd ./kotlingspringboot/integration-tests/ $ mvn test or $ cd…
Ildar Galikov
  • 431
  • 5
  • 17
9
votes
3 answers

Problem with Eclipse and a Maven multi-module project

I have created a Maven project with the following structure: + root-project pom.xml (pom) + sub-projectA (jar) + sub-projectB (jar) I have done the following steps: mvn archetype:create –DgroupId=my.group.id –DartifactId=root-project mvn…
earth
  • 91
  • 1
  • 1
  • 2
9
votes
1 answer

sbt plugins isn't picked up from submodules?

I'm trying to convert a single module project into two modules with a root aggregate. Feels like a normal thing to do. So, to simplify I have removed the second project that I added, but I do something like: cd myproject mkdir core mv * core and…
Viktor Hedefalk
  • 3,572
  • 3
  • 33
  • 48