You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Paul Benedict <pb...@apache.org> on 2009/12/27 08:37:26 UTC

Canonical order of POM elements?

Has Maven ever produced a plugin to canonically order (rewrite) an
existing POM (and respecting whitespace)?  Validating against an XSD,
I know element order doesn't matter -- but it would be nice if there
was a way to uniformly order my POM. No such order apparently exists
in the wild.

Paul

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


Re: Canonical order of POM elements?

Posted by Stephen Connolly <st...@gmail.com>.
there is a defined order for projects with groupId matching
org.apache.maven.*

I cannot recall exactly what that order is though

2009/12/27 Paul Benedict <pb...@apache.org>

> Has Maven ever produced a plugin to canonically order (rewrite) an
> existing POM (and respecting whitespace)?  Validating against an XSD,
> I know element order doesn't matter -- but it would be nice if there
> was a way to uniformly order my POM. No such order apparently exists
> in the wild.
>
> Paul
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Canonical order of POM elements?

Posted by Paul Benedict <pb...@apache.org>.
On Sun, Dec 27, 2009 at 10:11 AM, Martin Gainty <mg...@hotmail.com> wrote:
> Benedictus
>
> what criteria would be used for <re>ordering your pom.xml
> ?
>
> Martin

Hopefully information already out on the Internet. The "Quick
Reference" [1] of Maven's POM might be a good guide.

As for me, I like to hand-write and read POM files. I also like the
*idea* of M2Eclipse's POM editor, but there is no predictable order to
where it adds elements. Anyone who works hard at keeping a POM cleanly
structured is going to find consternation with the tool. This could be
alleviated if there was a "preferred" way to order elements. Think of
this like the "code clean up" tool found in Eclipse IDE -- so no
matter who or what is editing the POM, cleaning up afterwards will put
it in a nicely ordered form.

[1] http://maven.apache.org/pom.html

Paul

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


RE: Canonical order of POM elements?

Posted by Martin Gainty <mg...@hotmail.com>.
Benedictus

what criteria would be used for <re>ordering your pom.xml
?

Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> Date: Sun, 27 Dec 2009 01:37:26 -0600
> Subject: Canonical order of POM elements?
> From: pbenedict@apache.org
> To: users@maven.apache.org
> 
> Has Maven ever produced a plugin to canonically order (rewrite) an
> existing POM (and respecting whitespace)?  Validating against an XSD,
> I know element order doesn't matter -- but it would be nice if there
> was a way to uniformly order my POM. No such order apparently exists
> in the wild.
> 
> Paul
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
 		 	   		  
_________________________________________________________________
Hotmail: Powerful Free email with security by Microsoft.
http://clk.atdmt.com/GBL/go/171222986/direct/01/