maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anders Hammar <and...@hammar.net>
Subject Re: Maven archetype properties
Date Fri, 14 Jun 2013 19:46:46 GMT
(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> 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
> >> Email: mikael.staldal@appearnetworks.com
> >>
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message