• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to access project dependencies from Nexus Repository at runtime  RSS feed

 
Surodip Patra
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am working on a Maven script for our project. Right now our script is building the project and bundling all the jars under WEB-INF/lib folder. After that the war is deployed.
But now is there any way that if we don't include those jars inside WAR, rather get those dependencies from nexus repository/target server m2  folder at runtime?

Any help will be very much helpfull.

Thanks,
Surodip
 
Tim Moores
Saloon Keeper
Posts: 4034
94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, this is a build-time mechanism, not a runtime mechanism. Nor do Java web apps work this way to begin with.

If you want to load or reload classes at runtime, OSGi is one way to do that, but it comes with a steep learning curve.
 
Surodip Patra
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tim for your reply. But can you tell me one thing, is a maven project always looking for dependency from m2_home repo location?

Surodip
 
Tim Moores
Saloon Keeper
Posts: 4034
94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's quite common for Maven (or Gradle) projects to be configured to look at several repositories. Not everything is in Maven Central.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!