You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Prasad Kashyap <go...@gmail.com> on 2006/03/17 19:32:24 UTC

Restructuring top level pom.xml

Our top level pom.xml lists all the modules that M2 must traverse to
build them individually. We currently have around 40 modules specified
in the list. We'll soon add some more and then move on to adding 53
configs, 16 applications, 7 plugins and some 6 assemblies (give or
take a few more).

This will make our top level pom.xml a huge big list. Are we sure we
want to keep it structured this way ?

What say we have add pom.xmls in the intermediate directories like
modules, config, applications, assemblies, plugins etc. These would go
forth and build the directories under them. This would kep our top
level pom.xml easy to read. This would also mirror the tree structure
that we currently have.

Cheers
Prasad

Re: Restructuring top level pom.xml

Posted by Jason Dillon <ja...@planet57.com>.
>  Maybe the members of the children POMs' group ids could be named:
>
>  org.apache.geronimo.applications
>  org.apache.geronimo.modules

That seems very reasonable to me.

--jason

Re: Restructuring top level pom.xml

Posted by "Alan D. Cabrera" <li...@toolazydogs.com>.
David Blevins wrote:
>
> On Mar 17, 2006, at 2:18 PM, Alan D. Cabrera wrote:
>
>> Jacek Laskowski wrote:
>>> 2006/3/17, Prasad Kashyap <go...@gmail.com>:
>>>> This will make our top level pom.xml a huge big list. Are we sure 
>>>> we want to keep it structured this way ?
>>> Hi Prasad, It looks that we're quickly approaching Dave's idea when 
>>> he had envisioned the modules listed in one place would require a 
>>> lot of effort to maintain. I personally don't think we have since 
>>> lost the time as I couldn't see it the first time while having read 
>>> Dave's email. Now, we're finally more experienced to get the gist of 
>>> what he was saying ;) I'm for changing the parent pom to include 
>>> only a few modules with a few more submodules rather than keeping 
>>> them all in it. If it doesn't work we can always restructure it 
>>> again ;) Any comments before the change appears?
>>
>> Maybe the members of the children POMs' group ids could be named:
>>
>> org.apache.geronimo.applications
>> org.apache.geronimo.modules
>>
>> Etc.
>>
>
> Would you then move all the code inside to the same package, as in 
> org.apache.geronimo.modules.kernel or 
> org.apache.geronimo.applications.daytrader?
>
> -David
>
>
I don't think that this is necessary but, it could be handy. 


Regards,
Alan



Re: Restructuring top level pom.xml

Posted by Prasad Kashyap <go...@gmail.com>.
Opened JIRA to track this work.
http://issues.apache.org/jira/browse/GERONIMO-1755

Problem:
If we want to set ${geronimoVersion} at the top level pom and  don't
worry about changing it for every release, we have to do a 'mvn -N'
for every pom.xml whose packaging is set to "pom". Currently that
would be like 6 pom.xmls for the 6 top level dirs.

If we want to do a top level build with 1 single 'mvn' command, then
we cannot use ${geronimoVersion} while declaring the project's and
parent's version. We will have to explicitly define the version. That
would mean changing every single pom.xml every time the release
changes.

Setting the version in -D doesn't work either.

Cheers
Prasad




On 3/18/06, Alan D. Cabrera <li...@toolazydogs.com> wrote:
>  Jason Dillon wrote:
>
>  Would you then move all the code inside to the same package, as in
> org.apache.geronimo.modules.kernel or
> org.apache.geronimo.applications.daytrader?
>
>  Package names do not need to relate directly to Maven groupIds.
> Especially not for intermediate grouping modules, that do not directly
> relate to code anyways.
>
> I do not recommend that package names be altered at this time. Once
> maven2 conversion is finished and it is time to rethink the general
> structure, it might be a good idea to try and sync up package names.
>
> I don't think that we ever want to have a
> org.apache.geronimo.modules.kernel... but perhaps a
> org.apache.geronimo.applications.daytrader.
>
>
>  Good point.
>
>
>  Regards,
>  Alan
>
>
>

Re: Restructuring top level pom.xml

Posted by "Alan D. Cabrera" <li...@toolazydogs.com>.
Jason Dillon wrote:
>> Would you then move all the code inside to the same package, as in
>> org.apache.geronimo.modules.kernel or
>> org.apache.geronimo.applications.daytrader?
>>     
>
> Package names do not need to relate directly to Maven groupIds. 
> Especially not for intermediate grouping modules, that do not directly
> relate to code anyways.
>
> I do not recommend that package names be altered at this time.  Once
> maven2 conversion is finished and it is time to rethink the general
> structure, it might be a good idea  to try and sync up package names.
>
> I don't think that we ever want to have a
> org.apache.geronimo.modules.kernel... but perhaps a
> org.apache.geronimo.applications.daytrader.
>   

