Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Build Single Module with Dependencies

 
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
 
author
Posts: 5856
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.
 
Talk sense to a fool and he calls you foolish. -Euripides A foolish tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic