You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Howard Lewis Ship <hl...@gmail.com> on 2006/05/05 18:18:57 UTC

Parent Pom: Needs some "do as I say, not as I do"

I think there needs to be some additional POM elements that allows a
parent POM to provide defaults to a child POM that are different from
the values used by the parent POM itself.

Here's an example:

In my parent POM, I want to say

<url>http://tapestry.apache.org/tapestry5/</url>

But I want all my child modules to use the URL:

<url>http://tapestry.apache.org/tapestry5/${pom.artifactId}</url>


I could see this expressed, in my parent pom, as something like:

<project> ...
  <url>http://tapestry.apache.org/tapestry5/</url>

  ...

  <childDefaults>
    <url>http://tapestry.apache.org/tapestry5/${pom.artifactId}</url>
  </childDefaults>

  ...
--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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


Re: Parent Pom: Needs some "do as I say, not as I do"

Posted by Kenney Westerhof <ke...@apache.org>.
On Sat, 6 May 2006, Torsten Curdt wrote:

There's logic behind that.. project URL and scm URL's are indeed
modified in the children, but that's necessary. If they didn't you'd get
collisions, i.e. 2 module's sites overwriting each others html files,
or 2 modules sources being overwritten in a repository.

I think these are sensible defaults that can be overridden. But the urls
mentioned above MUST be different for modules, so just inheriting by
default will produce problems. Everything that doesn't have to be
different is 'straightly inherited'.

-- Kenney

> > Isn't this behaviour the default anyway? Appending the module's artifactId
> > to the parent's url?
>
> AFAIU it currently depends on the semantics of the tag whether
> there is straight inheritance or not ...which is IMO not very consistent
>
> cheers
> --
> Torsten
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

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


Re: Parent Pom: Needs some "do as I say, not as I do"

Posted by Torsten Curdt <tc...@apache.org>.
> Isn't this behaviour the default anyway? Appending the module's artifactId
> to the parent's url?

AFAIU it currently depends on the semantics of the tag whether
there is straight inheritance or not ...which is IMO not very consistent

cheers
--
Torsten

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


Re: Parent Pom: Needs some "do as I say, not as I do"

Posted by Kenney Westerhof <ke...@apache.org>.
On Sat, 6 May 2006, Brett Porter wrote:

Isn't this behaviour the default anyway? Appending the module's artifactId
to the parent's url?

-- Kenney

> I think this would be a worthwhile addition to JIRA. I'm not sure if
> it's already in there. I know it was pointed out as an issue a while
> ago and we were going to look at changing the behaviour from automatic
> append to controlled appending by expressions like you've highlighted
> in a future version of the POM.
>
> Would you mind filing it?
>
> - Brett
>
> On 5/6/06, Howard Lewis Ship <hl...@gmail.com> wrote:
> > I think there needs to be some additional POM elements that allows a
> > parent POM to provide defaults to a child POM that are different from
> > the values used by the parent POM itself.
> >
> > Here's an example:
> >
> > In my parent POM, I want to say
> >
> > <url>http://tapestry.apache.org/tapestry5/</url>
> >
> > But I want all my child modules to use the URL:
> >
> > <url>http://tapestry.apache.org/tapestry5/${pom.artifactId}</url>
> >
> >
> > I could see this expressed, in my parent pom, as something like:
> >
> > <project> ...
> >   <url>http://tapestry.apache.org/tapestry5/</url>
> >
> >   ...
> >
> >   <childDefaults>
> >     <url>http://tapestry.apache.org/tapestry5/${pom.artifactId}</url>
> >   </childDefaults>
> >
> >   ...
> > --
> > Howard M. Lewis Ship
> > Independent J2EE / Open-Source Java Consultant
> > Creator and PMC Chair, Apache Tapestry
> > Creator, Jakarta HiveMind
> >
> > Professional Tapestry training, mentoring, support
> > and project work.  http://howardlewisship.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

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


Re: Parent Pom: Needs some "do as I say, not as I do"

Posted by Brett Porter <br...@gmail.com>.
I think this would be a worthwhile addition to JIRA. I'm not sure if
it's already in there. I know it was pointed out as an issue a while
ago and we were going to look at changing the behaviour from automatic
append to controlled appending by expressions like you've highlighted
in a future version of the POM.

Would you mind filing it?

- Brett

On 5/6/06, Howard Lewis Ship <hl...@gmail.com> wrote:
> I think there needs to be some additional POM elements that allows a
> parent POM to provide defaults to a child POM that are different from
> the values used by the parent POM itself.
>
> Here's an example:
>
> In my parent POM, I want to say
>
> <url>http://tapestry.apache.org/tapestry5/</url>
>
> But I want all my child modules to use the URL:
>
> <url>http://tapestry.apache.org/tapestry5/${pom.artifactId}</url>
>
>
> I could see this expressed, in my parent pom, as something like:
>
> <project> ...
>   <url>http://tapestry.apache.org/tapestry5/</url>
>
>   ...
>
>   <childDefaults>
>     <url>http://tapestry.apache.org/tapestry5/${pom.artifactId}</url>
>   </childDefaults>
>
>   ...
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator and PMC Chair, Apache Tapestry
> Creator, Jakarta HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Re: Parent Pom: Needs some "do as I say, not as I do"

Posted by Torsten Curdt <tc...@apache.org>.
On 5/6/06, Lee Meador <le...@leemeador.com> wrote:
> On some things that happens automatically. The child's additional path
> element gets added to the default from the parent.
>
> I do not remember which do it and which dont. One that seems to do it is the
> scm url. Another is the deployment url.

Hm... sounds like this could need some consitency
--
Torsten

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


Re: Parent Pom: Needs some "do as I say, not as I do"

Posted by Lee Meador <le...@leemeador.com>.
On some things that happens automatically. The child's additional path
element gets added to the default from the parent.

I do not remember which do it and which dont. One that seems to do it is the
scm url. Another is the deployment url.

-- Lee Meador

On 5/5/06, Howard Lewis Ship <hl...@gmail.com> wrote:
>
> I think there needs to be some additional POM elements that allows a
> parent POM to provide defaults to a child POM that are different from
> the values used by the parent POM itself.
>
> Here's an example:
>
> In my parent POM, I want to say
>
> <url>http://tapestry.apache.org/tapestry5/</url>
>
> But I want all my child modules to use the URL:
>
> <url>http://tapestry.apache.org/tapestry5/${pom.artifactId}</url>
>
>
> I could see this expressed, in my parent pom, as something like:
>
> <project> ...
>   <url>http://tapestry.apache.org/tapestry5/</url>
>
>   ...
>
>   <childDefaults>
>     <url>http://tapestry.apache.org/tapestry5/${pom.artifactId}</url>
>   </childDefaults>
>
>   ...
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator and PMC Chair, Apache Tapestry
> Creator, Jakarta HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


--
-- Lee Meador
Sent from gmail. My real email address is lee@leemeador.com