user1965449
user1965449

Reputation: 2931

Adding eclipse project dependencies to a Maven project

I use Maven and I have two different scenarios , and in both of them I want to have the jar built from Maven pom.xml to include all the dependencies.

  1. I have an eclipse buildpath dependency on Maven project B from Maven Project A , when I build Maven project A I want to include project B jar included in it , how can I do that ?

  2. Maven project B also has a lib folder that I added to have a custom jar that is not available in any maven repository , I want this jar to also be included when project B is built by itself using its own maven pom.xml .

How can I achieve these two scenarios. Any guidance would be greatly appreciated.

Thanks.

Upvotes: 0

Views: 130

Answers (1)

LaurentG
LaurentG

Reputation: 11717

I'm not sure about your question 1, but if I understand it correctly, you would like to build with Eclipse two Maven projects where A depends on B? Then you may use an Eclipse plugin like m2eclipse.

For your second question, I think the solution would be to use the system scope for your dependency that you can't find in any public repository. Of course, if you can deploy the dependency on an entreprise repository it would be better.

Upvotes: 1

Related Questions