You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Paul Gier <pg...@redhat.com> on 2011/07/14 16:57:03 UTC

SCM info and modules

Hi Everyone,

The current behaviour of Maven for a multi-module project is that the
module path will automatically be appended to the end of the scm fields
(connection, url, etc).  This has always seemed like a bug to me since
it not what you would want for a real multi-module project.  The only
case where it is correct is when you have a bunch of small loosely
connected projects (like Maven plugins) and you are using svn.

For a multi-module project using git, this is really annoying because
now I have to set the scm URL for each module separately if I want them
to contain a working URL.  Am I missing some simple configuration?  Or
should we fix this maybe in Maven 3.1 to just inherit the scm
information unmodified instead of trying to be smart about adding module
paths?

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


Re: SCM info and modules

Posted by Mark Struberg <st...@yahoo.de>.
> Let children have sparse scm, and make it the job of the
> scm provider, at runtime ...

Thought about that too. That would work for maven-scm, but there are lots of other plugins and extensions which access the URL information too. For example the site-reporting plugin uses it to report the SCM information. maven-changelog-plugin, etc.
I think it could be possible, but would need some work...

Anyone got a show-stopper for this approach? 
Too late for me to think about it over here, will ping back tomorrow morning.

LieGrue,
strub

--- On Sat, 7/16/11, Benson Margulies <bi...@gmail.com> wrote:

