maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hanasaki <hanas...@hanaden.com>
Subject Re: Maven archetype properties
Date Fri, 14 Jun 2013 19:56:47 GMT
You make good points.  For me, unless an api specifies an ordering is
maintained, I assume it will not be.  For my code, I only keep things
ordered all the time when required.  Hope this helps in some way.

-------- Original Message --------
Subject: Re: Maven archetype properties
From: Anders Hammar
To: Maven Users List
CC: hanasaki
Date: 06/14/2013 02:46 PM

> (Moving discussion to the mailing list.)
> 
> Checked the code and the properties are in fact sorted by a Comparator
> provided by the mojo. The reason seems to be to ask for groupId,
> artifactId, version, and package first and then the rest. However, the
> rest of the properties are sorted through String.compareTo(). One could
> argue they should be left unsorted.
> 
> /Anders
> 
> 
> On Fri, Jun 14, 2013 at 9:38 PM, hanasaki <hanasaki@hanaden.com
> <mailto:hanasaki@hanaden.com>> wrote:
> 
>     Speculating that properties are backed by a Map implementation, even if
>     not placed in an instance of Properties, ordering would vary based on
>     the tree and has values / buckets (unless an ordered map based on key
>     values were used - the overhead not being worth it)
> 
>     What do you think?
> 
>     -------- Original Message --------
>     Subject: Re: Maven archetype properties
>     From: Anders Hammar
>     To: Maven Users List
>     Date: 06/14/2013 02:35 PM
> 
>     >> I have an archetype with some properties which Maven asks for
>     >> when instantiating the archetype. From archetype-metadata.xml:
>     >>
>     >>     <requiredProperties>
>     >>         <requiredProperty key="domain"/>
>     >>         <requiredProperty key="username"/>
>     >>         <requiredProperty key="password"/>
>     >>     </requiredProperties>
>     >>
>     >> The problem is that it asks for the properties in another order than
>     >> specified in the file, it seems to be in alphabetical order.
>     >>
>     >> Is there a way to make it ask for properties in a specific
>     >> (non-alphabetical) order?
>     >>
>     >
>     > If your tests show they are re-ordered, then the answer is
>     currently now I
>     > believe. But I would say re-ordering would be a bug so please file
>     a ticket.
>     >
>     >
>     >> Is there a way to make it ask for a property in a way that
>     doesn't display
>     >> the value on screen (for passwords)?
>     >>
>     >
>     > Not that I know of. File a ticket and maybe provide a patch?
>     >
>     > /Anders
>     >
>     >
>     >>
>     >> --
>     >> Mikael Ståldal
>     >> Chief Software Architect
>     >> *Appear*
>     >> Phone: +46 8 545 91 572 <tel:%2B46%208%20545%2091%20572>
>     >> Email: mikael.staldal@appearnetworks.com
>     <mailto:mikael.staldal@appearnetworks.com>
>     >>
>     >
> 
> 

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


Mime
View raw message