ris8_allo_zen0
ris8_allo_zen0

Reputation: 1717

How to set "build" dependencies between Maven projects in Eclipse?

I'm rather new to Maven and I couldn't find a solution to this little (IMHO) problem.

In my Eclipse workspace I have a Maven project for an OSGi bundle (a regular one, not an Eclipse plugin). It depends upon several artifacts (JAR libraries); I need one of them to be built from another Maven project in the workspace. When I rebuild the bundle, I'd like Maven to check whether the other artifact needs to be rebuilt too (i.e. because I edited some of its code), and if so, rebuild that one too. This way I can automatize some steps and avoid forgetting to rebuild the inner library. How to do that?

Thank you for any help!!

Enrico

Upvotes: 3

Views: 1692

Answers (2)

Pascal Thivent
Pascal Thivent

Reputation: 570325

Since you are using m2eclipse, you can configure m2eclipse to use "workspace resolution" i.e. to use a project from your workspace as a dependency instead of a binary dependency (a JAR).

This way, changes are immediately visible.

Upvotes: 1

ch4nd4n
ch4nd4n

Reputation: 4197

There could be several ways. You could begin with maven modules.
http://maven.apache.org/guides/mini/guide-ide-eclipse.html#Multiple_Module_Project

Upvotes: 1

Related Questions