#4 Migrate packages from commons-lang to commons-lang3
Closed 3 years ago by decathorpe. Opened 3 years ago by decathorpe.

commons-lang uses "enum" as an identifier, which was made a keyword with Java 5. Java 11 only allows source versions >= 6, so we probably need to migrate to commons-lang3 (which removed the enum module in favor of Java 5 enums).

There's a migration guide that covers both Java code changes and maven build system changes: https://commons.apache.org/proper/commons-lang/article3_0.html


Metadata Update from @decathorpe:
- Issue marked as blocking: #10

3 years ago

This is the list of packages that still require apache-commons-lang in rawhide:

apache-commons-configuration-0:1.10-15.fc32.noarch      FTBFS
apache-commons-configuration-0:1.10-15.fc32.src         FTBFS
apache-ivy-0:2.4.0-22.fc33.src
azureus-0:5.7.6.0-9.fc32.noarch                         FTBFS
azureus-0:5.7.6.0-9.fc32.src                            FTBFS
dogtag-pki-0:10.9.0-0.2.fc33.src
eclipse-m2e-core-0:1.16.1-1.fc34.noarch
findbugs-0:3.0.1-23.fc33.noarch
findbugs-0:3.0.1-23.fc33.src
jss-0:4.7.0-1.fc33.src                                  FTBFS
jss-0:4.7.0-1.fc33.x86_64                               FTBFS
legendsbrowser-0:1.17.1-6.fc32.noarch                   FTBFS
pki-base-java-0:10.9.0-0.5.fc33.noarch
pki-core-0:10.9.0-0.5.fc33.src
tomcatjss-0:7.5.0-0.5.fc33.noarch
tomcatjss-0:7.5.0-0.5.fc33.src

Hello I remove commons-lang dependency in maven-native for rawhide

@deamn Thanks! Removing unused dependencies is always nice :)

Submitted simple commons-lang3 ports for:

maven-dependency-plugin: https://src.fedoraproject.org/rpms/maven-dependency-plugin/pull-request/4
replacer: https://src.fedoraproject.org/rpms/replacer/pull-request/2
slf4j: https://src.fedoraproject.org/rpms/slf4j/pull-request/6

@decathorpe I left you some feedback, but otherwise the changes LGTM.

BTW docker-client-java can probably be retired. Spotify have abandoned this project upstream and it's no longer a requirement of eclipse-linuxtools.

The following packages have now been migrated to commons-lang3 in rawhide:

  • apache-rat
  • clojure-maven-plugin
  • hawtjni
  • maven-dependency-plugin
  • replacer
  • slf4j

I finally got velocity to compile against commons-lang3, this one was a pain in the :peach:

https://src.fedoraproject.org/rpms/velocity/pull-request/2

I just made a comment on #10 which I'll copy here:

Commons Lang 2.6 has an org.apache.commons.lang.enums package in addition to the (deprecated) org.apache.commons.lang.enum:

https://commons.apache.org/proper/commons-lang/javadocs/api-2.6/org/apache/commons/lang/enum/package-summary.html

...so if the Fedora apache-commons-lang package couldn't include org.apache.commons.lang.enum for whatever reason, it might be fairly easy to update dependent packages to use org.apache.commons.lang.enums instead.

...though porting dependent packages to use Commons Lang 3 is better :)

@richardfearn Right, that might be a possibility if we need to keep commons-lang 2.x around for some reason. But as you said, porting packages to commons-lang3 instead seemed to be a more worthwile effort to me :)

This is the latest list:

  • apache-commons-configuration (FTBFS)
  • apache-ivy (src only)
  • azureus (FTBFS)
  • dogtag-pki (FTBFS)
  • eclipse-m2e-core (bin only)
  • findbugs
  • jss (FTBFS)
  • legendsbrowser (bin only, FTBFS)
  • maven-scm
  • pki-core
  • tomcatjss

apache-ivy is the only Java / Stewardship SIG package on this list. It looks like the 2.5.0 (RC) update from the modular branches removes the commons-lang dependency, which we should look into.

I have opened some upstream issues for projects I don't want to touch right now:

Alright, the remaining packages are either already FTBFS for other reasons, or I was unable to patch them myself.

  • apache-commons-configuration, azureus, dogtag-pki, jss, and legendsbrowser are FTBFS for other reasons.
  • I've opened upstream bugs for dogtag-pki, pki-core, and tomcatjss.
  • I do not want to touch eclipse-m2e-core.
  • I could not figure out how to patch findbugs.

I've also removed the broken APIs from apache-commons-lang and built it with Java 11, so this is no longer blocking other work.

  • I do not want to touch eclipse-m2e-core.

Hah, I can take this one :-)

  • I do not want to touch eclipse-m2e-core.

Hah, I can take this one :-)

Great :-)

I thought I'd rather not start messing with eclipse packages directly, I seem to be able to mess them up indirectly just as well already ...

I've opened upstream bugs for dogtag-pki, pki-core (sic --> should be jss), and tomcatjss.

I've opened PRs against PKI, JSS, and TomcatJSS. We're waiting on commons-lang3 >= 3.10 in F31+ and then we can push.

I did maven-archetype and eclipse-m2e-core btw -- I think Eclipse stack is clear of this dep now \รณ/

Latest state:

  • apache-commons-configuration: FTBFS, cantfix
  • azureus: FTBFS, cantfix
  • dogtag-pki: change pending
  • findbugs: weird build system, cantfix
  • jss: change pending
  • legendsbrowser: FTBFS, cantfix
  • pki-core: change pending upstream
  • tomcatjss: change pending

So there's nothing else to do for us at this point. Thanks!

Metadata Update from @decathorpe:
- Issue status updated to: Closed (was: Open)

3 years ago

Login to comment on this ticket.

Metadata