Solved

Need to add dependencies programmatically to a maven project

Posted on 2010-11-08
6
1,014 Views
Last Modified: 2013-11-23
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
Comment
Question by:bachra04
  • 3
6 Comments
 
LVL 17

Expert Comment

by:Thomas4019
ID: 34090946
Hmm, could you possibly merge the jars into a single jar or just a few?
0
 
LVL 2

Author Comment

by:bachra04
ID: 34093641
no I can't because the purpose of the solution is to have different jars that can be shared between different teams.
0
 
LVL 2

Accepted Solution

by:
bachra04 earned 0 total points
ID: 34102069
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
 
LVL 2

Author Closing Comment

by:bachra04
ID: 34237248
I did'nt receive any good answer
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show, step by step, how to integrate R code into a R Sweave document
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now