You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Arnaud HERITIER <ah...@gmail.com> on 2007/09/18 21:11:27 UTC

Modify the Super Pom from Plugin

Hi guys,

  Is it possible within a plugin to modify the default settings of the Super
Pom (default directories, ..) ?
  Any idea ?


Thx
..........................................................
Arnaud HERITIER
..........................................................
OCTO Technology - aheritier AT octo DOT com
www.octo.com | blog.octo.com
..........................................................
ASF - aheritier AT apache DOT org
www.apache.org | maven.apache.org
...........................................................

Re: Modify the Super Pom from Plugin

Posted by Arnaud HERITIER <ah...@gmail.com>.
On 19/09/2007, Jason van Zyl <ja...@maven.org> wrote:
>
>
> On 19 Sep 07, at 9:09 AM 19 Sep 07, Arnaud HERITIER wrote:
>
> > Hi Jason,
> >
>
> Just make your archetypes redefine those directories. Or deploy a
> parent for all your maven-based grails projects that inherit from a
> POM with all the overrides. Changing the super POM is a bad, bad,
> bad, bad idea.


I understand and I'm not in favor to show how to hack maven standards
because it can open a very dangerous door. But on the other side I would
like to be able to show the power of maven. I though to propose a parent pom
but I abandoned it because it can be unusable if you have another
inheritance (in a corp env for example).
Others solutions I see actually are :
- to generate those settings when I create the pom. It's not a real
archetype because grails already offers this sort of services. The dark side
of this, is that users will have a pom a little bit big at the beginning.
But I'll be able to explain that this one will be reduced when grails will
use maven's standards.
- to add a mojo, that I bind in a phase called at the beginning of the
lifecycle to add sources directories.


Arnaud



