You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Nick Stolwijk <ni...@gmail.com> on 2010/02/24 10:30:00 UTC

Clean up of pom files

Hi all,

We have a multitude of components and projects all build with maven
and we want to enforce some standard layout for the pom files, like
the ordering of the elements(like the ordering in the schema) and
forbidding some elements (like company and url, there are already set
in the company pom).

So 2 questions:
- Is there a maven/eclipse/netbeans plugin which can sort pom (xml)
files based on their schema?
- Is there an enforcer plugin who can enforce the ordering of the
elements and forbidding some elements.

Hope someone can help,

Nick Stolwijk
~Java Developer~

IPROFS BV.
Claus Sluterweg 125
2012 WS Haarlem
http://www.iprofs.nl

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


Re: Clean up of pom files

Posted by Milos Kleint <mk...@gmail.com>.
not for netbeans.
 AFAIK the maven pom schema doesn't enforce ordering.
you could write such enforcer rule yourself I guess.

Milos

On Wed, Feb 24, 2010 at 10:30 AM, Nick Stolwijk <ni...@gmail.com>wrote:

> Hi all,
>
> We have a multitude of components and projects all build with maven
> and we want to enforce some standard layout for the pom files, like
> the ordering of the elements(like the ordering in the schema) and
> forbidding some elements (like company and url, there are already set
> in the company pom).
>
> So 2 questions:
> - Is there a maven/eclipse/netbeans plugin which can sort pom (xml)
> files based on their schema?
> - Is there an enforcer plugin who can enforce the ordering of the
> elements and forbidding some elements.
>
> Hope someone can help,
>
> Nick Stolwijk
> ~Java Developer~
>
> IPROFS BV.
> Claus Sluterweg 125
> 2012 WS Haarlem
> http://www.iprofs.nl
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Clean up of pom files

Posted by Barrie Treloar <ba...@gmail.com>.
On Wed, Feb 24, 2010 at 8:00 PM, Nick Stolwijk <ni...@gmail.com> wrote:
> Hi all,
>
> We have a multitude of components and projects all build with maven
> and we want to enforce some standard layout for the pom files, like
> the ordering of the elements(like the ordering in the schema) and
> forbidding some elements (like company and url, there are already set
> in the company pom).
>
> So 2 questions:
> - Is there a maven/eclipse/netbeans plugin which can sort pom (xml)
> files based on their schema?
> - Is there an enforcer plugin who can enforce the ordering of the
> elements and forbidding some elements.

You can also attempt to use
http://maven.apache.org/enforcer/enforcer-rules/index.html

But that might not be quite what you are after.

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


Re : Clean up of pom files

Posted by Julien HENRY <he...@yahoo.fr>.
Hi,

I have the same need and I have opened a Sonar feature request: http://jira.codehaus.org/browse/SONAR-1399
Read the comments to see the proposals.

You can also look at http://maven.apache.org/developers/conventions/code.html#POM_Code_Convention to see Maven POM element ordering convention.

Regards,

Julien




----- Message d'origine ----
> De : Nick Stolwijk <ni...@gmail.com>
> À : Maven Users List <us...@maven.apache.org>
> Envoyé le : Mer 24 Février 2010, 11 h 08 min 05 s
> Objet : Re: Clean up of pom files
> 
> Thanks, that plugin looks promising! Only their default ordering is
> not my preferable ordering, but I can see it is configurable. :)
> 
> Thanks,
> 
> Nick Stolwijk
> ~Java Developer~
> 
> IPROFS BV.
> Claus Sluterweg 125
> 2012 WS Haarlem
> http://www.iprofs.nl
> 
> 
> 
> On Wed, Feb 24, 2010 at 10:48 AM, Anders Hammar wrote:
> > You might want to use this plugin:
> > http://code.google.com/p/sortpom/
> >
> > /Anders
> >
> > On Wed, Feb 24, 2010 at 10:30, Nick Stolwijk wrote:
> >
> >> Hi all,
> >>
> >> We have a multitude of components and projects all build with maven
> >> and we want to enforce some standard layout for the pom files, like
> >> the ordering of the elements(like the ordering in the schema) and
> >> forbidding some elements (like company and url, there are already set
> >> in the company pom).
> >>
> >> So 2 questions:
> >> - Is there a maven/eclipse/netbeans plugin which can sort pom (xml)
> >> files based on their schema?
> >> - Is there an enforcer plugin who can enforce the ordering of the
> >> elements and forbidding some elements.
> >>
> >> Hope someone can help,
> >>
> >> Nick Stolwijk
> >> ~Java Developer~
> >>
> >> IPROFS BV.
> >> Claus Sluterweg 125
> >> 2012 WS Haarlem
> >> http://www.iprofs.nl
> >>
> >> ---------------------------------------------------------------------
> >> 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



      

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


Re: Clean up of pom files

Posted by Nick Stolwijk <ni...@gmail.com>.
Thanks, that plugin looks promising! Only their default ordering is
not my preferable ordering, but I can see it is configurable. :)

Thanks,

Nick Stolwijk
~Java Developer~

IPROFS BV.
Claus Sluterweg 125
2012 WS Haarlem
http://www.iprofs.nl



On Wed, Feb 24, 2010 at 10:48 AM, Anders Hammar <an...@hammar.net> wrote:
> You might want to use this plugin:
> http://code.google.com/p/sortpom/
>
> /Anders
>
> On Wed, Feb 24, 2010 at 10:30, Nick Stolwijk <ni...@gmail.com>wrote:
>
>> Hi all,
>>
>> We have a multitude of components and projects all build with maven
>> and we want to enforce some standard layout for the pom files, like
>> the ordering of the elements(like the ordering in the schema) and
>> forbidding some elements (like company and url, there are already set
>> in the company pom).
>>
>> So 2 questions:
>> - Is there a maven/eclipse/netbeans plugin which can sort pom (xml)
>> files based on their schema?
>> - Is there an enforcer plugin who can enforce the ordering of the
>> elements and forbidding some elements.
>>
>> Hope someone can help,
>>
>> Nick Stolwijk
>> ~Java Developer~
>>
>> IPROFS BV.
>> Claus Sluterweg 125
>> 2012 WS Haarlem
>> http://www.iprofs.nl
>>
>> ---------------------------------------------------------------------
>> 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: Clean up of pom files

Posted by Anders Hammar <an...@hammar.net>.
You might want to use this plugin:
http://code.google.com/p/sortpom/

/Anders

On Wed, Feb 24, 2010 at 10:30, Nick Stolwijk <ni...@gmail.com>wrote:

> Hi all,
>
> We have a multitude of components and projects all build with maven
> and we want to enforce some standard layout for the pom files, like
> the ordering of the elements(like the ordering in the schema) and
> forbidding some elements (like company and url, there are already set
> in the company pom).
>
> So 2 questions:
> - Is there a maven/eclipse/netbeans plugin which can sort pom (xml)
> files based on their schema?
> - Is there an enforcer plugin who can enforce the ordering of the
> elements and forbidding some elements.
>
> Hope someone can help,
>
> Nick Stolwijk
> ~Java Developer~
>
> IPROFS BV.
> Claus Sluterweg 125
> 2012 WS Haarlem
> http://www.iprofs.nl
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>