You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Massimo Heitor <Ma...@gmail.com> on 2009/03/14 06:05:18 UTC

Newbie Question: Dependencies among Sibling Projects?

I have a software project that is roughly organized like this:

master (aggregation project)
	librarya
	libraryb (depends on librarya)

It seems that I need to "install" librarya before libraryb will compile.

Is there any way to define dependencies among sibling projects like this
(that are part of the same aggregation group) so that they do not need to be
individually installed (preferably not installed at all) and Maven can
auto-detect dependencies and properly build/rebuild?

Also, during development, I do not update the version tag during every
single build/debug cycle. Will Maven properly detect source changes, rebuild
necessary libraries, and update the local repository?
-- 
View this message in context: http://n2.nabble.com/Newbie-Question%3A-Dependencies-among-Sibling-Projects--tp2477109p2477109.html
Sent from the maven users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Newbie Question: Dependencies among Sibling Projects?

Posted by Massimo Heitor <Ma...@gmail.com>.

Wayne Fay wrote:
> 
>> It seems that I need to "install" librarya before libraryb will compile.
> 
> This is correct. Unless you are running "mvn compile" from the top
> parent/aggregation pom.
> 

I am running "mvn compile" from the top aggregation pom and I still get the
dependency failure. I'm using a super simple dummy project setup to test
this... Is this behavior documented anywhere?


Wayne Fay wrote:
> 
> Yes, but make sure you are using x.y.z-SNAPSHOT until you ready to
> freeze a version number. In the Maven world (and its a good policy in
> general), there is only ONE true artifact for a given
> groupId/artifactId/version (GAV) combination.
> 

That makes perfect. There should only be one true build of a released
version, but development snapshots are moving targets.

Is Maven treating the text "SNAPSHOT" as a special-case in the version
string? Is this behavior documented?

Thanks so much for the response!

-- 
View this message in context: http://n2.nabble.com/Newbie-Question%3A-Dependencies-among-Sibling-Projects--tp2477109p2484210.html
Sent from the maven users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Newbie Question: Dependencies among Sibling Projects?

Posted by Wayne Fay <wa...@gmail.com>.
> It seems that I need to "install" librarya before libraryb will compile.

This is correct. Unless you are running "mvn compile" from the top
parent/aggregation pom.

> Is there any way to define dependencies among sibling projects like this
> (that are part of the same aggregation group) so that they do not need to be
> individually installed (preferably not installed at all) and Maven can
> auto-detect dependencies and properly build/rebuild?

Yes, if you run compile from the top parent.

> Also, during development, I do not update the version tag during every
> single build/debug cycle. Will Maven properly detect source changes, rebuild
> necessary libraries, and update the local repository?

Yes, but make sure you are using x.y.z-SNAPSHOT until you ready to
freeze a version number. In the Maven world (and its a good policy in
general), there is only ONE true artifact for a given
groupId/artifactId/version (GAV) combination.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org