Good point.


Regards,
Alan



Re: Restructuring top level pom.xml

Posted by Jason Dillon <ja...@planet57.com>.
> Would you then move all the code inside to the same package, as in
> org.apache.geronimo.modules.kernel or
> org.apache.geronimo.applications.daytrader?

Package names do not need to relate directly to Maven groupIds. 
Especially not for intermediate grouping modules, that do not directly
relate to code anyways.

I do not recommend that package names be altered at this time.  Once
maven2 conversion is finished and it is time to rethink the general
structure, it might be a good idea  to try and sync up package names.

I don't think that we ever want to have a
org.apache.geronimo.modules.kernel... but perhaps a
org.apache.geronimo.applications.daytrader.

--jason

Re: Restructuring top level pom.xml

Posted by David Blevins <da...@visi.com>.
On Mar 17, 2006, at 2:18 PM, Alan D. Cabrera wrote:

> Jacek Laskowski wrote:
>> 2006/3/17, Prasad Kashyap <go...@gmail.com>:
>>> This will make our top level pom.xml a huge big list. Are we sure  
>>> we want to keep it structured this way ?
>> Hi Prasad, It looks that we're quickly approaching Dave's idea  
>> when he had envisioned the modules listed in one place would  
>> require a lot of effort to maintain. I personally don't think we  
>> have since lost the time as I couldn't see it the first time while  
>> having read Dave's email. Now, we're finally more experienced to  
>> get the gist of what he was saying ;) I'm for changing the parent  
>> pom to include only a few modules with a few more submodules  
>> rather than keeping them all in it. If it doesn't work we can  
>> always restructure it again ;) Any comments before the change  
>> appears?
>
> Maybe the members of the children POMs' group ids could be named:
>
> org.apache.geronimo.applications
> org.apache.geronimo.modules
>
> Etc.
>

Would you then move all the code inside to the same package, as in  
org.apache.geronimo.modules.kernel or  
org.apache.geronimo.applications.daytrader?

-David



Re: Restructuring top level pom.xml

Posted by "Alan D. Cabrera" <li...@toolazydogs.com>.
Jacek Laskowski wrote:
> 2006/3/17, Prasad Kashyap <go...@gmail.com>:
>
>   
>> This will make our top level pom.xml a huge big list. Are we sure we
>> want to keep it structured this way ?
>>     
>
> Hi Prasad,
>
> It looks that we're quickly approaching Dave's idea when he had
> envisioned the modules listed in one place would require a lot of
> effort to maintain. I personally don't think we have since lost the
> time as I couldn't see it the first time while having read Dave's
> email. Now, we're finally more experienced to get the gist of what he
> was saying ;) I'm for changing the parent pom to include only a few
> modules with a few more submodules rather than keeping them all in it.
> If it doesn't work we can always restructure it again ;)
>
> Any comments before the change appears?
>
>   

Maybe the members of the children POMs' group ids could be named:

org.apache.geronimo.applications
org.apache.geronimo.modules


Etc.


Regards,
Alan



Re: Restructuring top level pom.xml

Posted by Jacek Laskowski <el...@gmail.com>.
2006/3/17, Prasad Kashyap <go...@gmail.com>:

> This will make our top level pom.xml a huge big list. Are we sure we
> want to keep it structured this way ?

Hi Prasad,

It looks that we're quickly approaching Dave's idea when he had
envisioned the modules listed in one place would require a lot of
effort to maintain. I personally don't think we have since lost the
time as I couldn't see it the first time while having read Dave's
email. Now, we're finally more experienced to get the gist of what he
was saying ;) I'm for changing the parent pom to include only a few
modules with a few more submodules rather than keeping them all in it.
If it doesn't work we can always restructure it again ;)

Any comments before the change appears?

I think the another issue that's quickly coming to the surface is the
top-level resources that don't belong to any of submodules, i.e. etc
and xdocs directories as well as *.txt files. Although xdocs should
migrate to its own module, the rest will likely disappear since
they're mostly for M1 purposes.

> Prasad

Jacek

--
Jacek Laskowski
http://www.laskowski.org.pl

Re: Restructuring top level pom.xml

Posted by Jason Dillon <ja...@planet57.com>.
pom.xmls in the intermediate directories would be good IMO. 

--jason


-----Original Message-----
From: "Prasad Kashyap" <go...@gmail.com>
Date: Fri, 17 Mar 2006 13:32:24 
To:dev@geronimo.apache.org
Subject: Restructuring top level pom.xml

