Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1091
  • Last Modified:

Need to add dependencies programmatically to a maven project

Hi Experts
I need to add dependencies jars to a maven project programmatically at runtime. The reason I want to do that because I cannot add them all at the beginning since they can be thousands of jars and the user only picks  one or two. I googled the internet but it was not very clear since some people say Don’t do that . I really need an expert-advice

Thanks


0
bachra04
Asked:
bachra04
  • 3
1 Solution
 
Thomas4019Commented:
Hmm, could you possibly merge the jars into a single jar or just a few?
0
 
bachra04Author Commented:
no I can't because the purpose of the solution is to have different jars that can be shared between different teams.
0
 
bachra04Author Commented:
I figured out that just adding a dependency block to the POM.XML does the job. My question is now, is there any API to do that or do I have to program that myself ?

Thanks
0
 
bachra04Author Commented:
I did'nt receive any good answer
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now