>   I was quite sure to have this reply and this is normal.
> >   I explain my problem.
> >   A Grails project has actually its own directories layout that
> > isn't at all
> > compatible with maven standards (and it sucks a little bit).
> >   It's something like that :
> >
> > %PROJECT_HOME%
> >     + grails-app
> >        + conf                 ---> location of configuration artifacts
> > like data sources
> >            + hibernate              ---> optional hibernate config
> >            + spring                 ---> optional spring config
> >        + controllers          ---> location of controller artifacts
> >        + domain               ---> location of domain classes
> >        + i18n                 ---> location of message bundles for
> > i18n
> >        + services             ---> location of services
> >        + taglib               ---> location of tag libraries
> >        + util                 ---> location of special utility classes
> > (e.g., codecs, etc.)
> >        + views                ---> location of views
> >            + layouts              ---> location of layouts
> >    + lib
> >    + scripts                  ---> scripts
> >    + src
> >        + groovy               ---> optional; location for Groovy
> > source files
> >                                    (of types other than those in
> > grails-app/*)
> >        + java                 ---> optional; location for Java
> > source files
> >    + test                     ---> generated test classes
> >    + web-app
> >        + WEB-INF
> >
> >
> >   As you can see java classes are in src/java, but there's also a
> > lot og
> > groovy files in grails-app/controller, grails-app/..., src/groovy
> >   Actually the build mechanism in grails isn't enough opened to be
> > able to
> > configure it with a maven layout and grails users get used to have
> > this
> > layout, that's why I try temporarly to adapt maven to grails standards
> > (waiting to be able to adapt grails to maven ones).
> >   My integration with maven is actually very thin. I'm using grails
> > scripts
> > from maven, but I would like if possible in a near future to be
> > able to use
> > reports and others maven features (release management, ...). All those
> > plugins are looking in the pom to find where are sources,
> > tests ,.... But I
> > would like to avoid to define all those custom settings in each
> > project's
> > pom. It could be better to have the plugin to do it for the project.
> >   Temporarly I think I'll try to add sources / tests directories
> > like it is
> > done in the build-helper plugin. I don't see another idea. If you
> > have one
> > ..... ;-)
> >   Thx.
> >
> > Arnaud
> >
> >
> > On 19/09/2007, Jason van Zyl <ja...@maven.org> wrote:
> >>
> >>
> >> On 18 Sep 07, at 12:11 PM 18 Sep 07, Arnaud HERITIER wrote:
> >>
> >>> Hi guys,
> >>>
> >>>   Is it possible within a plugin to modify the default settings of
> >>> the Super
> >>> Pom (default directories, ..) ?
> >>>   Any idea ?
> >>>
> >>
> >> No, and why would you want to do that? The Super POM is immutable for
> >> all intents and purposes. You should just override at the
> >> organizational level or in a project POM if you want to do something
> >> different.
> >>
> >>>
> >>> Thx
> >>> ..........................................................
> >>> Arnaud HERITIER
> >>> ..........................................................
> >>> OCTO Technology - aheritier AT octo DOT com
> >>> www.octo.com | blog.octo.com
> >>> ..........................................................
> >>> ASF - aheritier AT apache DOT org
> >>> www.apache.org | maven.apache.org
> >>> ...........................................................
> >>
> >> Thanks,
> >>
> >> Jason
> >>
> >> ----------------------------------------------------------
> >> Jason van Zyl
> >> Founder and PMC Chair, Apache Maven
> >> jason at sonatype dot com
> >> ----------------------------------------------------------
> >>
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: dev-help@maven.apache.org
> >>
> >>
> >
> >
> > --
> > ..........................................................
> > Arnaud HERITIER
> > ..........................................................
> > OCTO Technology - aheritier AT octo DOT com
> > www.octo.com | blog.octo.com
> > ..........................................................
> > ASF - aheritier AT apache DOT org
> > www.apache.org | maven.apache.org
> > ...........................................................
>
> Thanks,
>
> Jason
>
> ----------------------------------------------------------
> Jason van Zyl
> Founder and PMC Chair, Apache Maven
> jason at sonatype dot com
> ----------------------------------------------------------
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>


-- 
..........................................................
Arnaud HERITIER
..........................................................
OCTO Technology - aheritier AT octo DOT com
www.octo.com | blog.octo.com
..........................................................
ASF - aheritier AT apache DOT org
www.apache.org | maven.apache.org
...........................................................

Re: Modify the Super Pom from Plugin

Posted by Jason van Zyl <ja...@maven.org>.
On 19 Sep 07, at 9:09 AM 19 Sep 07, Arnaud HERITIER wrote:

> Hi Jason,
>

Just make your archetypes redefine those directories. Or deploy a  
parent for all your maven-based grails projects that inherit from a  
POM with all the overrides. Changing the super POM is a bad, bad,  
bad, bad idea.

>   I was quite sure to have this reply and this is normal.
>   I explain my problem.
>   A Grails project has actually its own directories layout that  
> isn't at all
> compatible with maven standards (and it sucks a little bit).
>   It's something like that :
>
> %PROJECT_HOME%
>     + grails-app
>        + conf                 ---> location of configuration artifacts
> like data sources
>            + hibernate              ---> optional hibernate config
>            + spring                 ---> optional spring config
>        + controllers          ---> location of controller artifacts
>        + domain               ---> location of domain classes
>        + i18n                 ---> location of message bundles for  
> i18n
>        + services             ---> location of services
>        + taglib               ---> location of tag libraries
>        + util                 ---> location of special utility classes
> (e.g., codecs, etc.)
>        + views                ---> location of views
>            + layouts              ---> location of layouts
>    + lib
>    + scripts                  ---> scripts
>    + src
>        + groovy               ---> optional; location for Groovy  
> source files
>                                    (of types other than those in  
> grails-app/*)
>        + java                 ---> optional; location for Java  
> source files
>    + test                     ---> generated test classes
>    + web-app
>        + WEB-INF
>
>
>   As you can see java classes are in src/java, but there's also a  
> lot og
> groovy files in grails-app/controller, grails-app/..., src/groovy
>   Actually the build mechanism in grails isn't enough opened to be  
> able to
> configure it with a maven layout and grails users get used to have  
> this
> layout, that's why I try temporarly to adapt maven to grails standards
> (waiting to be able to adapt grails to maven ones).
>   My integration with maven is actually very thin. I'm using grails  
> scripts
> from maven, but I would like if possible in a near future to be  
> able to use
> reports and others maven features (release management, ...). All those
> plugins are looking in the pom to find where are sources,  
> tests ,.... But I
> would like to avoid to define all those custom settings in each  
> project's
> pom. It could be better to have the plugin to do it for the project.
>   Temporarly I think I'll try to add sources / tests directories  
> like it is
> done in the build-helper plugin. I don't see another idea. If you  
> have one
> ..... ;-)
>   Thx.
>
> Arnaud
>
>
> On 19/09/2007, Jason van Zyl <ja...@maven.org> wrote:
>>
>>
>> On 18 Sep 07, at 12:11 PM 18 Sep 07, Arnaud HERITIER wrote:
>>
>>> Hi guys,
>>>
>>>   Is it possible within a plugin to modify the default settings of
>>> the Super
>>> Pom (default directories, ..) ?
>>>   Any idea ?
>>>
>>
>> No, and why would you want to do that? The Super POM is immutable for
>> all intents and purposes. You should just override at the
>> organizational level or in a project POM if you want to do something
>> different.
>>
>>>
>>> Thx
>>> ..........................................................
>>> Arnaud HERITIER
>>> ..........................................................
>>> OCTO Technology - aheritier AT octo DOT com
>>> www.octo.com | blog.octo.com
>>> ..........................................................
>>> ASF - aheritier AT apache DOT org
>>> www.apache.org | maven.apache.org
>>> ...........................................................
>>
>> Thanks,
>>
>> Jason
>>
>> ----------------------------------------------------------
>> Jason van Zyl
>> Founder and PMC Chair, Apache Maven
>> jason at sonatype dot com
>> ----------------------------------------------------------
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>>
>
>
> -- 
> ..........................................................
> Arnaud HERITIER
> ..........................................................
> OCTO Technology - aheritier AT octo DOT com
> www.octo.com | blog.octo.com
> ..........................................................
> ASF - aheritier AT apache DOT org
> www.apache.org | maven.apache.org
> ...........................................................

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder and PMC Chair, Apache Maven
jason at sonatype dot com
----------------------------------------------------------




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


RE: Modify the Super Pom from Plugin

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
What happens if you modified the super pom and included it an extension?
Which would take precedence?

-----Original Message-----
From: Arnaud HERITIER [mailto:aheritier@gmail.com] 
Sent: Wednesday, September 19, 2007 12:09 PM
To: Maven Developers List
Subject: Re: Modify the Super Pom from Plugin

Hi Jason,

  I was quite sure to have this reply and this is normal.
  I explain my problem.
  A Grails project has actually its own directories layout that isn't at
all
compatible with maven standards (and it sucks a little bit).
  It's something like that :

%PROJECT_HOME%
    + grails-app
       + conf                 ---> location of configuration artifacts
like data sources
           + hibernate              ---> optional hibernate config
           + spring                 ---> optional spring config
       + controllers          ---> location of controller artifacts
       + domain               ---> location of domain classes
       + i18n                 ---> location of message bundles for i18n
       + services             ---> location of services
       + taglib               ---> location of tag libraries
       + util                 ---> location of special utility classes
(e.g., codecs, etc.)
       + views                ---> location of views
           + layouts              ---> location of layouts
   + lib
   + scripts                  ---> scripts
   + src
       + groovy               ---> optional; location for Groovy source
files
                                   (of types other than those in
grails-app/*)
       + java                 ---> optional; location for Java source
files
   + test                     ---> generated test classes
   + web-app
       + WEB-INF


  As you can see java classes are in src/java, but there's also a lot og
groovy files in grails-app/controller, grails-app/..., src/groovy
  Actually the build mechanism in grails isn't enough opened to be able
to
configure it with a maven layout and grails users get used to have this
layout, that's why I try temporarly to adapt maven to grails standards
(waiting to be able to adapt grails to maven ones).
  My integration with maven is actually very thin. I'm using grails
scripts
from maven, but I would like if possible in a near future to be able to
use
reports and others maven features (release management, ...). All those
plugins are looking in the pom to find where are sources, tests ,....
But I
would like to avoid to define all those custom settings in each
project's
pom. It could be better to have the plugin to do it for the project.
  Temporarly I think I'll try to add sources / tests directories like it
is
done in the build-helper plugin. I don't see another idea. If you have
one
..... ;-)
  Thx.

Arnaud


On 19/09/2007, Jason van Zyl <ja...@maven.org> wrote:
>
>
> On 18 Sep 07, at 12:11 PM 18 Sep 07, Arnaud HERITIER wrote:
>
> > Hi guys,
> >
> >   Is it possible within a plugin to modify the default settings of
> > the Super
> > Pom (default directories, ..) ?
> >   Any idea ?
> >
>
> No, and why would you want to do that? The Super POM is immutable for
> all intents and purposes. You should just override at the
> organizational level or in a project POM if you want to do something
> different.
>
> >
> > Thx
> > ..........................................................
> > Arnaud HERITIER
> > ..........................................................
> > OCTO Technology - aheritier AT octo DOT com
> > www.octo.com | blog.octo.com
> > ..........................................................
> > ASF - aheritier AT apache DOT org
> > www.apache.org | maven.apache.org
> > ...........................................................
>
> Thanks,
>
> Jason
>
> ----------------------------------------------------------
> Jason van Zyl
> Founder and PMC Chair, Apache Maven
> jason at sonatype dot com
> ----------------------------------------------------------
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>


-- 
..........................................................
Arnaud HERITIER
..........................................................
OCTO Technology - aheritier AT octo DOT com
www.octo.com | blog.octo.com
..........................................................
ASF - aheritier AT apache DOT org
www.apache.org | maven.apache.org
...........................................................

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


Re: Modify the Super Pom from Plugin

Posted by Arnaud HERITIER <ah...@gmail.com>.
Hi Jason,

  I was quite sure to have this reply and this is normal.
  I explain my problem.
  A Grails project has actually its own directories layout that isn't at all
compatible with maven standards (and it sucks a little bit).
  It's something like that :

%PROJECT_HOME%
    + grails-app
       + conf                 ---> location of configuration artifacts
like data sources
           + hibernate              ---> optional hibernate config
           + spring                 ---> optional spring config
       + controllers          ---> location of controller artifacts
       + domain               ---> location of domain classes
       + i18n                 ---> location of message bundles for i18n
       + services             ---> location of services
       + taglib               ---> location of tag libraries
       + util                 ---> location of special utility classes
(e.g., codecs, etc.)
       + views                ---> location of views
           + layouts              ---> location of layouts
   + lib
   + scripts                  ---> scripts
   + src
       + groovy               ---> optional; location for Groovy source files
                                   (of types other than those in grails-app/*)
       + java                 ---> optional; location for Java source files
   + test                     ---> generated test classes
   + web-app
       + WEB-INF


  As you can see java classes are in src/java, but there's also a lot og
groovy files in grails-app/controller, grails-app/..., src/groovy
  Actually the build mechanism in grails isn't enough opened to be able to
configure it with a maven layout and grails users get used to have this
layout, that's why I try temporarly to adapt maven to grails standards
(waiting to be able to adapt grails to maven ones).
  My integration with maven is actually very thin. I'm using grails scripts
from maven, but I would like if possible in a near future to be able to use
reports and others maven features (release management, ...). All those
plugins are looking in the pom to find where are sources, tests ,.... But I
would like to avoid to define all those custom settings in each project's
pom. It could be better to have the plugin to do it for the project.
  Temporarly I think I'll try to add sources / tests directories like it is
done in the build-helper plugin. I don't see another idea. If you have one
..... ;-)
  Thx.

Arnaud


On 19/09/2007, Jason van Zyl <ja...@maven.org> wrote:
>
>
> On 18 Sep 07, at 12:11 PM 18 Sep 07, Arnaud HERITIER wrote:
>
> > Hi guys,
> >
> >   Is it possible within a plugin to modify the default settings of
> > the Super
> > Pom (default directories, ..) ?
> >   Any idea ?
> >
>
> No, and why would you want to do that? The Super POM is immutable for
> all intents and purposes. You should just override at the
> organizational level or in a project POM if you want to do something
> different.
>
> >
> > Thx
> > ..........................................................
> > Arnaud HERITIER
> > ..........................................................
> > OCTO Technology - aheritier AT octo DOT com
> > www.octo.com | blog.octo.com
> > ..........................................................
> > ASF - aheritier AT apache DOT org
> > www.apache.org | maven.apache.org
> > ...........................................................
>
> Thanks,
>
> Jason
>
> ----------------------------------------------------------
> Jason van Zyl
> Founder and PMC Chair, Apache Maven
> jason at sonatype dot com
> ----------------------------------------------------------
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>


-- 
..........................................................
Arnaud HERITIER
..........................................................
OCTO Technology - aheritier AT octo DOT com
www.octo.com | blog.octo.com
..........................................................
ASF - aheritier AT apache DOT org
www.apache.org | maven.apache.org
...........................................................

Re: Modify the Super Pom from Plugin

Posted by Jason van Zyl <ja...@maven.org>.
On 18 Sep 07, at 12:11 PM 18 Sep 07, Arnaud HERITIER wrote:

> Hi guys,
>
>   Is it possible within a plugin to modify the default settings of  
> the Super
> Pom (default directories, ..) ?
>   Any idea ?
>

No, and why would you want to do that? The Super POM is immutable for  
all intents and purposes. You should just override at the  
organizational level or in a project POM if you want to do something  
different.

>
> Thx
> ..........................................................
> Arnaud HERITIER
> ..........................................................
> OCTO Technology - aheritier AT octo DOT com
> www.octo.com | blog.octo.com
> ..........................................................
> ASF - aheritier AT apache DOT org
> www.apache.org | maven.apache.org
> ...........................................................

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder and PMC Chair, Apache Maven
jason at sonatype dot com
----------------------------------------------------------




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