views:

38

answers:

2

Hello, 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

+1  A: 

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

Ck-
mmm... is it OK to make each project reference each other? In particular, I'd like to avoid the library to have a parent POM, because it may be used by other projects/artifacts in the future.
ris8_allo_zen0
A: 

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.

Pascal Thivent