On 10/1/10 2:25 PM, Phillip Hellewell wrote:
> On Fri, Oct 1, 2010 at 12:02 PM, David Jencks <david_jen...@yahoo.com> wrote:
>>> Cool, that's what I was hoping to hear.  Even if I just had a plugin
>>> that would scan all the dependencies and print out their versions,
>>> that would suffice and I could do the checking out myself.
>>
>> does mvn dependency:tree do what you want?
> 
> Yes, it looks like that will work!  Actually, a dependency:resolve
> will work too, maybe even easier.  Will dependency:resolve guarantee
> to print them out in an order such that each artifact comes after any
> artifacts it depends on?
> 
>> I still don't understand exactly what you are trying to do, but it looks to 
>> me like it might be like mvn scm:bootstrap
>>
>> http://maven.apache.org/scm/plugins/bootstrap-mojo.html
> 
> Cool, thanks.  I looked at it real quick and it looks like it can be
> used to checkout and build a project for you, but it doesn't look like
> it will does anything fancy like checking out the dependencies for
> you.
> 
>> It seems to me that the scope of what you want could be hard to define.  
>> Many non-tiny projects come in multi module trees that are expected to be 
>> checked out at some root directory which is not the same as the scm root of 
>> any module you will be using.  So figuring out how much you want to check 
>> out automatically might be a challenge.  And if you really only want a 
>> particular submodule you'll have to do something to calculate the scm 
>> address from the chain of parent poms.  (of course you'll need to follow the 
>> parents until you find an scm tag anyway).
> 
> We are planning to make things consistent so that this automation will
> be possible, e.g.:
> 1. Each "component" will live in a specific place in SVN (e.g.,
> /components/COMPNAME).
> 2. Each "component" will have a single pom.xml.  No multi-modules.
> 3. Before deploying, the SVN tag name will be appended to the artifact
> version number.
> 4. The SVN base url will be defined globally in the user's settings.xml
> 
> So I'll know exactly what to check out for that component just from
> its name and version, which I can get from dependency:resolve.
> 
> Phillip

You'll also need to create a branch from the tag when you check out,
assuming it's a released version.

For example, if Project A 1.0.0-SNAPSHOT depends Project B 1.0.0, you'll
need to copy http://svn/projects/B/tags/1.0.0 to
http://svn/projects/B/branches/1.0.0. You will also need to modify the
Project B's pom when doing this branching to change the version from
1.0.0 to 1.0.1-SNAPSHOT. Finally, you need to change Project A's pom to
reference version 1.0.1-SNAPSHOT of Project B.

It might be better to only support this automation for SNAPSHOTs.

Justin

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

Reply via email to