Our top level pom.xml lists all the modules that M2 must traverse to
build them individually. We currently have around 40 modules specified
in the list. We'll soon add some more and then move on to adding 53
configs, 16 applications, 7 plugins and some 6 assemblies (give or
take a few more).

This will make our top level pom.xml a huge big list. Are we sure we
want to keep it structured this way ?

What say we have add pom.xmls in the intermediate directories like
modules, config, applications, assemblies, plugins etc. These would go
forth and build the directories under them. This would kep our top
level pom.xml easy to read. This would also mirror the tree structure
that we currently have.

Cheers
Prasad

Re: Restructuring top level pom.xml

Posted by Jacek Laskowski <el...@gmail.com>.
2006/3/17, David Blevins <da...@visi.com>:

> Here are my thoughts on the subject:
>
> http://www.mail-archive.com/dev@geronimo.apache.org/msg18122.html

I still keep it in my archive as I couldn't fully get the gist of it
the first time. It seems we're growing up ;)

> -David

Jacek

--
Jacek Laskowski
http://www.laskowski.org.pl

Re: Restructuring top level pom.xml

Posted by Jason Dillon <ja...@planet57.com>.
Agreed, but that is easy enough to overcome with a few well placed properties.

--jason


On 3/17/06, David Blevins <da...@visi.com> wrote:
>
> On Mar 17, 2006, at 1:44 PM, Jason Dillon wrote:
>
> >> Really ? When I first cut my teeth with m2 working on itests, I
> >> remember something like having to make the artifactid and directory
> >> same. But if that is not the case, then great ! We can/should go
> >> ahead
> >> and create intermediate pom.xmls for the existing dir structure.
> >
> > They do not need to be the same.
>
> They don't have to be the same, but maven assumes they are.  If you
> deviate from that you have to do things like put a full scmUrl in
> every pom because it can't be "inherited" correctly.  Without an
> valid scmUrl (among other things ) you can't hook an m2 project into
> Continuum.
>
> Not a requirement, but I certainly don't want to be the one updating
> scmUrls in 70 different poms each time we branch or tag :)
>
> -David
>
> > I do think that is is probably a good idea if they are the same, just
> > so you know where to find the module that build some jar, but in some
> > cases, with really nested structures it becomes more unmanageable to
> > keep the directory name and the artifactId the same.
> >
> > --jason
> >
>
>

Re: Restructuring top level pom.xml

Posted by David Blevins <da...@visi.com>.
On Mar 17, 2006, at 1:44 PM, Jason Dillon wrote:

>> Really ? When I first cut my teeth with m2 working on itests, I
>> remember something like having to make the artifactid and directory
>> same. But if that is not the case, then great ! We can/should go  
>> ahead
>> and create intermediate pom.xmls for the existing dir structure.
>
> They do not need to be the same.

They don't have to be the same, but maven assumes they are.  If you  
deviate from that you have to do things like put a full scmUrl in  
every pom because it can't be "inherited" correctly.  Without an  
valid scmUrl (among other things ) you can't hook an m2 project into  
Continuum.

Not a requirement, but I certainly don't want to be the one updating  
scmUrls in 70 different poms each time we branch or tag :)

-David

> I do think that is is probably a good idea if they are the same, just
> so you know where to find the module that build some jar, but in some
> cases, with really nested structures it becomes more unmanageable to
> keep the directory name and the artifactId the same.
>
> --jason
>


Re: Restructuring top level pom.xml

Posted by Jason Dillon <ja...@planet57.com>.
> Really ? When I first cut my teeth with m2 working on itests, I
> remember something like having to make the artifactid and directory
> same. But if that is not the case, then great ! We can/should go ahead
> and create intermediate pom.xmls for the existing dir structure.

They do not need to be the same.

I do think that is is probably a good idea if they are the same, just
so you know where to find the module that build some jar, but in some
cases, with really nested structures it becomes more unmanageable to
keep the directory name and the artifactId the same.

--jason

Re: Restructuring top level pom.xml

Posted by Prasad Kashyap <go...@gmail.com>.
On 3/17/06, Jason Dillon <ja...@planet57.com> wrote:
> IMO #2 is a nice to have... But is certainly not required to add intermediate poms to group modules.
>

Really ? When I first cut my teeth with m2 working on itests, I
remember something like having to make the artifactid and directory
same. But if that is not the case, then great ! We can/should go ahead
and create intermediate pom.xmls for the existing dir structure.

> Once maven2ization is done, then I imagine than the entire project structure should be reevaluated and ultimatly changed.

Agree. We can look at changing the dir names then to keep it same as
artifactids.

>
> --jason

Cheers
Prasad

Re: Restructuring top level pom.xml

