Bug#793630: groovy 1.8.6 and libcommons-cli-java 1.3.1 FTBFS

Paul King paulk at asert.com.au
Wed Jul 29 10:24:23 UTC 2015


On 29/07/2015 7:00 PM, Russel Winder wrote:
> Emmanuel, Miguel,
>
> On Wed, 2015-07-29 at 09:57 +0200, Emmanuel Bourg wrote:
>> Le 29/07/2015 03:35, Miguel Landaeta a écrit :
>>
>>> Since you have worked upstream with libcommons-cli-java, I hope to
>>> don't bother you with this help request.
>>
>> commons-cli provides several parsers with different behaviors. Up to
>> 1.2
>> there was a gnu and a posix parsers, and starting with 1.3 I
>> introduced
>> a new unified parser (DefaultParser). You may try using it, it's just
>> a
>> matter of changing the instantiation and it's likely to work better.
>
> As far as I am aware, the Apache Groovy source explicitly imports and
> uses the GnuParser – even now despite it being deprecated – as part of
> the CliBuilder class. All other uses of org.apache.commons.cli in the
> Apache Groovy source use DefaultParser. If I remember correctly,
> DefaultParser, which is PosixParser I believe, enforces bursting of
> single hyphen options, which is fine for the Groovy command line, but
> not sufficiently flexible for the CliBuilder.
>
> The "Java Way" is for a version of something, in this case Groovy 1.8.6
> to retain its original dependency, in this case Commons CLI 1.2.x,
> rather than have the dependencies altered without a new release – most
> people get their dependencies from JCenter or Maven Central via Gradle
> or Maven.
>
> Apache Groovy 1.x series is no longer maintained. All effort is now on
> the Apache Groovy 2.4.x and 2.5-SNAPSHOT versions. If Debian is to
> remove Commons CLI 1.2 then I suggest removing the groovy package since
> the groovy2 package is in place already, and is the right version for
> Debian to go with.
>
> Unless I am missing something.

The 2.4.x stream of Groovy uses Commons CLI 1.2 and defaults to our
own GroovyPosixParser which is a clone of PosixParser with some of
the bug fixes from DefaultParser and some of our own. CliBuilder
has a posix switch which allows the GnuParser or standard PosixParser
to be used instead of our GroovyPosixParser.

The 2.5.x stream of Groovy (yet to release 2.5.0) uses Commons CLI 1.3
and DefaultParser both internally and within CliBuilder. There is an
escape mechanism to use the deprecated GnuParser or (the deprecated in
this stream GroovyPosixParser).

The 2.4.x stream is a mostly maintenance stream (i.e. bug fixes
and only minor functional changes/enhancements). At this stage,
there aren't any plans for doing a 2.4.x release with Commons CLI 1.3.

Groovy2 is certainly the package to go with for Groovy. It currently
relies on Commons CLI 1.2. I missed the earlier part of the
conversation, and it's been too many years since I was last involved
with Debian builds for me to remember all the details, so I won't
make any further recommendations but feel free to ask more questions
if needed.

Cheers, Paul.


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



More information about the pkg-java-maintainers mailing list