> From: Benson Margulies <bi...@gmail.com>
> Subject: Re: SCM info and modules
> To: "Maven Developers List" <de...@maven.apache.org>
> Date: Saturday, July 16, 2011, 11:31 PM
> Mark,
> 
> Oh, drat, I see, to pick a provider, we have to have
> finished
> processing extensions and all that other good
> model-building stuff.
> 
> OK, another thought.
> 
> As per a previous comment in this thread, death to
> inheritance in scm.
> Let children have sparse scm, and make it the job of the
> scm provider,
> at runtime, to assemble all the information (including
> correct 'url')
> by working up the models of the parents.
> 
> --benson
> 
> 
> On Sat, Jul 16, 2011 at 7:25 PM, Mark Struberg <st...@yahoo.de>
> wrote:
> > The Model gets constructed and only if that step is
> finished, all the information to determine the correct scm
> provider GAV is available!
> >
> > But at this point in time it's too late to modify the
> SCM url because afaik the Model cannot get amended, right?
> >
> > At least that's what I remember from grabbing into
> this very problem 2 years ago. That was maven-2 back then,
> so not sure if things have changed in mvn-3...
> >
> > LieGrue,
> > strub
> >
> > --- On Sat, 7/16/11, Benson Margulies <bi...@gmail.com>
> wrote:
> >
> >> From: Benson Margulies <bi...@gmail.com>
> >> Subject: Re: SCM info and modules
> >> To: "Maven Developers List" <de...@maven.apache.org>
> >> Date: Saturday, July 16, 2011, 11:08 PM
> >> Mark,
> >>
> >> I only see a cycle if the scm modules have to call
> back
> >> into the model
> >> to get the facts they need to answer the question
> the model
> >> is asking.
> >> If the model can load all of the scm facts for the
> current
> >> project and
> >> its parents into some data structure and pass it
> into the
> >> scm to ask
> >> it to fill in what's missing for the current
> project, then
> >> there's no
> >> cycle.
> >>
> >> --benson
> >>
> >>
> >> On Sat, Jul 16, 2011 at 6:36 PM, Mark Struberg
> <st...@yahoo.de>
> >> wrote:
> >> > Hi folks!
> >> >
> >> > Just back from vacation so I try to slowly
> catch up
> >> speed ...
> >> >
> >> > There are a few things to take care off:
> >> >
> >> > a.) We must not introduce a circle: model
> -> scm
> >> -> model. In other words: we cannot ask the scm
> provider
> >> to give us additional information to build the
> model before
> >> the model has been built. This is a chicken-egg
> problem...
> >> >
> >> > b.) Yes, an URL is a coordinate to access
> the
> >> repository. Since GIT (and other DSCMs) allow
> different
> >> protocols for push and pull, we needed optionally
> add 2 path
> >> information to the URL.
> >> >
> >> >
> >> > We could now either opt for a clean solution,
> but this
> >> would most likely not work with POM model-4.0.
> >> >
> >> > Or we could just add another step of
> indirection (the
> >> classical computer science pattern): We introduce
> a
> >> SCM-URL-behaviour mapping.
> >> >  * BehaviourA ('relative') is the one used
> by e.g.
> >> SVN and CVS: automatically adding the submodule
> file path to
> >> the SCM URL while building the MavenModel.
> >> >  * BehaviourB ('static') means to let the
> SCM URL
> >> untouched when constructing the MavenModel.
> >> >
> >> > There must be a mapping somewhere between scm
> url
> >> regexp -> SCM-URL-Strategy, e.g.
> "scm:svn"->relative,
> >> "scm:git"->static, "scm:jgit"->static,...
> >> >
> >> > This could be maintained in settings.xml and
> we
> >> deliver a default one in the global settings.xml.
> That way
> >> it would be predefined but maintainable by the
> user.
> >> >
> >> > LieGrue,
> >> > strub
> >> >
> >> >
> >> > --- On Fri, 7/15/11, Benson Margulies <bi...@gmail.com>
> >> wrote:
> >> >
> >> >> From: Benson Margulies <bi...@gmail.com>
> >> >> Subject: Re: SCM info and modules
> >> >> To: "Maven Developers List" <de...@maven.apache.org>
> >> >> Date: Friday, July 15, 2011, 8:47 PM
> >> >> Let me suggest a generalization of
> >> >> Hervé's thought process.
> >> >>
> >> >> I submit that there are four issues here
> we might
> >> be trying
> >> >> to
> >> >> address. (1) users want to put an scm
> spec in an
> >> >> aggregating project
> >> >> and not have to repeat it (with slight
> mods) in
> >> all the
> >> >> modules. (2)
> >> >> users want to be able to toss a set of
> >> >> aggregation-unrelated projects
> >> >> into a single git repo, or some other SCM
> where
> >> there is a
> >> >> very sharp
> >> >> distinction between the coordinates of
> the repo
> >> and the
> >> >> coordinates of
> >> >> something in the repo (unlike svn), and
> (3), SCMs
> >> like P4
> >> >> (with the
> >> >> problem of managing views) where there
> are complex
> >> aspects
> >> >> of the
> >> >> situation that don't fit nicely into a
> URI. (4)
> >> >> representing the
> >> >> distinction between 'here's how to obtain
> *this
> >> very
> >> >> module* versus
> >> >> *here's now to obtain the smallest unit
> that you
> >> can expect
> >> >> to type
> >> >> 'mvn at'.
> >> >>
> >> >> If we are looking to 3.1, I think that
> all of
> >> these would
> >> >> be addressed
> >> >> best by making the <scm> element of
> the POM
> >> more
> >> >> complex, by treating
> >> >> it as a bag of properties, consisting
> of:
> >> >>
> >> >> 1: An SCM plugin identifier.
> >> >> 2: whatever the SCM would like to know to
> identify
> >> the
> >> >> sensible unit
> >> >> of checkin / checkout (we need a term for
> this. In
> >> Git it's
> >> >> a repo,
> >> >> for svn it's just a path).
> >> >> 3: A path within this unit for this
> project.
> >> >> 4: other, per-scm, parameters.
> >> >>
> >> >> Before 3.1, we can, of course, cram all
> this into
> >> one URI.
> >> >> The issue
> >> >> is how to separate stuff that is viable
> for the
> >> scm itself
> >> >> from our
> >> >> other information. Using a # inside 'the
> url' is
> >> unsafe, I
> >> >> submit,
> >> >> since some scm or another could really
> use a
> >> fragment for
> >> >> something.
> >> >>
> >> >> How about:
> >> >>
> >> >>
> >>
> scm2:new-maven-params:provider-tag:current-provider-params
> >> >>
> >> >> No one is forced to switch to scm2. If
> they want
> >> the
> >> >> features it
> >> >> enables, they have to eschew tools that
> don't
> >> support it.
> >> >>
> >> >> One thing still seems insufficient about
> this to
> >> me.
> >> >> Whether a project
> >> >> requires an aggregation environment to
> build is
> >> not,
> >> >> really, just an
> >> >> scm question. Right now, nothing inside a
> project
> >> states
> >> >> whether it is
> >> >> really independent (published parent) or
> not. In
> >> the case
> >> >> of complex
> >> >> parent structures, there is no simple
> scheme that
> >> does the
> >> >> job. Item 3
> >> >> above sort of solves the problem. but
> does not
> >> distinguish
> >> >> between
> >> >> 'this is an independent project at
> relative path x
> >> within a
> >> >> lump of
> >> >> stuff you get from the scm' and 'this is
> only
> >> buildable as
> >> >> a module of
> >> >> some other aggregating project.'
> >> >>
> >> >> Do we really need to solve that? If so,
> we could
> >> add one
> >> >> more fact:
> >> >> the g:a of the parent from which a build
> makes
> >> sense. Maven
> >> >> could then
> >> >> chase up the parent tree to it.
> >> >>
> >> >>
> >> >>
> >> >> On Fri, Jul 15, 2011 at 4:13 PM, Hervé
> BOUTEMY
> >> <he...@free.fr>
> >> >> wrote:
> >> >> > Le vendredi 15 juillet 2011, John
> Casey a
> >> écrit :
> >> >> >> On 7/14/11 6:41 PM, Hervé
> BOUTEMY
> >> wrote:
> >> >> >> > we call it a URL, but it's
> a String
> >> in the
> >> >> POM [2]
> >> >> >> > Nothing prevents another
> way of
> >> interpreting
> >> >> this String: say properties
> >> >> >> > format?
> >> >> >> > If we want to transform
> this String
> >> to a DOM
> >> >> object in the POM, with
> >> >> >> > specific XML definition for
> each
> >> SCM, I only
> >> >> see the backward
> >> >> >> > compatibility as a strong
> problem
> >> >> >> >
> >> >> >> > Whatever the format is,
> >> maven-scm-api should
> >> >> provide an API to derivate a
> >> >> >> > module definition form its
> parent:
> >> AFAIK,
> >> >> this API doesn't exist, so
> >> >> >> > there should be a Jira
> issue for
> >> this in
> >> >> SCM.
> >> >> >> > Then Maven Core should use
> it when
> >> merging
> >> >> parent, instead of simply
> >> >> >> > appending module name [3]:
> another
> >> Jira issue
> >> >> is needed in MNG (for 3.1
> >> >> >> > for example)
> >> >> >>
> >> >> >> I like that idea of having some
> sort of
> >> >> merge/inheritance calculator
> >> >> >> that's provider-specific.
> >> >> > another idea that would perhaps be
> easier:
> >> modify scm
> >> >> urls to ensure adding
> >> >> > path gives a viable url
> >> >> > eg for git:
> >> >>
> >>
> scm:git:git://server_name[:port]/path_to_repository#path
> >> >> >
> >> >> > I don't really know if this works in
> every
> >> case
> >> >> (tagging, or branching)
> >> >> > but this would permit us to keep the
> simple
> >> algorithm
> >> >> in Maven Core, and avoid
> >> >> > scm dependency (api + detected
> provider)
> >> >> >
> >> >> > there si a complete design to
> define
> >> >> >
> >> >> > Regards,
> >> >> >
> >> >> > Hervé
> >> >> >
> >> >> >>
> >> >> >> > And perhaps a proposal [4]
> to let us
> >> work on
> >> >> preparing this feature,
> >> >> >> > making choices, pointing to
> the Jira
> >> issues?
> >> >> >> >
> >> >> >> > Regards,
> >> >> >> >
> >> >> >> > Hervé
> >> >> >> >
> >> >> >> > [2] http://maven.apache.org/ref/3.0.3/maven-model/maven.html#class_scm
> >> >> >> >
> >> >> >> > [3] http://maven.apache.org/ref/3.0.3/maven-model-
> >> >> >> >
> >> >>
> >>
> builder/xref/org/apache/maven/model/merge/MavenModelMerger.html#438
> >> >> >> >
> >> >> >> > [4] https://cwiki.apache.org/confluence/display/MAVEN/Proposals
> >> >> >> >
> >> >> >> > Le jeudi 14 juillet 2011,
> John Casey
> >> a écrit
> >> >> :
> >> >> >> >> The thing that's
> problematic
> >> here is that
> >> >> we're getting fairly deep down
> >> >> >> >> the rabbit hole on
> these
> >> >> sub-languages...it'd be so much better if
> we
> >> >> >> >> had a way to support a
> proper
> >> format for
> >> >> Git SCM information, rather
> >> >> >> >> than embedding all
> that
> >> information in a
> >> >> really complex pseudo-URL.
> >> >> >> >>
> >> >> >> >> On 7/14/11 4:19 PM,
> Hervé
> >> BOUTEMY
> >> >> wrote:
> >> >> >> >>> SCM url have
> mutiple parts
> >> when
> >> >> multiple parts mean something.
> >> >> >> >>> As you speak about
> git, [1]
> >> shows how
> >> >> tech and push urls can be
> >> >> >> >>> different for
> example
> >> >> >> >>> The algorithm to
> >> automatically
> >> >> derivate SCM url of a sub-module from
> >> >> >> >>> parent SCM should
> be
> >> provider
> >> >> dependendant, available from
> >> >> >> >>> maven-scm-api. And
> Maven
> >> Core would
> >> >> be dependendant on this API and
> >> >> >> >>> detected provider
> to
> >> calculate
> >> >> >> >>>
> >> >> >> >>> I remember of such
> a
> >> discussion a
> >> >> little while ago on this list, but I
> >> >> >> >>> don't remember the
> >> conclusion at that
> >> >> time
> >> >> >> >>>
> >> >> >> >>> Regards,
> >> >> >> >>>
> >> >> >> >>> Hervé
> >> >> >> >>>
> >> >> >> >>> [1] http://maven.apache.org/scm/git.html
> >> >> >> >>>
> >> >> >> >>> Le jeudi 14 juillet
> 2011,
> >> Andreas
> >> >> Sewe a écrit :
> >> >> >> >>>> Hi,
> >> >> >> >>>>
> >> >> >> >>>>> I'm not
> 100% sure it
> >> should
> >> >> be inherited at all. Inheriting
> unchanged
> >> >> >> >>>>> is only
> valid for
> >> something
> >> >> like Git, but probably never for SVN.
> >> >> >> >>>>> However, as
> you
> >> point out,
> >> >> Maven's current guess is usually not
> good
> >> >> >> >>>>> enough
> either.
> >> >> >> >>>>
> >> >> >> >>>> the problem is
> really
> >> that Maven
> >> >> currently has only a single element
> >> >> >> >>>> for something
> that
> >> requires two:
> >> >> one containing an absolute path to
> >> >> >> >>>> the current
> project's
> >> SCM, and
> >> >> one containing the relative path used
> >> >> >> >>>> to move from
> the
> >> aggregator's SCM
> >> >> to the child's.
> >> >> >> >>>>
> >> >> >> >>>> Just my $0.02.
> >> >> >> >>>>
> >> >> >> >>>> Andreas
> >> >> >> >>>>
> >> >
> >> >>
> >> >
> >> >
> >>
> ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> >> > For additional commands, e-mail: dev-help@maven.apache.org
> >> >
> >> >
> >>
> >>
> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: dev-help@maven.apache.org
> >>
> >>
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 
> 

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


Re: SCM info and modules

Posted by Benson Margulies <bi...@gmail.com>.
Mark,

Oh, drat, I see, to pick a provider, we have to have finished
processing extensions and all that other good model-building stuff.

OK, another thought.

As per a previous comment in this thread, death to inheritance in scm.
Let children have sparse scm, and make it the job of the scm provider,
at runtime, to assemble all the information (including correct 'url')
by working up the models of the parents.

--benson


On Sat, Jul 16, 2011 at 7:25 PM, Mark Struberg <st...@yahoo.de> wrote:
> The Model gets constructed and only if that step is finished, all the information to determine the correct scm provider GAV is available!
>
> But at this point in time it's too late to modify the SCM url because afaik the Model cannot get amended, right?
>
> At least that's what I remember from grabbing into this very problem 2 years ago. That was maven-2 back then, so not sure if things have changed in mvn-3...
>
> LieGrue,
> strub
>
> --- On Sat, 7/16/11, Benson Margulies <bi...@gmail.com> wrote:
>
>> From: Benson Margulies <bi...@gmail.com>
>> Subject: Re: SCM info and modules
>> To: "Maven Developers List" <de...@maven.apache.org>
>> Date: Saturday, July 16, 2011, 11:08 PM
>> Mark,
>>
>> I only see a cycle if the scm modules have to call back
>> into the model
>> to get the facts they need to answer the question the model
>> is asking.
>> If the model can load all of the scm facts for the current
>> project and
>> its parents into some data structure and pass it into the
>> scm to ask
>> it to fill in what's missing for the current project, then
>> there's no
>> cycle.
>>
>> --benson
>>
>>
>> On Sat, Jul 16, 2011 at 6:36 PM, Mark Struberg <st...@yahoo.de>
>> wrote:
>> > Hi folks!
>> >
>> > Just back from vacation so I try to slowly catch up
>> speed ...
>> >
>> > There are a few things to take care off:
>> >
>> > a.) We must not introduce a circle: model -> scm
>> -> model. In other words: we cannot ask the scm provider
>> to give us additional information to build the model before
>> the model has been built. This is a chicken-egg problem...
>> >
>> > b.) Yes, an URL is a coordinate to access the
>> repository. Since GIT (and other DSCMs) allow different
>> protocols for push and pull, we needed optionally add 2 path
>> information to the URL.
>> >
>> >
>> > We could now either opt for a clean solution, but this
>> would most likely not work with POM model-4.0.
>> >
>> > Or we could just add another step of indirection (the
>> classical computer science pattern): We introduce a
>> SCM-URL-behaviour mapping.
>> >  * BehaviourA ('relative') is the one used by e.g.
>> SVN and CVS: automatically adding the submodule file path to
>> the SCM URL while building the MavenModel.
>> >  * BehaviourB ('static') means to let the SCM URL
>> untouched when constructing the MavenModel.
>> >
>> > There must be a mapping somewhere between scm url
>> regexp -> SCM-URL-Strategy, e.g. "scm:svn"->relative,
>> "scm:git"->static, "scm:jgit"->static,...
>> >
>> > This could be maintained in settings.xml and we
>> deliver a default one in the global settings.xml. That way
>> it would be predefined but maintainable by the user.
>> >
>> > LieGrue,
>> > strub
>> >
>> >
>> > --- On Fri, 7/15/11, Benson Margulies <bi...@gmail.com>
>> wrote:
>> >
>> >> From: Benson Margulies <bi...@gmail.com>
>> >> Subject: Re: SCM info and modules
>> >> To: "Maven Developers List" <de...@maven.apache.org>
>> >> Date: Friday, July 15, 2011, 8:47 PM
>> >> Let me suggest a generalization of
>> >> Hervé's thought process.
>> >>
>> >> I submit that there are four issues here we might
>> be trying
>> >> to
>> >> address. (1) users want to put an scm spec in an
>> >> aggregating project
>> >> and not have to repeat it (with slight mods) in
>> all the
>> >> modules. (2)
>> >> users want to be able to toss a set of
>> >> aggregation-unrelated projects
>> >> into a single git repo, or some other SCM where
>> there is a
>> >> very sharp
>> >> distinction between the coordinates of the repo
>> and the
>> >> coordinates of
>> >> something in the repo (unlike svn), and (3), SCMs
>> like P4
>> >> (with the
>> >> problem of managing views) where there are complex
>> aspects
>> >> of the
>> >> situation that don't fit nicely into a URI. (4)
>> >> representing the
>> >> distinction between 'here's how to obtain *this
>> very
>> >> module* versus
>> >> *here's now to obtain the smallest unit that you
>> can expect
>> >> to type
>> >> 'mvn at'.
>> >>
>> >> If we are looking to 3.1, I think that all of
>> these would
>> >> be addressed
>> >> best by making the <scm> element of the POM
>> more
>> >> complex, by treating
>> >> it as a bag of properties, consisting of:
>> >>
>> >> 1: An SCM plugin identifier.
>> >> 2: whatever the SCM would like to know to identify
>> the
>> >> sensible unit
>> >> of checkin / checkout (we need a term for this. In
>> Git it's
>> >> a repo,
>> >> for svn it's just a path).
>> >> 3: A path within this unit for this project.
>> >> 4: other, per-scm, parameters.
>> >>
>> >> Before 3.1, we can, of course, cram all this into
>> one URI.
>> >> The issue
>> >> is how to separate stuff that is viable for the
>> scm itself
>> >> from our
>> >> other information. Using a # inside 'the url' is
>> unsafe, I
>> >> submit,
>> >> since some scm or another could really use a
>> fragment for
>> >> something.
>> >>
>> >> How about:
>> >>
>> >>
>> scm2:new-maven-params:provider-tag:current-provider-params
>> >>
>> >> No one is forced to switch to scm2. If they want
>> the
>> >> features it
>> >> enables, they have to eschew tools that don't
>> support it.
>> >>
>> >> One thing still seems insufficient about this to
>> me.
>> >> Whether a project
>> >> requires an aggregation environment to build is
>> not,
>> >> really, just an
>> >> scm question. Right now, nothing inside a project
>> states
>> >> whether it is
>> >> really independent (published parent) or not. In
>> the case
>> >> of complex
>> >> parent structures, there is no simple scheme that
>> does the
>> >> job. Item 3
>> >> above sort of solves the problem. but does not
>> distinguish
>> >> between
>> >> 'this is an independent project at relative path x
>> within a
>> >> lump of
>> >> stuff you get from the scm' and 'this is only
>> buildable as
>> >> a module of
>> >> some other aggregating project.'
>> >>
>> >> Do we really need to solve that? If so, we could
>> add one
>> >> more fact:
>> >> the g:a of the parent from which a build makes
>> sense. Maven
>> >> could then
>> >> chase up the parent tree to it.
>> >>
>> >>
>> >>
>> >> On Fri, Jul 15, 2011 at 4:13 PM, Hervé BOUTEMY
>> <he...@free.fr>
>> >> wrote:
>> >> > Le vendredi 15 juillet 2011, John Casey a
>> écrit :
>> >> >> On 7/14/11 6:41 PM, Hervé BOUTEMY
>> wrote:
>> >> >> > we call it a URL, but it's a String
>> in the
>> >> POM [2]
>> >> >> > Nothing prevents another way of
>> interpreting
>> >> this String: say properties
>> >> >> > format?
>> >> >> > If we want to transform this String
>> to a DOM
>> >> object in the POM, with
>> >> >> > specific XML definition for each
>> SCM, I only
>> >> see the backward
>> >> >> > compatibility as a strong problem
>> >> >> >
>> >> >> > Whatever the format is,
>> maven-scm-api should
>> >> provide an API to derivate a
>> >> >> > module definition form its parent:
>> AFAIK,
>> >> this API doesn't exist, so
>> >> >> > there should be a Jira issue for
>> this in
>> >> SCM.
>> >> >> > Then Maven Core should use it when
>> merging
>> >> parent, instead of simply
>> >> >> > appending module name [3]: another
>> Jira issue
>> >> is needed in MNG (for 3.1
>> >> >> > for example)
>> >> >>
>> >> >> I like that idea of having some sort of
>> >> merge/inheritance calculator
>> >> >> that's provider-specific.
>> >> > another idea that would perhaps be easier:
>> modify scm
>> >> urls to ensure adding
>> >> > path gives a viable url
>> >> > eg for git:
>> >>
>> scm:git:git://server_name[:port]/path_to_repository#path
>> >> >
>> >> > I don't really know if this works in every
>> case
>> >> (tagging, or branching)
>> >> > but this would permit us to keep the simple
>> algorithm
>> >> in Maven Core, and avoid
>> >> > scm dependency (api + detected provider)
>> >> >
>> >> > there si a complete design to define
>> >> >
>> >> > Regards,
>> >> >
>> >> > Hervé
>> >> >
>> >> >>
>> >> >> > And perhaps a proposal [4] to let us
>> work on
>> >> preparing this feature,
>> >> >> > making choices, pointing to the Jira
>> issues?
>> >> >> >
>> >> >> > Regards,
>> >> >> >
>> >> >> > Hervé
>> >> >> >
>> >> >> > [2] http://maven.apache.org/ref/3.0.3/maven-model/maven.html#class_scm
>> >> >> >
>> >> >> > [3] http://maven.apache.org/ref/3.0.3/maven-model-
>> >> >> >
>> >>
>> builder/xref/org/apache/maven/model/merge/MavenModelMerger.html#438
>> >> >> >
>> >> >> > [4] https://cwiki.apache.org/confluence/display/MAVEN/Proposals
>> >> >> >
>> >> >> > Le jeudi 14 juillet 2011, John Casey
>> a écrit
>> >> :
>> >> >> >> The thing that's problematic
>> here is that
>> >> we're getting fairly deep down
>> >> >> >> the rabbit hole on these
>> >> sub-languages...it'd be so much better if we
>> >> >> >> had a way to support a proper
>> format for
>> >> Git SCM information, rather
>> >> >> >> than embedding all that
>> information in a
>> >> really complex pseudo-URL.
>> >> >> >>
>> >> >> >> On 7/14/11 4:19 PM, Hervé
>> BOUTEMY
>> >> wrote:
>> >> >> >>> SCM url have mutiple parts
>> when
>> >> multiple parts mean something.
>> >> >> >>> As you speak about git, [1]
>> shows how
>> >> tech and push urls can be
>> >> >> >>> different for example
>> >> >> >>> The algorithm to
>> automatically
>> >> derivate SCM url of a sub-module from
>> >> >> >>> parent SCM should be
>> provider
>> >> dependendant, available from
>> >> >> >>> maven-scm-api. And Maven
>> Core would
>> >> be dependendant on this API and
>> >> >> >>> detected provider to
>> calculate
>> >> >> >>>
>> >> >> >>> I remember of such a
>> discussion a
>> >> little while ago on this list, but I
>> >> >> >>> don't remember the
>> conclusion at that
>> >> time
>> >> >> >>>
>> >> >> >>> Regards,
>> >> >> >>>
>> >> >> >>> Hervé
>> >> >> >>>
>> >> >> >>> [1] http://maven.apache.org/scm/git.html
>> >> >> >>>
>> >> >> >>> Le jeudi 14 juillet 2011,
>> Andreas
>> >> Sewe a écrit :
>> >> >> >>>> Hi,
>> >> >> >>>>
>> >> >> >>>>> I'm not 100% sure it
>> should
>> >> be inherited at all. Inheriting unchanged
>> >> >> >>>>> is only valid for
>> something
>> >> like Git, but probably never for SVN.
>> >> >> >>>>> However, as you
>> point out,
>> >> Maven's current guess is usually not good
>> >> >> >>>>> enough either.
>> >> >> >>>>
>> >> >> >>>> the problem is really
>> that Maven
>> >> currently has only a single element
>> >> >> >>>> for something that
>> requires two:
>> >> one containing an absolute path to
>> >> >> >>>> the current project's
>> SCM, and
>> >> one containing the relative path used
>> >> >> >>>> to move from the
>> aggregator's SCM
>> >> to the child's.
>> >> >> >>>>
>> >> >> >>>> Just my $0.02.
>> >> >> >>>>
>> >> >> >>>> Andreas
>> >> >> >>>>
>> >
>> >>
>> >
>> >
>> ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> > For additional commands, e-mail: dev-help@maven.apache.org
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

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


Re: SCM info and modules

Posted by Mark Struberg <st...@yahoo.de>.
The Model gets constructed and only if that step is finished, all the information to determine the correct scm provider GAV is available!

But at this point in time it's too late to modify the SCM url because afaik the Model cannot get amended, right?

At least that's what I remember from grabbing into this very problem 2 years ago. That was maven-2 back then, so not sure if things have changed in mvn-3...

LieGrue,
strub

--- On Sat, 7/16/11, Benson Margulies <bi...@gmail.com> wrote:

> From: Benson Margulies <bi...@gmail.com>
> Subject: Re: SCM info and modules
> To: "Maven Developers List" <de...@maven.apache.org>
> Date: Saturday, July 16, 2011, 11:08 PM
> Mark,
> 
> I only see a cycle if the scm modules have to call back
> into the model
> to get the facts they need to answer the question the model
> is asking.
> If the model can load all of the scm facts for the current
> project and
> its parents into some data structure and pass it into the
> scm to ask
> it to fill in what's missing for the current project, then
> there's no
> cycle.
> 
> --benson
> 
> 
> On Sat, Jul 16, 2011 at 6:36 PM, Mark Struberg <st...@yahoo.de>
> wrote:
> > Hi folks!
> >
> > Just back from vacation so I try to slowly catch up
> speed ...
> >
> > There are a few things to take care off:
> >
> > a.) We must not introduce a circle: model -> scm
> -> model. In other words: we cannot ask the scm provider
> to give us additional information to build the model before
> the model has been built. This is a chicken-egg problem...
> >
> > b.) Yes, an URL is a coordinate to access the
> repository. Since GIT (and other DSCMs) allow different
> protocols for push and pull, we needed optionally add 2 path
> information to the URL.
> >
> >
> > We could now either opt for a clean solution, but this
> would most likely not work with POM model-4.0.
> >
> > Or we could just add another step of indirection (the
> classical computer science pattern): We introduce a
> SCM-URL-behaviour mapping.
> >  * BehaviourA ('relative') is the one used by e.g.
> SVN and CVS: automatically adding the submodule file path to
> the SCM URL while building the MavenModel.
> >  * BehaviourB ('static') means to let the SCM URL
> untouched when constructing the MavenModel.
> >
> > There must be a mapping somewhere between scm url
> regexp -> SCM-URL-Strategy, e.g. "scm:svn"->relative,
> "scm:git"->static, "scm:jgit"->static,...
> >
> > This could be maintained in settings.xml and we
> deliver a default one in the global settings.xml. That way
> it would be predefined but maintainable by the user.
> >
> > LieGrue,
> > strub
> >
> >
> > --- On Fri, 7/15/11, Benson Margulies <bi...@gmail.com>
> wrote:
> >
> >> From: Benson Margulies <bi...@gmail.com>
> >> Subject: Re: SCM info and modules
> >> To: "Maven Developers List" <de...@maven.apache.org>
> >> Date: Friday, July 15, 2011, 8:47 PM
> >> Let me suggest a generalization of
> >> Hervé's thought process.
> >>
> >> I submit that there are four issues here we might
> be trying
> >> to
> >> address. (1) users want to put an scm spec in an
> >> aggregating project
> >> and not have to repeat it (with slight mods) in
> all the
> >> modules. (2)
> >> users want to be able to toss a set of
> >> aggregation-unrelated projects
> >> into a single git repo, or some other SCM where
> there is a
> >> very sharp
> >> distinction between the coordinates of the repo
> and the
> >> coordinates of
> >> something in the repo (unlike svn), and (3), SCMs
> like P4
> >> (with the
> >> problem of managing views) where there are complex
> aspects
> >> of the
> >> situation that don't fit nicely into a URI. (4)
> >> representing the
> >> distinction between 'here's how to obtain *this
> very
> >> module* versus
> >> *here's now to obtain the smallest unit that you
> can expect
> >> to type
> >> 'mvn at'.
> >>
> >> If we are looking to 3.1, I think that all of
> these would
> >> be addressed
> >> best by making the <scm> element of the POM
> more
> >> complex, by treating
> >> it as a bag of properties, consisting of:
> >>
> >> 1: An SCM plugin identifier.
> >> 2: whatever the SCM would like to know to identify
> the
> >> sensible unit
> >> of checkin / checkout (we need a term for this. In
> Git it's
> >> a repo,
> >> for svn it's just a path).
> >> 3: A path within this unit for this project.
> >> 4: other, per-scm, parameters.
> >>
> >> Before 3.1, we can, of course, cram all this into
> one URI.
> >> The issue
> >> is how to separate stuff that is viable for the
> scm itself
> >> from our
> >> other information. Using a # inside 'the url' is
> unsafe, I
> >> submit,
> >> since some scm or another could really use a
> fragment for
> >> something.
> >>
> >> How about:
> >>
> >>
> scm2:new-maven-params:provider-tag:current-provider-params
> >>
> >> No one is forced to switch to scm2. If they want
> the
> >> features it
> >> enables, they have to eschew tools that don't
> support it.
> >>
> >> One thing still seems insufficient about this to
> me.
> >> Whether a project
> >> requires an aggregation environment to build is
> not,
> >> really, just an
> >> scm question. Right now, nothing inside a project
> states
> >> whether it is
> >> really independent (published parent) or not. In
> the case
> >> of complex
> >> parent structures, there is no simple scheme that
> does the
> >> job. Item 3
> >> above sort of solves the problem. but does not
> distinguish
> >> between
> >> 'this is an independent project at relative path x
> within a
> >> lump of
> >> stuff you get from the scm' and 'this is only
> buildable as
> >> a module of
> >> some other aggregating project.'
> >>
> >> Do we really need to solve that? If so, we could
> add one
> >> more fact:
> >> the g:a of the parent from which a build makes
> sense. Maven
> >> could then
> >> chase up the parent tree to it.
> >>
> >>
> >>
> >> On Fri, Jul 15, 2011 at 4:13 PM, Hervé BOUTEMY
> <he...@free.fr>
> >> wrote:
> >> > Le vendredi 15 juillet 2011, John Casey a
> écrit :
> >> >> On 7/14/11 6:41 PM, Hervé BOUTEMY
> wrote:
> >> >> > we call it a URL, but it's a String
> in the
> >> POM [2]
> >> >> > Nothing prevents another way of
> interpreting
> >> this String: say properties
> >> >> > format?
> >> >> > If we want to transform this String
> to a DOM
> >> object in the POM, with
> >> >> > specific XML definition for each
> SCM, I only
> >> see the backward
> >> >> > compatibility as a strong problem
> >> >> >
> >> >> > Whatever the format is,
> maven-scm-api should
> >> provide an API to derivate a
> >> >> > module definition form its parent:
> AFAIK,
> >> this API doesn't exist, so
> >> >> > there should be a Jira issue for
> this in
> >> SCM.
> >> >> > Then Maven Core should use it when
> merging
> >> parent, instead of simply
> >> >> > appending module name [3]: another
> Jira issue
> >> is needed in MNG (for 3.1
> >> >> > for example)
> >> >>
> >> >> I like that idea of having some sort of
> >> merge/inheritance calculator
> >> >> that's provider-specific.
> >> > another idea that would perhaps be easier:
> modify scm
> >> urls to ensure adding
> >> > path gives a viable url
> >> > eg for git:
> >>
> scm:git:git://server_name[:port]/path_to_repository#path
> >> >
> >> > I don't really know if this works in every
> case
> >> (tagging, or branching)
> >> > but this would permit us to keep the simple
> algorithm
> >> in Maven Core, and avoid
> >> > scm dependency (api + detected provider)
> >> >
> >> > there si a complete design to define
> >> >
> >> > Regards,
> >> >
> >> > Hervé
> >> >
> >> >>
> >> >> > And perhaps a proposal [4] to let us
> work on
> >> preparing this feature,
> >> >> > making choices, pointing to the Jira
> issues?
> >> >> >
> >> >> > Regards,
> >> >> >
> >> >> > Hervé
> >> >> >
> >> >> > [2] http://maven.apache.org/ref/3.0.3/maven-model/maven.html#class_scm
> >> >> >
> >> >> > [3] http://maven.apache.org/ref/3.0.3/maven-model-
> >> >> >
> >>
> builder/xref/org/apache/maven/model/merge/MavenModelMerger.html#438
> >> >> >
> >> >> > [4] https://cwiki.apache.org/confluence/display/MAVEN/Proposals
> >> >> >
> >> >> > Le jeudi 14 juillet 2011, John Casey
> a écrit
> >> :
> >> >> >> The thing that's problematic
> here is that
> >> we're getting fairly deep down
> >> >> >> the rabbit hole on these
> >> sub-languages...it'd be so much better if we
> >> >> >> had a way to support a proper
> format for
> >> Git SCM information, rather
> >> >> >> than embedding all that
> information in a
> >> really complex pseudo-URL.
> >> >> >>
> >> >> >> On 7/14/11 4:19 PM, Hervé
> BOUTEMY
> >> wrote:
> >> >> >>> SCM url have mutiple parts
> when
> >> multiple parts mean something.
> >> >> >>> As you speak about git, [1]
> shows how
> >> tech and push urls can be
> >> >> >>> different for example
> >> >> >>> The algorithm to
> automatically
> >> derivate SCM url of a sub-module from
> >> >> >>> parent SCM should be
> provider
> >> dependendant, available from
> >> >> >>> maven-scm-api. And Maven
> Core would
> >> be dependendant on this API and
> >> >> >>> detected provider to
> calculate
> >> >> >>>
> >> >> >>> I remember of such a
> discussion a
> >> little while ago on this list, but I
> >> >> >>> don't remember the
> conclusion at that
> >> time
> >> >> >>>
> >> >> >>> Regards,
> >> >> >>>
> >> >> >>> Hervé
> >> >> >>>
> >> >> >>> [1] http://maven.apache.org/scm/git.html
> >> >> >>>
> >> >> >>> Le jeudi 14 juillet 2011,
> Andreas
> >> Sewe a écrit :
> >> >> >>>> Hi,
> >> >> >>>>
> >> >> >>>>> I'm not 100% sure it
> should
> >> be inherited at all. Inheriting unchanged
> >> >> >>>>> is only valid for
> something
> >> like Git, but probably never for SVN.
> >> >> >>>>> However, as you
> point out,
> >> Maven's current guess is usually not good
> >> >> >>>>> enough either.
> >> >> >>>>
> >> >> >>>> the problem is really
> that Maven
> >> currently has only a single element
> >> >> >>>> for something that
> requires two:
> >> one containing an absolute path to
> >> >> >>>> the current project's
> SCM, and
> >> one containing the relative path used
> >> >> >>>> to move from the
> aggregator's SCM
> >> to the child's.
> >> >> >>>>
> >> >> >>>> Just my $0.02.
> >> >> >>>>
> >> >> >>>> Andreas
> >> >> >>>>
> >
> >>
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 
> 

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


Re: SCM info and modules

Posted by Benson Margulies <bi...@gmail.com>.
Mark,

I only see a cycle if the scm modules have to call back into the model
to get the facts they need to answer the question the model is asking.
If the model can load all of the scm facts for the current project and
its parents into some data structure and pass it into the scm to ask
it to fill in what's missing for the current project, then there's no
cycle.

--benson


On Sat, Jul 16, 2011 at 6:36 PM, Mark Struberg <st...@yahoo.de> wrote:
> Hi folks!
>
> Just back from vacation so I try to slowly catch up speed ...
>
> There are a few things to take care off:
>
> a.) We must not introduce a circle: model -> scm -> model. In other words: we cannot ask the scm provider to give us additional information to build the model before the model has been built. This is a chicken-egg problem...
>
> b.) Yes, an URL is a coordinate to access the repository. Since GIT (and other DSCMs) allow different protocols for push and pull, we needed optionally add 2 path information to the URL.
>
>
> We could now either opt for a clean solution, but this would most likely not work with POM model-4.0.
>
> Or we could just add another step of indirection (the classical computer science pattern): We introduce a SCM-URL-behaviour mapping.
>  * BehaviourA ('relative') is the one used by e.g. SVN and CVS: automatically adding the submodule file path to the SCM URL while building the MavenModel.
>  * BehaviourB ('static') means to let the SCM URL untouched when constructing the MavenModel.
>
> There must be a mapping somewhere between scm url regexp -> SCM-URL-Strategy, e.g. "scm:svn"->relative, "scm:git"->static, "scm:jgit"->static,...
>
> This could be maintained in settings.xml and we deliver a default one in the global settings.xml. That way it would be predefined but maintainable by the user.
>
> LieGrue,
> strub
>
>
> --- On Fri, 7/15/11, Benson Margulies <bi...@gmail.com> wrote:
>
>> From: Benson Margulies <bi...@gmail.com>
>> Subject: Re: SCM info and modules
>> To: "Maven Developers List" <de...@maven.apache.org>
>> Date: Friday, July 15, 2011, 8:47 PM
>> Let me suggest a generalization of
>> Hervé's thought process.
>>
>> I submit that there are four issues here we might be trying
>> to
>> address. (1) users want to put an scm spec in an
>> aggregating project
>> and not have to repeat it (with slight mods) in all the
>> modules. (2)
>> users want to be able to toss a set of
>> aggregation-unrelated projects
>> into a single git repo, or some other SCM where there is a
>> very sharp
>> distinction between the coordinates of the repo and the
>> coordinates of
>> something in the repo (unlike svn), and (3), SCMs like P4
>> (with the
>> problem of managing views) where there are complex aspects
>> of the
>> situation that don't fit nicely into a URI. (4)
>> representing the
>> distinction between 'here's how to obtain *this very
>> module* versus
>> *here's now to obtain the smallest unit that you can expect
>> to type
>> 'mvn at'.
>>
>> If we are looking to 3.1, I think that all of these would
>> be addressed
>> best by making the <scm> element of the POM more
>> complex, by treating
>> it as a bag of properties, consisting of:
>>
>> 1: An SCM plugin identifier.
>> 2: whatever the SCM would like to know to identify the
>> sensible unit
>> of checkin / checkout (we need a term for this. In Git it's
>> a repo,
>> for svn it's just a path).
>> 3: A path within this unit for this project.
>> 4: other, per-scm, parameters.
>>
>> Before 3.1, we can, of course, cram all this into one URI.
>> The issue
>> is how to separate stuff that is viable for the scm itself
>> from our
>> other information. Using a # inside 'the url' is unsafe, I
>> submit,
>> since some scm or another could really use a fragment for
>> something.
>>
>> How about:
>>
>> scm2:new-maven-params:provider-tag:current-provider-params
>>
>> No one is forced to switch to scm2. If they want the
>> features it
>> enables, they have to eschew tools that don't support it.
>>
>> One thing still seems insufficient about this to me.
>> Whether a project
>> requires an aggregation environment to build is not,
>> really, just an
>> scm question. Right now, nothing inside a project states
>> whether it is
>> really independent (published parent) or not. In the case
>> of complex
>> parent structures, there is no simple scheme that does the
>> job. Item 3
>> above sort of solves the problem. but does not distinguish
>> between
>> 'this is an independent project at relative path x within a
>> lump of
>> stuff you get from the scm' and 'this is only buildable as
>> a module of
>> some other aggregating project.'
>>
>> Do we really need to solve that? If so, we could add one
>> more fact:
>> the g:a of the parent from which a build makes sense. Maven
>> could then
>> chase up the parent tree to it.
>>
>>
>>
>> On Fri, Jul 15, 2011 at 4:13 PM, Hervé BOUTEMY <he...@free.fr>
>> wrote:
>> > Le vendredi 15 juillet 2011, John Casey a écrit :
>> >> On 7/14/11 6:41 PM, Hervé BOUTEMY wrote:
>> >> > we call it a URL, but it's a String in the
>> POM [2]
>> >> > Nothing prevents another way of interpreting
>> this String: say properties
>> >> > format?
>> >> > If we want to transform this String to a DOM
>> object in the POM, with
>> >> > specific XML definition for each SCM, I only
>> see the backward
>> >> > compatibility as a strong problem
>> >> >
>> >> > Whatever the format is, maven-scm-api should
>> provide an API to derivate a
>> >> > module definition form its parent: AFAIK,
>> this API doesn't exist, so
>> >> > there should be a Jira issue for this in
>> SCM.
>> >> > Then Maven Core should use it when merging
>> parent, instead of simply
>> >> > appending module name [3]: another Jira issue
>> is needed in MNG (for 3.1
>> >> > for example)
>> >>
>> >> I like that idea of having some sort of
>> merge/inheritance calculator
>> >> that's provider-specific.
>> > another idea that would perhaps be easier: modify scm
>> urls to ensure adding
>> > path gives a viable url
>> > eg for git:
>> scm:git:git://server_name[:port]/path_to_repository#path
>> >
>> > I don't really know if this works in every case
>> (tagging, or branching)
>> > but this would permit us to keep the simple algorithm
>> in Maven Core, and avoid
>> > scm dependency (api + detected provider)
>> >
>> > there si a complete design to define
>> >
>> > Regards,
>> >
>> > Hervé
>> >
>> >>
>> >> > And perhaps a proposal [4] to let us work on
>> preparing this feature,
>> >> > making choices, pointing to the Jira issues?
>> >> >
>> >> > Regards,
>> >> >
>> >> > Hervé
>> >> >
>> >> > [2] http://maven.apache.org/ref/3.0.3/maven-model/maven.html#class_scm
>> >> >
>> >> > [3] http://maven.apache.org/ref/3.0.3/maven-model-
>> >> >
>> builder/xref/org/apache/maven/model/merge/MavenModelMerger.html#438
>> >> >
>> >> > [4] https://cwiki.apache.org/confluence/display/MAVEN/Proposals
>> >> >
>> >> > Le jeudi 14 juillet 2011, John Casey a écrit
>> :
>> >> >> The thing that's problematic here is that
>> we're getting fairly deep down
>> >> >> the rabbit hole on these
>> sub-languages...it'd be so much better if we
>> >> >> had a way to support a proper format for
>> Git SCM information, rather
>> >> >> than embedding all that information in a
>> really complex pseudo-URL.
>> >> >>
>> >> >> On 7/14/11 4:19 PM, Hervé BOUTEMY
>> wrote:
>> >> >>> SCM url have mutiple parts when
>> multiple parts mean something.
>> >> >>> As you speak about git, [1] shows how
>> tech and push urls can be
>> >> >>> different for example
>> >> >>> The algorithm to automatically
>> derivate SCM url of a sub-module from
>> >> >>> parent SCM should be provider
>> dependendant, available from
>> >> >>> maven-scm-api. And Maven Core would
>> be dependendant on this API and
>> >> >>> detected provider to calculate
>> >> >>>
>> >> >>> I remember of such a discussion a
>> little while ago on this list, but I
>> >> >>> don't remember the conclusion at that
>> time
>> >> >>>
>> >> >>> Regards,
>> >> >>>
>> >> >>> Hervé
>> >> >>>
>> >> >>> [1] http://maven.apache.org/scm/git.html
>> >> >>>
>> >> >>> Le jeudi 14 juillet 2011, Andreas
>> Sewe a écrit :
>> >> >>>> Hi,
>> >> >>>>
>> >> >>>>> I'm not 100% sure it should
>> be inherited at all. Inheriting unchanged
>> >> >>>>> is only valid for something
>> like Git, but probably never for SVN.
>> >> >>>>> However, as you point out,
>> Maven's current guess is usually not good
>> >> >>>>> enough either.
>> >> >>>>
>> >> >>>> the problem is really that Maven
>> currently has only a single element
>> >> >>>> for something that requires two:
>> one containing an absolute path to
>> >> >>>> the current project's SCM, and
>> one containing the relative path used
>> >> >>>> to move from the aggregator's SCM
>> to the child's.
>> >> >>>>
>> >> >>>> Just my $0.02.
>> >> >>>>
>> >> >>>> Andreas
>> >> >>>>
>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

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


Re: SCM info and modules

Posted by Mark Struberg <st...@yahoo.de>.
Hi folks!

Just back from vacation so I try to slowly catch up speed ...

There are a few things to take care off:

a.) We must not introduce a circle: model -> scm -> model. In other words: we cannot ask the scm provider to give us additional information to build the model before the model has been built. This is a chicken-egg problem...

