How can I recursively build -SNAPSHOT dependencies present in the filesystem but outside the reactor?

2012-06-15 Thread Chris Beach
I have two projects as follows, in neighbouring directories on the filesystem:

* project_a (-SNAPSHOT)
* project_b (-SNAPSHOT, depends on project_a)

I'd like to build project_b and for Maven to discover that project_a exists on 
the filesystem and thus build it rather than look in the local repo for its 
artifact.

I could build these within an aggregator and use the reactor to select 
project_b i.e.

mvn --projects project_b [goal]

However, this is problematic because

* this two-project example is a simplification of my real build, which consists 
of dozens of projects, and I don't want to have to maintain an aggregator 
project that lists all of them.
* I only want to recursively build -SNAPSHOT dependencies

Is there a neat way I could get Maven to perform a recursive build that looks 
on the filesystem to find -SNAPSHOT dependency projects and builds them?
I'm familiar with Maven plugin development, but haven't yet found any clues 
toward a solution in the Maven / Aether documentation.

Chris Beach

This email and any attachments contain CONFIDENTIAL information which may be 
legally privileged. If this 
communication constitutes a financial promotion, it is directed only at persons 
who are professional clients or 
eligible counterparties (as defined under the FSA rules).  The information, 
which is provided on a non-reliance 
basis, may be subject to verification or amendment.  No representation or 
warranty is made as to its accuracy or 
completeness. Unless expressly stated otherwise, this email is neither an offer 
to sell nor a solicitation of any 
offer to buy an interest in any fund or other investment vehicle sponsored or 
managed by Aspect Capital Limited 
(Aspect Funds). Any such offer or solicitation would be made only by way of the 
final offering documents of such 
Aspect Fund (which should be considered carefully before any investment 
decision is made) and only in such 
jurisdictions where, and to such persons to whom, it would be lawful to do so. 
Past performance is not necessarily 
indicative of future returns. Email transmission cannot be guaranteed to be 
secure or error free.  Subject to 
applicable law, Aspect (or its service providers) may intercept, monitor, 
review and retain e-communications 
travelling through its networks/systems. By messaging with Aspect you consent 
to the foregoing.  Aspect Capital 
Limited is authorised and regulated by the Financial Services Authority and is 
a company registered in England and Wales 
under registered no. 3491169. Its registered office is at Nations House, 103 
Wigmore Street, London W1U 1QS. ASPECT, 
ASPECT CAPITAL, the ASPECT CAPITAL device and ASPECT CAPITAL:THE SCIENCE OF 
INVESTMENT are registered trademarks of 
Aspect Capital Limited. © Aspect Capital Limited 2012. All rights reserved. For 
more information, go to www.aspectcapital.com.

RE: How can I recursively build -SNAPSHOT dependencies present in the filesystem but outside the reactor?

2012-06-15 Thread Chris Beach
Thanks Thorsten and Ron,

Some additional background:

We're a team of about 25 developers, and 100 projects/modules. All developers 
are familiar with the whole suite of apps, and move freely between projects. 
They want to be able to work on several projects locally without taking in 
unwanted -SNAPSHOT changes from our repo (Artifactory).

In our case, developers simply want to build apps together (usually two or 
three together depending on the scope of the development task) to ensure the 
build accurately reflects the code checked out in the developer's workspace. 

We have Jenkins, which builds our projects on SCM commit, and builds 
dependents. This isn't applicable for individual developer workspace builds.

Ron - the burden of checking out the whole workspace isn't a big deal for us, 
and we still peg individual dependencies to release versions as necessary. My 
original question concerned workspace builds where we intend to use limited 
number of -SNAPSHOT dependencies to trigger a  selectively-recursive build 
across multiple projects.

I am currently building a plugin maven-r-plugin which internally uses 
Maven.execute(MavenExecutionResult) and a file-based index of in-house 
artifacts to prototype a solution to this problem. Suggestions of better 
solutions would be welcome.

Thanks,

Chris

This email and any attachments contain CONFIDENTIAL information which may be 
legally privileged. If this 
communication constitutes a financial promotion, it is directed only at persons 
who are professional clients or 
eligible counterparties (as defined under the FSA rules).  The information, 
which is provided on a non-reliance 
basis, may be subject to verification or amendment.  No representation or 
warranty is made as to its accuracy or 
completeness. Unless expressly stated otherwise, this email is neither an offer 
to sell nor a solicitation of any 
offer to buy an interest in any fund or other investment vehicle sponsored or 
managed by Aspect Capital Limited 
(Aspect Funds). Any such offer or solicitation would be made only by way of the 
final offering documents of such 
Aspect Fund (which should be considered carefully before any investment 
decision is made) and only in such 
jurisdictions where, and to such persons to whom, it would be lawful to do so. 
Past performance is not necessarily 
indicative of future returns. Email transmission cannot be guaranteed to be 
secure or error free.  Subject to 
applicable law, Aspect (or its service providers) may intercept, monitor, 
review and retain e-communications 
travelling through its networks/systems. By messaging with Aspect you consent 
to the foregoing.  Aspect Capital 
Limited is authorised and regulated by the Financial Services Authority and is 
a company registered in England and Wales 
under registered no. 3491169. Its registered office is at Nations House, 103 
Wigmore Street, London W1U 1QS. ASPECT, 
ASPECT CAPITAL, the ASPECT CAPITAL device and ASPECT CAPITAL:THE SCIENCE OF 
INVESTMENT are registered trademarks of 
Aspect Capital Limited. © Aspect Capital Limited 2012. All rights reserved. For 
more information, go to www.aspectcapital.com.