Posted by Jason Dillon <ja...@planet57.com>.
IMO #2 is a nice to have... But is certainly not required to add intermediate poms to group modules. 

Once maven2ization is done, then I imagine than the entire project structure should be reevaluated and ultimatly changed. 

--jason


-----Original Message-----
From: "Prasad Kashyap" <go...@gmail.com>
Date: Fri, 17 Mar 2006 15:36:18 
To:dev@geronimo.apache.org
Subject: Re: Restructuring top level pom.xml

Thank you David.

----- You wrote ----
This means two things:

1. there needs to be modules/pom.xml which is the parent of everything
in modules. Same goes for the other dirs, configs, assemblies, etc.
The parent pom of modules/pom.xml would be the root pom.xml (if we
want a root pom).

2. each child project must use it's artifactId as it's directory name.
So 'kernel' becomes 'geronimo-kernel', etc.
-----------------------------

Yep, this is what I was talking about. So I guess we'll have to wait
till we are completely done with migrating to Maven2 before we do #2
above. That would be the safest thing to do given the ongoing maven 1
builds.

Cheers
Prasad

On 3/17/06, David Blevins <da...@visi.com> wrote:
> On Mar 17, 2006, at 10:32 AM, Prasad Kashyap wrote:
>
> > Our top level pom.xml lists all the modules that M2 must traverse to
> > build them individually. We currently have around 40 modules specified
> > in the list. We'll soon add some more and then move on to adding 53
> > configs, 16 applications, 7 plugins and some 6 assemblies (give or
> > take a few more).
> >
> > This will make our top level pom.xml a huge big list. Are we sure we
> > want to keep it structured this way ?
> >
> > What say we have add pom.xmls in the intermediate directories like
> > modules, config, applications, assemblies, plugins etc. These would go
> > forth and build the directories under them. This would kep our top
> > level pom.xml easy to read. This would also mirror the tree structure
> > that we currently have.
> >
>
> Here are my thoughts on the subject:
>
> http://www.mail-archive.com/dev@geronimo.apache.org/msg18122.html
>
> -David
>
>

Re: Restructuring top level pom.xml

Posted by Prasad Kashyap <go...@gmail.com>.
Thank you David.

----- You wrote ----
This means two things:

1. there needs to be modules/pom.xml which is the parent of everything
in modules. Same goes for the other dirs, configs, assemblies, etc.
The parent pom of modules/pom.xml would be the root pom.xml (if we
want a root pom).

2. each child project must use it's artifactId as it's directory name.
So 'kernel' becomes 'geronimo-kernel', etc.
-----------------------------

Yep, this is what I was talking about. So I guess we'll have to wait
till we are completely done with migrating to Maven2 before we do #2
above. That would be the safest thing to do given the ongoing maven 1
builds.

Cheers
Prasad

On 3/17/06, David Blevins <da...@visi.com> wrote:
> On Mar 17, 2006, at 10:32 AM, Prasad Kashyap wrote:
>
> > Our top level pom.xml lists all the modules that M2 must traverse to
> > build them individually. We currently have around 40 modules specified
> > in the list. We'll soon add some more and then move on to adding 53
> > configs, 16 applications, 7 plugins and some 6 assemblies (give or
> > take a few more).
> >
> > This will make our top level pom.xml a huge big list. Are we sure we
> > want to keep it structured this way ?
> >
> > What say we have add pom.xmls in the intermediate directories like
> > modules, config, applications, assemblies, plugins etc. These would go
> > forth and build the directories under them. This would kep our top
> > level pom.xml easy to read. This would also mirror the tree structure
> > that we currently have.
> >
>
> Here are my thoughts on the subject:
>
> http://www.mail-archive.com/dev@geronimo.apache.org/msg18122.html
>
> -David
>
>

Re: Restructuring top level pom.xml

Posted by David Blevins <da...@visi.com>.
On Mar 17, 2006, at 10:32 AM, Prasad Kashyap wrote:

> Our top level pom.xml lists all the modules that M2 must traverse to
> build them individually. We currently have around 40 modules specified
> in the list. We'll soon add some more and then move on to adding 53
> configs, 16 applications, 7 plugins and some 6 assemblies (give or
> take a few more).
>
> This will make our top level pom.xml a huge big list. Are we sure we
> want to keep it structured this way ?
>
> What say we have add pom.xmls in the intermediate directories like
> modules, config, applications, assemblies, plugins etc. These would go
> forth and build the directories under them. This would kep our top
> level pom.xml easy to read. This would also mirror the tree structure
> that we currently have.
>

Here are my thoughts on the subject:

http://www.mail-archive.com/dev@geronimo.apache.org/msg18122.html

-David