Re: Questions on maven-scm and others...

2005-04-07 Thread Brett Porter
Vincent Massol wrote:

>Actually it doesn't... :-)
>
>It looks for a directory of that name... I would have preferred an algorithm
>where it would scan all subdirectories, gather all pom.xml and match them on
>artifactId.
>  
>
I considered that, but the filenames felt more intuitive. Let's discuss
it - we can still change it later. It would also allow auto-checkout of
missing modules :)

>However I'm sure I would like to name my directories with the same name as
>my artifactId. The reason is simple: artifactId has a flat structure whereas
>a directory is a tree structure so you don't need to specify every time the
>name of your parent to know where you are.
>  
>
You mean "not sure"?

>Thus I'd prefer to keep having:
>
>core/core/util
>
>with artifactIds of: cargo, cargo-core and cargo-core-util
>
>Will that continue to be possible in the future?
>  
>
It's definitely possible. Maven will probably assume some things about
your directory structure to be able to do things without configuration
(like extending SCM URLs), but we could probably have the option to drim
the last element of the groupId from the start of the artifact Id?

As for your other point about having to specify versions for the
parent... yes, we've thought about it. We will later allow omission of
the  which will assume a snapshot, which means it is first
pulled from the universal source directory (in most cases this will be
../pom.xml), or if not there it will be the latest version in the
repository. On release, the version will be filled in with the correct
value.

- Brett



RE: Questions on maven-scm and others...

2005-04-07 Thread Vincent Massol


> -Original Message-
> From: Emmanuel Venisse [mailto:[EMAIL PROTECTED]
> Sent: jeudi 7 avril 2005 22:52
> To: Maven 2 Developers List
> Subject: Re: Questions on maven-scm and others...

[snip]

> The groupId is define in the master pom and not in maven-scm-api. I
> removed
> it 2 days ago.

Yep, see my other email. I was looking at something old

[snip]
 
> The module declare in a pom correspond to artifactId of a sub-project

Actually it doesn't... :-)

It looks for a directory of that name... I would have preferred an algorithm
where it would scan all subdirectories, gather all pom.xml and match them on
artifactId.

However I'm sure I would like to name my directories with the same name as
my artifactId. The reason is simple: artifactId has a flat structure whereas
a directory is a tree structure so you don't need to specify every time the
name of your parent to know where you are.

Thus I'd prefer to keep having:

core/core/util

with artifactIds of: cargo, cargo-core and cargo-core-util

Will that continue to be possible in the future?

Thanks
-Vincent





Re: Questions on maven-scm and others...

2005-04-07 Thread Emmanuel Venisse
> Hi there,

Hi,

>
> I'm using maven-scm as my example for trying to migrate cargo from m1 to
m2.
> I have a few questions:
>
> 1/ In maven-scm/scm-api/pom.xml, why is groupId equal to maven and not
> org.apache.maven.scm?
>
> Isn't the groupId inherited anyway from the master pom?

The groupId is define in the master pom and not in maven-scm-api. I removed
it 2 days ago.

>
> 2/ Most elements are duplicated from the master pom. Is that normal?

Which?

>
> 3/ Is it necessary to have 4.0.0 in all
> subprojects or can it be inherited?

No, it's necessary to define the model version for know which model reader
we want to use.
A project will can extend an other with a different model version.

>
> 4/ I have the following directory structure in Cargo:
>
> cargo/
>   |_ core/
> |_ util/
>   |_ pom.xml
> |_ pom.xml
>   |_ pom.xml
>
> When I type "m2 install" in cargo/, it doesn't find the nested modules. I
> have the following module definitions:
>
> cargo/pom.xml:
>
>   
> cargo-core
>   
>
> cargo/core/pom.xml

What is your artifactId?

>
>   
> cargo-core-util
>   
>
> What am I doing wrong?

The module declare in a pom correspond to artifactId of a sub-project

>
> That's enough questions for now. I'll have many more questions coming...
;-)
> Anytime, feel free to point me to some doc/code.
>

Emmanuel



RE: Questions on maven-scm and others...

2005-04-07 Thread Vincent Massol
Let me answer some of my own questions...

> -Original Message-
> From: Vincent Massol [mailto:[EMAIL PROTECTED]
> Sent: jeudi 7 avril 2005 22:30
> To: 'Maven 2 Developers List'
> Subject: Questions on maven-scm and others...
> 
> Hi there,
> 
> I'm using maven-scm as my example for trying to migrate cargo from m1 to
> m2.
> I have a few questions:
> 
> 1/ In maven-scm/scm-api/pom.xml, why is groupId equal to maven and not
> org.apache.maven.scm?

Apparently scm-api is the old version and I should look at maven-scm-api
instead. I've now done a clean checkout...
 
> Isn't the groupId inherited anyway from the master pom?

Yes it is.

> 2/ Most elements are duplicated from the master pom. Is that normal?

Have a look at maven-scm-api
 
> 3/ Is it necessary to have 4.0.0 in all
> subprojects or can it be inherited?

Still unsure about the answer.
 
> 4/ I have the following directory structure in Cargo:
> 
> cargo/
>   |_ core/
> |_ util/
>   |_ pom.xml
> |_ pom.xml
>   |_ pom.xml
> 
> When I type "m2 install" in cargo/, it doesn't find the nested modules. I
> have the following module definitions:
> 
> cargo/pom.xml:
> 
>   
> cargo-core
>   
> 
> cargo/core/pom.xml
> 
>   
> cargo-core-util
>   
> 
> What am I doing wrong?

You need to tell what parent to use using a  tag!!

Ok, here's another question:

What if I want to share a version between all my modules and I don't want to
have to specify it everywhere because when I move to a new version I'll have
to update the 20 places where it is written? (I'm sure you have an answer
for that! :-)).

Thanks
-Vincent