Multi Project build with source override options


(Manoharan M) #1

project1

src/main/java
src/main/resources
src/main/webapp

project2

src/main/java
src/main/resources
src/main/webapp

project3

src/main/java
src/main/resources
src/main/webapp

Build Order: project1,project2,project3
Final output from project3

project1: src/main/java/com/test/test.java
project2: src/main/java/com/test/test.java
project3: src/main/java/com/test/test.java

Expected Output:

  1. When project 2 as rootProject project 2 test.class should be available in WAR
  2. When project 3 as rootProject project 3 test.class should be available in WAR

How to override, if same class package structure available with multiple overlay projects
How to achieve this using gradle build system?.


(Daniel Wilmer) #2

Hi, I have posted a question regarding war overlaying that may help you:


(Manoharan M) #3

Thank you very much for your feedback


(Manoharan M) #4

The above mentioned approach is not solved the problem.
Its not overriding the sources. Instead its generating jar for sub projects.