b.) Yes, an URL is a coordinate to access the repository. Since GIT (and other DSCMs) allow different protocols for push and pull, we needed optionally add 2 path information to the URL.


We could now either opt for a clean solution, but this would most likely not work with POM model-4.0. 

Or we could just add another step of indirection (the classical computer science pattern): We introduce a SCM-URL-behaviour mapping.
 * BehaviourA ('relative') is the one used by e.g. SVN and CVS: automatically adding the submodule file path to the SCM URL while building the MavenModel. 
 * BehaviourB ('static') means to let the SCM URL untouched when constructing the MavenModel.

There must be a mapping somewhere between scm url regexp -> SCM-URL-Strategy, e.g. "scm:svn"->relative, "scm:git"->static, "scm:jgit"->static,...

This could be maintained in settings.xml and we deliver a default one in the global settings.xml. That way it would be predefined but maintainable by the user.

LieGrue,
strub 


--- On Fri, 7/15/11, Benson Margulies <bi...@gmail.com> wrote:

> From: Benson Margulies <bi...@gmail.com>
> Subject: Re: SCM info and modules
> To: "Maven Developers List" <de...@maven.apache.org>
> Date: Friday, July 15, 2011, 8:47 PM
> Let me suggest a generalization of
> Hervé's thought process.
> 
> I submit that there are four issues here we might be trying
> to
> address. (1) users want to put an scm spec in an
> aggregating project
> and not have to repeat it (with slight mods) in all the
> modules. (2)
> users want to be able to toss a set of
> aggregation-unrelated projects
> into a single git repo, or some other SCM where there is a
> very sharp
> distinction between the coordinates of the repo and the
> coordinates of
> something in the repo (unlike svn), and (3), SCMs like P4
> (with the
> problem of managing views) where there are complex aspects
> of the
> situation that don't fit nicely into a URI. (4)
> representing the
> distinction between 'here's how to obtain *this very
> module* versus
> *here's now to obtain the smallest unit that you can expect
> to type
> 'mvn at'.
> 
> If we are looking to 3.1, I think that all of these would
> be addressed
> best by making the <scm> element of the POM more
> complex, by treating
> it as a bag of properties, consisting of:
> 
> 1: An SCM plugin identifier.
> 2: whatever the SCM would like to know to identify the
> sensible unit
> of checkin / checkout (we need a term for this. In Git it's
> a repo,
> for svn it's just a path).
> 3: A path within this unit for this project.
> 4: other, per-scm, parameters.
> 
> Before 3.1, we can, of course, cram all this into one URI.
> The issue
> is how to separate stuff that is viable for the scm itself
> from our
> other information. Using a # inside 'the url' is unsafe, I
> submit,
> since some scm or another could really use a fragment for
> something.
> 
> How about:
> 
> scm2:new-maven-params:provider-tag:current-provider-params
> 
> No one is forced to switch to scm2. If they want the
> features it
> enables, they have to eschew tools that don't support it.
> 
> One thing still seems insufficient about this to me.
> Whether a project
> requires an aggregation environment to build is not,
> really, just an
> scm question. Right now, nothing inside a project states
> whether it is
> really independent (published parent) or not. In the case
> of complex
> parent structures, there is no simple scheme that does the
> job. Item 3
> above sort of solves the problem. but does not distinguish
> between
> 'this is an independent project at relative path x within a
> lump of
> stuff you get from the scm' and 'this is only buildable as
> a module of
> some other aggregating project.'
> 
> Do we really need to solve that? If so, we could add one
> more fact:
> the g:a of the parent from which a build makes sense. Maven
> could then
> chase up the parent tree to it.
> 
> 
> 
> On Fri, Jul 15, 2011 at 4:13 PM, Hervé BOUTEMY <he...@free.fr>
> wrote:
> > Le vendredi 15 juillet 2011, John Casey a écrit :
> >> On 7/14/11 6:41 PM, Hervé BOUTEMY wrote:
> >> > we call it a URL, but it's a String in the
> POM [2]
> >> > Nothing prevents another way of interpreting
> this String: say properties
> >> > format?
> >> > If we want to transform this String to a DOM
> object in the POM, with
> >> > specific XML definition for each SCM, I only
> see the backward
> >> > compatibility as a strong problem
> >> >
> >> > Whatever the format is, maven-scm-api should
> provide an API to derivate a
> >> > module definition form its parent: AFAIK,
> this API doesn't exist, so
> >> > there should be a Jira issue for this in
> SCM.
> >> > Then Maven Core should use it when merging
> parent, instead of simply
> >> > appending module name [3]: another Jira issue
> is needed in MNG (for 3.1
> >> > for example)
> >>
> >> I like that idea of having some sort of
> merge/inheritance calculator
> >> that's provider-specific.
> > another idea that would perhaps be easier: modify scm
> urls to ensure adding
> > path gives a viable url
> > eg for git:
> scm:git:git://server_name[:port]/path_to_repository#path
> >
> > I don't really know if this works in every case
> (tagging, or branching)
> > but this would permit us to keep the simple algorithm
> in Maven Core, and avoid
> > scm dependency (api + detected provider)
> >
> > there si a complete design to define
> >
> > Regards,
> >
> > Hervé
> >
> >>
> >> > And perhaps a proposal [4] to let us work on
> preparing this feature,
> >> > making choices, pointing to the Jira issues?
> >> >
> >> > Regards,
> >> >
> >> > Hervé
> >> >
> >> > [2] http://maven.apache.org/ref/3.0.3/maven-model/maven.html#class_scm
> >> >
> >> > [3] http://maven.apache.org/ref/3.0.3/maven-model-
> >> >
> builder/xref/org/apache/maven/model/merge/MavenModelMerger.html#438
> >> >
> >> > [4] https://cwiki.apache.org/confluence/display/MAVEN/Proposals
> >> >
> >> > Le jeudi 14 juillet 2011, John Casey a écrit
> :
> >> >> The thing that's problematic here is that
> we're getting fairly deep down
> >> >> the rabbit hole on these
> sub-languages...it'd be so much better if we
> >> >> had a way to support a proper format for
> Git SCM information, rather
> >> >> than embedding all that information in a
> really complex pseudo-URL.
> >> >>
> >> >> On 7/14/11 4:19 PM, Hervé BOUTEMY
> wrote:
> >> >>> SCM url have mutiple parts when
> multiple parts mean something.
> >> >>> As you speak about git, [1] shows how
> tech and push urls can be
> >> >>> different for example
> >> >>> The algorithm to automatically
> derivate SCM url of a sub-module from
> >> >>> parent SCM should be provider
> dependendant, available from
> >> >>> maven-scm-api. And Maven Core would
> be dependendant on this API and
> >> >>> detected provider to calculate
> >> >>>
> >> >>> I remember of such a discussion a
> little while ago on this list, but I
> >> >>> don't remember the conclusion at that
> time
> >> >>>
> >> >>> Regards,
> >> >>>
> >> >>> Hervé
> >> >>>
> >> >>> [1] http://maven.apache.org/scm/git.html
> >> >>>
> >> >>> Le jeudi 14 juillet 2011, Andreas
> Sewe a écrit :
> >> >>>> Hi,
> >> >>>>
> >> >>>>> I'm not 100% sure it should
> be inherited at all. Inheriting unchanged
> >> >>>>> is only valid for something
> like Git, but probably never for SVN.
> >> >>>>> However, as you point out,
> Maven's current guess is usually not good
> >> >>>>> enough either.
> >> >>>>
> >> >>>> the problem is really that Maven
> currently has only a single element
> >> >>>> for something that requires two:
> one containing an absolute path to
> >> >>>> the current project's SCM, and
> one containing the relative path used
> >> >>>> to move from the aggregator's SCM
> to the child's.
> >> >>>>
> >> >>>> Just my $0.02.
> >> >>>>
> >> >>>> Andreas
> >> >>>>

> 

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


Re: SCM info and modules

Posted by Benson Margulies <bi...@gmail.com>.
Let me suggest a generalization of Hervé's thought process.

I submit that there are four issues here we might be trying to
address. (1) users want to put an scm spec in an aggregating project
and not have to repeat it (with slight mods) in all the modules. (2)
users want to be able to toss a set of aggregation-unrelated projects
into a single git repo, or some other SCM where there is a very sharp
distinction between the coordinates of the repo and the coordinates of
something in the repo (unlike svn), and (3), SCMs like P4 (with the
problem of managing views) where there are complex aspects of the
situation that don't fit nicely into a URI. (4) representing the
distinction between 'here's how to obtain *this very module* versus
*here's now to obtain the smallest unit that you can expect to type
'mvn at'.

If we are looking to 3.1, I think that all of these would be addressed
best by making the <scm> element of the POM more complex, by treating
it as a bag of properties, consisting of:

1: An SCM plugin identifier.
2: whatever the SCM would like to know to identify the sensible unit
of checkin / checkout (we need a term for this. In Git it's a repo,
for svn it's just a path).
3: A path within this unit for this project.
4: other, per-scm, parameters.

Before 3.1, we can, of course, cram all this into one URI. The issue
is how to separate stuff that is viable for the scm itself from our
other information. Using a # inside 'the url' is unsafe, I submit,
since some scm or another could really use a fragment for something.

How about:

scm2:new-maven-params:provider-tag:current-provider-params

No one is forced to switch to scm2. If they want the features it
enables, they have to eschew tools that don't support it.

One thing still seems insufficient about this to me. Whether a project
requires an aggregation environment to build is not, really, just an
scm question. Right now, nothing inside a project states whether it is
really independent (published parent) or not. In the case of complex
parent structures, there is no simple scheme that does the job. Item 3
above sort of solves the problem. but does not distinguish between
'this is an independent project at relative path x within a lump of
stuff you get from the scm' and 'this is only buildable as a module of
some other aggregating project.'

Do we really need to solve that? If so, we could add one more fact:
the g:a of the parent from which a build makes sense. Maven could then
chase up the parent tree to it.



On Fri, Jul 15, 2011 at 4:13 PM, Hervé BOUTEMY <he...@free.fr> wrote:
> Le vendredi 15 juillet 2011, John Casey a écrit :
>> On 7/14/11 6:41 PM, Hervé BOUTEMY wrote:
>> > we call it a URL, but it's a String in the POM [2]
>> > Nothing prevents another way of interpreting this String: say properties
>> > format?
>> > If we want to transform this String to a DOM object in the POM, with
>> > specific XML definition for each SCM, I only see the backward
>> > compatibility as a strong problem
>> >
>> > Whatever the format is, maven-scm-api should provide an API to derivate a
>> > module definition form its parent: AFAIK, this API doesn't exist, so
>> > there should be a Jira issue for this in SCM.
>> > Then Maven Core should use it when merging parent, instead of simply
>> > appending module name [3]: another Jira issue is needed in MNG (for 3.1
>> > for example)
>>
>> I like that idea of having some sort of merge/inheritance calculator
>> that's provider-specific.
> another idea that would perhaps be easier: modify scm urls to ensure adding
> path gives a viable url
> eg for git: scm:git:git://server_name[:port]/path_to_repository#path
>
> I don't really know if this works in every case (tagging, or branching)
> but this would permit us to keep the simple algorithm in Maven Core, and avoid
> scm dependency (api + detected provider)
>
> there si a complete design to define
>
> Regards,
>
> Hervé
>
>>
>> > And perhaps a proposal [4] to let us work on preparing this feature,
>> > making choices, pointing to the Jira issues?
>> >
>> > Regards,
>> >
>> > Hervé
>> >
>> > [2] http://maven.apache.org/ref/3.0.3/maven-model/maven.html#class_scm
>> >
>> > [3] http://maven.apache.org/ref/3.0.3/maven-model-
>> > builder/xref/org/apache/maven/model/merge/MavenModelMerger.html#438
>> >
>> > [4] https://cwiki.apache.org/confluence/display/MAVEN/Proposals
>> >
>> > Le jeudi 14 juillet 2011, John Casey a écrit :
>> >> The thing that's problematic here is that we're getting fairly deep down
>> >> the rabbit hole on these sub-languages...it'd be so much better if we
>> >> had a way to support a proper format for Git SCM information, rather
>> >> than embedding all that information in a really complex pseudo-URL.
>> >>
>> >> On 7/14/11 4:19 PM, Hervé BOUTEMY wrote:
>> >>> SCM url have mutiple parts when multiple parts mean something.
>> >>> As you speak about git, [1] shows how tech and push urls can be
>> >>> different for example
>> >>> The algorithm to automatically derivate SCM url of a sub-module from
>> >>> parent SCM should be provider dependendant, available from
>> >>> maven-scm-api. And Maven Core would be dependendant on this API and
>> >>> detected provider to calculate
>> >>>
>> >>> I remember of such a discussion a little while ago on this list, but I
>> >>> don't remember the conclusion at that time
>> >>>
>> >>> Regards,
>> >>>
>> >>> Hervé
>> >>>
>> >>> [1] http://maven.apache.org/scm/git.html
>> >>>
>> >>> Le jeudi 14 juillet 2011, Andreas Sewe a écrit :
>> >>>> Hi,
>> >>>>
>> >>>>> I'm not 100% sure it should be inherited at all. Inheriting unchanged
>> >>>>> is only valid for something like Git, but probably never for SVN.
>> >>>>> However, as you point out, Maven's current guess is usually not good
>> >>>>> enough either.
>> >>>>
>> >>>> the problem is really that Maven currently has only a single element
>> >>>> for something that requires two: one containing an absolute path to
>> >>>> the current project's SCM, and one containing the relative path used
>> >>>> to move from the aggregator's SCM to the child's.
>> >>>>
>> >>>> Just my $0.02.
>> >>>>
>> >>>> Andreas
>> >>>>
>> >>>> ---------------------------------------------------------------------
>> >>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> >>>> For additional commands, e-mail: dev-help@maven.apache.org
>> >>>
>> >>> ---------------------------------------------------------------------
>> >>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> >>> For additional commands, e-mail: dev-help@maven.apache.org
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> > For additional commands, e-mail: dev-help@maven.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

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


Re: SCM info and modules

Posted by Hervé BOUTEMY <he...@free.fr>.
Le vendredi 15 juillet 2011, John Casey a écrit :
> On 7/14/11 6:41 PM, Hervé BOUTEMY wrote:
> > we call it a URL, but it's a String in the POM [2]
> > Nothing prevents another way of interpreting this String: say properties
> > format?
> > If we want to transform this String to a DOM object in the POM, with
> > specific XML definition for each SCM, I only see the backward
> > compatibility as a strong problem
> > 
> > Whatever the format is, maven-scm-api should provide an API to derivate a
> > module definition form its parent: AFAIK, this API doesn't exist, so
> > there should be a Jira issue for this in SCM.
> > Then Maven Core should use it when merging parent, instead of simply
> > appending module name [3]: another Jira issue is needed in MNG (for 3.1
> > for example)
> 
> I like that idea of having some sort of merge/inheritance calculator
> that's provider-specific.
another idea that would perhaps be easier: modify scm urls to ensure adding 
path gives a viable url
eg for git: scm:git:git://server_name[:port]/path_to_repository#path

I don't really know if this works in every case (tagging, or branching)
but this would permit us to keep the simple algorithm in Maven Core, and avoid 
scm dependency (api + detected provider)

there si a complete design to define

Regards,

Hervé

> 
> > And perhaps a proposal [4] to let us work on preparing this feature,
> > making choices, pointing to the Jira issues?
> > 
> > Regards,
> > 
> > Hervé
> > 
> > [2] http://maven.apache.org/ref/3.0.3/maven-model/maven.html#class_scm
> > 
> > [3] http://maven.apache.org/ref/3.0.3/maven-model-
> > builder/xref/org/apache/maven/model/merge/MavenModelMerger.html#438
> > 
> > [4] https://cwiki.apache.org/confluence/display/MAVEN/Proposals
> > 
> > Le jeudi 14 juillet 2011, John Casey a écrit :
> >> The thing that's problematic here is that we're getting fairly deep down
> >> the rabbit hole on these sub-languages...it'd be so much better if we
> >> had a way to support a proper format for Git SCM information, rather
> >> than embedding all that information in a really complex pseudo-URL.
> >> 
> >> On 7/14/11 4:19 PM, Hervé BOUTEMY wrote:
> >>> SCM url have mutiple parts when multiple parts mean something.
> >>> As you speak about git, [1] shows how tech and push urls can be
> >>> different for example
> >>> The algorithm to automatically derivate SCM url of a sub-module from
> >>> parent SCM should be provider dependendant, available from
> >>> maven-scm-api. And Maven Core would be dependendant on this API and
> >>> detected provider to calculate
> >>> 
> >>> I remember of such a discussion a little while ago on this list, but I
> >>> don't remember the conclusion at that time
> >>> 
> >>> Regards,
> >>> 
> >>> Hervé
> >>> 
> >>> [1] http://maven.apache.org/scm/git.html
> >>> 
> >>> Le jeudi 14 juillet 2011, Andreas Sewe a écrit :
> >>>> Hi,
> >>>> 
> >>>>> I'm not 100% sure it should be inherited at all. Inheriting unchanged
> >>>>> is only valid for something like Git, but probably never for SVN.
> >>>>> However, as you point out, Maven's current guess is usually not good
> >>>>> enough either.
> >>>> 
> >>>> the problem is really that Maven currently has only a single element
> >>>> for something that requires two: one containing an absolute path to
> >>>> the current project's SCM, and one containing the relative path used
> >>>> to move from the aggregator's SCM to the child's.
> >>>> 
> >>>> Just my $0.02.
> >>>> 
> >>>> Andreas
> >>>> 
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> >>>> For additional commands, e-mail: dev-help@maven.apache.org
> >>> 
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> >>> For additional commands, e-mail: dev-help@maven.apache.org
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org


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


Re: SCM info and modules

Posted by John Casey <jd...@commonjava.org>.

On 7/14/11 6:41 PM, Hervé BOUTEMY wrote:
> we call it a URL, but it's a String in the POM [2]
> Nothing prevents another way of interpreting this String: say properties
> format?
> If we want to transform this String to a DOM object in the POM, with specific
> XML definition for each SCM, I only see the backward compatibility as a strong
> problem
>
> Whatever the format is, maven-scm-api should provide an API to derivate a
> module definition form its parent: AFAIK, this API doesn't exist, so there
> should be a Jira issue for this in SCM.
> Then Maven Core should use it when merging parent, instead of simply appending
> module name [3]: another Jira issue is needed in MNG (for 3.1 for example)

I like that idea of having some sort of merge/inheritance calculator 
that's provider-specific.

>
> And perhaps a proposal [4] to let us work on preparing this feature, making
> choices, pointing to the Jira issues?
>
> Regards,
>
> Hervé
>
> [2] http://maven.apache.org/ref/3.0.3/maven-model/maven.html#class_scm
>
> [3] http://maven.apache.org/ref/3.0.3/maven-model-
> builder/xref/org/apache/maven/model/merge/MavenModelMerger.html#438
>
> [4] https://cwiki.apache.org/confluence/display/MAVEN/Proposals
>
> Le jeudi 14 juillet 2011, John Casey a écrit :
>> The thing that's problematic here is that we're getting fairly deep down
>> the rabbit hole on these sub-languages...it'd be so much better if we
>> had a way to support a proper format for Git SCM information, rather
>> than embedding all that information in a really complex pseudo-URL.
>>
>> On 7/14/11 4:19 PM, Hervé BOUTEMY wrote:
>>> SCM url have mutiple parts when multiple parts mean something.
>>> As you speak about git, [1] shows how tech and push urls can be different
>>> for example
>>> The algorithm to automatically derivate SCM url of a sub-module from
>>> parent SCM should be provider dependendant, available from
>>> maven-scm-api. And Maven Core would be dependendant on this API and
>>> detected provider to calculate
>>>
>>> I remember of such a discussion a little while ago on this list, but I
>>> don't remember the conclusion at that time
>>>
>>> Regards,
>>>
>>> Hervé
>>>
>>> [1] http://maven.apache.org/scm/git.html
>>>
>>> Le jeudi 14 juillet 2011, Andreas Sewe a écrit :
>>>> Hi,
>>>>
>>>>> I'm not 100% sure it should be inherited at all. Inheriting unchanged
>>>>> is only valid for something like Git, but probably never for SVN.
>>>>> However, as you point out, Maven's current guess is usually not good
>>>>> enough either.
>>>>
>>>> the problem is really that Maven currently has only a single element for
>>>> something that requires two: one containing an absolute path to the
>>>> current project's SCM, and one containing the relative path used to move
>>>> from the aggregator's SCM to the child's.
>>>>
>>>> Just my $0.02.
>>>>
>>>> Andreas
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: dev-help@maven.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>

-- 
John Casey
Developer, PMC Member - Apache Maven (http://maven.apache.org)
Blog: http://www.johnofalltrades.name/

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


Re: SCM info and modules

Posted by Hervé BOUTEMY <he...@free.fr>.
we call it a URL, but it's a String in the POM [2]
Nothing prevents another way of interpreting this String: say properties 
format?
If we want to transform this String to a DOM object in the POM, with specific 
XML definition for each SCM, I only see the backward compatibility as a strong 
problem

Whatever the format is, maven-scm-api should provide an API to derivate a 
module definition form its parent: AFAIK, this API doesn't exist, so there 
should be a Jira issue for this in SCM.
Then Maven Core should use it when merging parent, instead of simply appending 
module name [3]: another Jira issue is needed in MNG (for 3.1 for example)

And perhaps a proposal [4] to let us work on preparing this feature, making 
choices, pointing to the Jira issues?

Regards,

Hervé

[2] http://maven.apache.org/ref/3.0.3/maven-model/maven.html#class_scm

[3] http://maven.apache.org/ref/3.0.3/maven-model-
builder/xref/org/apache/maven/model/merge/MavenModelMerger.html#438

[4] https://cwiki.apache.org/confluence/display/MAVEN/Proposals

Le jeudi 14 juillet 2011, John Casey a écrit :
> The thing that's problematic here is that we're getting fairly deep down
> the rabbit hole on these sub-languages...it'd be so much better if we
> had a way to support a proper format for Git SCM information, rather
> than embedding all that information in a really complex pseudo-URL.
> 
> On 7/14/11 4:19 PM, Hervé BOUTEMY wrote:
> > SCM url have mutiple parts when multiple parts mean something.
> > As you speak about git, [1] shows how tech and push urls can be different
> > for example
> > The algorithm to automatically derivate SCM url of a sub-module from
> > parent SCM should be provider dependendant, available from
> > maven-scm-api. And Maven Core would be dependendant on this API and
> > detected provider to calculate
> > 
> > I remember of such a discussion a little while ago on this list, but I
> > don't remember the conclusion at that time
> > 
> > Regards,
> > 
> > Hervé
> > 
> > [1] http://maven.apache.org/scm/git.html
> > 
> > Le jeudi 14 juillet 2011, Andreas Sewe a écrit :
> >> Hi,
> >> 
> >>> I'm not 100% sure it should be inherited at all. Inheriting unchanged
> >>> is only valid for something like Git, but probably never for SVN.
> >>> However, as you point out, Maven's current guess is usually not good
> >>> enough either.
> >> 
> >> the problem is really that Maven currently has only a single element for
> >> something that requires two: one containing an absolute path to the
> >> current project's SCM, and one containing the relative path used to move
> >> from the aggregator's SCM to the child's.
> >> 
> >> Just my $0.02.
> >> 
> >> Andreas
> >> 
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: dev-help@maven.apache.org
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org


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


Re: SCM info and modules

Posted by John Casey <jd...@commonjava.org>.
The thing that's problematic here is that we're getting fairly deep down 
the rabbit hole on these sub-languages...it'd be so much better if we 
had a way to support a proper format for Git SCM information, rather 
than embedding all that information in a really complex pseudo-URL.

On 7/14/11 4:19 PM, Hervé BOUTEMY wrote:
> SCM url have mutiple parts when multiple parts mean something.
> As you speak about git, [1] shows how tech and push urls can be different for
> example
> The algorithm to automatically derivate SCM url of a sub-module from parent
> SCM should be provider dependendant, available from maven-scm-api.
> And Maven Core would be dependendant on this API and detected provider to
> calculate
>
> I remember of such a discussion a little while ago on this list, but I don't
> remember the conclusion at that time
>
> Regards,
>
> Hervé
>
> [1] http://maven.apache.org/scm/git.html
>
> Le jeudi 14 juillet 2011, Andreas Sewe a écrit :
>> Hi,
>>
>>> I'm not 100% sure it should be inherited at all. Inheriting unchanged is
>>> only valid for something like Git, but probably never for SVN. However,
>>> as you point out, Maven's current guess is usually not good enough
>>> either.
>>
>> the problem is really that Maven currently has only a single element for
>> something that requires two: one containing an absolute path to the
>> current project's SCM, and one containing the relative path used to move
>> from the aggregator's SCM to the child's.
>>
>> Just my $0.02.
>>
>> Andreas
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>

-- 
John Casey
Developer, PMC Member - Apache Maven (http://maven.apache.org)
Blog: http://www.johnofalltrades.name/

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


Re: SCM info and modules

Posted by Hervé BOUTEMY <he...@free.fr>.
SCM url have mutiple parts when multiple parts mean something.
As you speak about git, [1] shows how tech and push urls can be different for 
example
The algorithm to automatically derivate SCM url of a sub-module from parent 
SCM should be provider dependendant, available from maven-scm-api.
And Maven Core would be dependendant on this API and detected provider to 
calculate

I remember of such a discussion a little while ago on this list, but I don't 
remember the conclusion at that time

Regards,

Hervé

[1] http://maven.apache.org/scm/git.html

Le jeudi 14 juillet 2011, Andreas Sewe a écrit :
> Hi,
> 
> > I'm not 100% sure it should be inherited at all. Inheriting unchanged is
> > only valid for something like Git, but probably never for SVN. However,
> > as you point out, Maven's current guess is usually not good enough
> > either.
> 
> the problem is really that Maven currently has only a single element for
> something that requires two: one containing an absolute path to the
> current project's SCM, and one containing the relative path used to move
> from the aggregator's SCM to the child's.
> 
> Just my $0.02.
> 
> Andreas
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org


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


Re: SCM info and modules

Posted by John Casey <jd...@commonjava.org>.
good point

On 7/14/11 11:49 AM, Andreas Sewe wrote:
> Hi,
>
>> I'm not 100% sure it should be inherited at all. Inheriting unchanged is
>> only valid for something like Git, but probably never for SVN. However,
>> as you point out, Maven's current guess is usually not good enough
>> either.
>
> the problem is really that Maven currently has only a single element for
> something that requires two: one containing an absolute path to the
> current project's SCM, and one containing the relative path used to move
> from the aggregator's SCM to the child's.
>
> Just my $0.02.
>
> Andreas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>

-- 
John Casey
Developer, PMC Member - Apache Maven (http://maven.apache.org)
Blog: http://www.johnofalltrades.name/

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


Re: SCM info and modules

Posted by Andreas Sewe <se...@st.informatik.tu-darmstadt.de>.
Hi,

> I'm not 100% sure it should be inherited at all. Inheriting unchanged is
> only valid for something like Git, but probably never for SVN. However,
> as you point out, Maven's current guess is usually not good enough either.

the problem is really that Maven currently has only a single element for 
something that requires two: one containing an absolute path to the 
current project's SCM, and one containing the relative path used to move 
from the aggregator's SCM to the child's.

Just my $0.02.

Andreas

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


Re: SCM info and modules

Posted by John Casey <jd...@commonjava.org>.
My point is that if I pull down one of the AS module POMs from the 
repository, and it has a SCM element, those locations should give me 
enough information to checkout that module from SCM and build it.


On 7/14/11 11:20 AM, Paul Gier wrote:
> Just to clarify, I see your point that inheriting from a generic parent
> pom doesn't really make sense.  However, in these cases I sort of have
> the expectation that I will have to set it for each new project.  The
> part that bothers me is having to reset it to the same value for each
> module of a large multi-module project.  For now, I'm getting around
> this by just using my own properties instead of the main scm fields.
>
> On 07/14/2011 10:13 AM, Paul Gier wrote:
>> I think inheriting it unchanged is fine for most multi-module projects,
>> even using SVN.  Thinking in terms of the JBoss AS build, releases
>> always happen from the root path of the project, and the URL I would
>> want to put into module jar manifests for example would also be the root
>> URL of the project.
>>
>> On 07/14/2011 10:03 AM, John Casey wrote:
>>> I'm not 100% sure it should be inherited at all. Inheriting unchanged is
>>> only valid for something like Git, but probably never for SVN. However,
>>> as you point out, Maven's current guess is usually not good enough either.
>>>
>>> I'm not sure Maven can reliably fill in an intelligent value for SCM
>>> information, if it's missing from a POM. That leaves a pretty tedious
>>> state of affairs, though.
>>>
>>> On 7/14/11 10:57 AM, Paul Gier wrote:
>>>> Hi Everyone,
>>>>
>>>> The current behaviour of Maven for a multi-module project is that the
>>>> module path will automatically be appended to the end of the scm fields
>>>> (connection, url, etc).  This has always seemed like a bug to me since
>>>> it not what you would want for a real multi-module project.  The only
>>>> case where it is correct is when you have a bunch of small loosely
>>>> connected projects (like Maven plugins) and you are using svn.
>>>>
>>>> For a multi-module project using git, this is really annoying because
>>>> now I have to set the scm URL for each module separately if I want them
>>>> to contain a working URL.  Am I missing some simple configuration?  Or
>>>> should we fix this maybe in Maven 3.1 to just inherit the scm
>>>> information unmodified instead of trying to be smart about adding module
>>>> paths?
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>>
>>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>

-- 
John Casey
Developer, PMC Member - Apache Maven (http://maven.apache.org)
Blog: http://www.johnofalltrades.name/

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


Re: SCM info and modules

Posted by Paul Gier <pg...@redhat.com>.
Just to clarify, I see your point that inheriting from a generic parent
pom doesn't really make sense.  However, in these cases I sort of have
the expectation that I will have to set it for each new project.  The
part that bothers me is having to reset it to the same value for each
module of a large multi-module project.  For now, I'm getting around
this by just using my own properties instead of the main scm fields.

On 07/14/2011 10:13 AM, Paul Gier wrote:
> I think inheriting it unchanged is fine for most multi-module projects,
> even using SVN.  Thinking in terms of the JBoss AS build, releases
> always happen from the root path of the project, and the URL I would
> want to put into module jar manifests for example would also be the root
> URL of the project.
> 
> On 07/14/2011 10:03 AM, John Casey wrote:
>> I'm not 100% sure it should be inherited at all. Inheriting unchanged is
>> only valid for something like Git, but probably never for SVN. However,
>> as you point out, Maven's current guess is usually not good enough either.
>>
>> I'm not sure Maven can reliably fill in an intelligent value for SCM
>> information, if it's missing from a POM. That leaves a pretty tedious
>> state of affairs, though.
>>
>> On 7/14/11 10:57 AM, Paul Gier wrote:
>>> Hi Everyone,
>>>
>>> The current behaviour of Maven for a multi-module project is that the
>>> module path will automatically be appended to the end of the scm fields
>>> (connection, url, etc).  This has always seemed like a bug to me since
>>> it not what you would want for a real multi-module project.  The only
>>> case where it is correct is when you have a bunch of small loosely
>>> connected projects (like Maven plugins) and you are using svn.
>>>
>>> For a multi-module project using git, this is really annoying because
>>> now I have to set the scm URL for each module separately if I want them
>>> to contain a working URL.  Am I missing some simple configuration?  Or
>>> should we fix this maybe in Maven 3.1 to just inherit the scm
>>> information unmodified instead of trying to be smart about adding module
>>> paths?
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>
>>
> 


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


Re: SCM info and modules

Posted by Paul Gier <pg...@redhat.com>.
I think inheriting it unchanged is fine for most multi-module projects,
even using SVN.  Thinking in terms of the JBoss AS build, releases
always happen from the root path of the project, and the URL I would
want to put into module jar manifests for example would also be the root
URL of the project.

On 07/14/2011 10:03 AM, John Casey wrote:
> I'm not 100% sure it should be inherited at all. Inheriting unchanged is
> only valid for something like Git, but probably never for SVN. However,
> as you point out, Maven's current guess is usually not good enough either.
> 
> I'm not sure Maven can reliably fill in an intelligent value for SCM
> information, if it's missing from a POM. That leaves a pretty tedious
> state of affairs, though.
> 
> On 7/14/11 10:57 AM, Paul Gier wrote:
>> Hi Everyone,
>>
>> The current behaviour of Maven for a multi-module project is that the
>> module path will automatically be appended to the end of the scm fields
>> (connection, url, etc).  This has always seemed like a bug to me since
>> it not what you would want for a real multi-module project.  The only
>> case where it is correct is when you have a bunch of small loosely
>> connected projects (like Maven plugins) and you are using svn.
>>
>> For a multi-module project using git, this is really annoying because
>> now I have to set the scm URL for each module separately if I want them
>> to contain a working URL.  Am I missing some simple configuration?  Or
>> should we fix this maybe in Maven 3.1 to just inherit the scm
>> information unmodified instead of trying to be smart about adding module
>> paths?
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
> 


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


Re: SCM info and modules

Posted by John Casey <jd...@commonjava.org>.
I'm not 100% sure it should be inherited at all. Inheriting unchanged is 
only valid for something like Git, but probably never for SVN. However, 
as you point out, Maven's current guess is usually not good enough either.

I'm not sure Maven can reliably fill in an intelligent value for SCM 
information, if it's missing from a POM. That leaves a pretty tedious 
state of affairs, though.

On 7/14/11 10:57 AM, Paul Gier wrote:
> Hi Everyone,
>
> The current behaviour of Maven for a multi-module project is that the
> module path will automatically be appended to the end of the scm fields
> (connection, url, etc).  This has always seemed like a bug to me since
> it not what you would want for a real multi-module project.  The only
> case where it is correct is when you have a bunch of small loosely
> connected projects (like Maven plugins) and you are using svn.
>
> For a multi-module project using git, this is really annoying because
> now I have to set the scm URL for each module separately if I want them
> to contain a working URL.  Am I missing some simple configuration?  Or
> should we fix this maybe in Maven 3.1 to just inherit the scm
> information unmodified instead of trying to be smart about adding module
> paths?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>

-- 
John Casey
Developer, PMC Member - Apache Maven (http://maven.apache.org)
Blog: http://www.johnofalltrades.name/

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