I have two java projects:
- MainProject
- LibraryProject
I use Maven to build my MainProject
. In pom.xml of MainProject
, I defined the dependency of LibraryProject
:
<dependency>
<groupId>com.xxx.LibraryProject</groupId>
<artifactId>LibraryProject</artifactId>
<version>1.0.0-SNAPSHOT</version>
<type>jar</type>
</dependency>
Under MainProject
root path, after I run : maven clean install
a MainProject.jar is generated. But those classes defined in LibraryProject
& invoked by MainProject
are not available in this MainProject.jar.
How can I have the LibraryProject
classes available in the MainProject.jar ?
I have tried Maven Assembly Plugin , but it doesn't work for me. I need the dependency be included in the MainProject.jar