I am having a problem with spring boot multimodule jar deployment
I have 3 components like below.
Parent
--Child1
--Child2
Child2 has dependency of child1
But when i take jar child1 classes are not present in the jar. I am getting java.lang.classnotfoundexception
Below my
A pom.xml
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.5.RELEASE</version>
</parent>
<groupId>com.A</groupId>
<artifactId>A</artifactId>
<version>0.0.1</version>
<packaging>pom</packaging>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<type>pom</type>
<version>${spring.boot.version}</version>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>${spring.boot.version}</version>
</dependency>
<dependency>
<groupId>com.A</groupId>
<artifactId>A</artifactId>
<version>0.0.1</version>
</dependency>
<dependency>
<groupId>com.B</groupId>
<artifactId>B</artifactId>
<version>0.0.1</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<finalName>service</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
B pom.xml
<groupId>com.B</groupId>
<artifactId>B</artifactId>
<version>0.0.1</version>
<name>Omni Channel Core</name>
<description>Omni Channel Core Functions</description>
<parent>
<groupId>A</groupId>
<artifactId>A</artifactId>
<version>0.0.1</version>
</parent>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>
C pom.xml
<groupId>com.C</groupId>
<artifactId>C</artifactId>
<version>0.0.1</version>
<parent>
<groupId>A</groupId>
<artifactId>A</artifactId>
<version>0.0.1</version>
</parent>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.B</groupId>
<artifactId>B</artifactId>
</dependency>
</dependencies>
<build>
<finalName>service</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
Whenever I take C's jar inside that dependent jar B is not exists.
How to resolve this issue any help will be greatly appreciated!!!