> On 4 Jan 2017, at 21:03, Mandy Chung <mandy.ch...@oracle.com> wrote:
> 
> 
>> On Dec 22, 2016, at 9:11 AM, Chris Hegarty <chris.hega...@oracle.com> wrote:
>> 
>> Most options for the jmod tool should be last one wins, to be consistent
>> with the JDK tool convention, 8168149 [1]. Excludes is the only
>> repeatable option.
>> 
>> Given the existing usage of JOpt Simple, the most straight forward way
>> to achieve the last-one-wins behaviour is to drop the
>> withValuesSeparatedBy() from the OptionSpec have have the ValueConverters
>> themselves do the separation, if any. That way all options can be made
>> repeatable and the last element of the list of the option’s values will
>> be the final one on the command line.
>> 
>> http://cr.openjdk.java.net/~chegar/8168149.00/
> 
> This looks okay.

Thanks for looking at this Mandy.

> I wonder if it would be more helpful if it fails when a non-repeating option 
> is specified more than once for a packaging tool.  Otherwise, the only way to 
> find out if the command-line is correct is to list the content after the JMOD 
> file is created.  OptionSpec::value throws an exception if the option is 
> specified more than once.

Right. I was following the existing longstanding precedent of
last-one-wins for JDK tool options. If I read your comment
correctly you are suggesting that packaging tools do not
follow this, correct?  This will need further discussion, and 
maybe a clarification in JEP 293 "Guidelines for JDK
Command-Line Tool Options”.

-Chris.

[1] http://openjdk.java.net/jeps/293

Reply via email to