Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Build Single Module with Dependencies

 
Niall Loughnane
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a project where there are multiple modules within the project base pom.xml,

There is a module "moduleA" that is a standalone JAR that is dependent on another module "moduleB" within the project,

Is it possible to build module "moduleA" JAR file and within this JAR file there will be a lib folder that contains module "moduleB" code,

Thanks in Advance,

Niall
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use the Assembly plugin to do this.

By the way, the default classloader will not load a nested JAR, so you will need some code to do that (if Eclipse builds a JAR with nested JARs it includes such a classloader). You might be better off just adding the classes from module B into the JAR for module A; and not in a lib folder because that will mess up the classpath.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic