[PATCH] gnu: java-commons-lang3: Update to 3.12.0

  • Done
  • quality assurance status badge
Details
2 participants
  • Julien Lepiller
  • Artyom V. Poptsov
Owner
unassigned
Submitted by
Artyom V. Poptsov
Severity
normal

Debbugs page

Artyom V. Poptsov wrote 3 years ago
(address . guix-patches@gnu.org)
878rq1y8jw.fsf@gmail.com
Hello,

this patch updates 'java-commons-lang3' to 3.12.0.

The update is required to add 'java-commons-text' package.

Thanks,

- Artyom
From 2d17e4bc1728db8536374b2ddfd97e61b8aed470 Mon Sep 17 00:00:00 2001
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
Date: Sun, 12 Jun 2022 22:34:28 +0300
Subject: [PATCH] gnu: java-commons-lang3: Update to 3.12.0

* gnu/packages/java.scm (java-commons-lang3): Update to 3.12.0.
---
gnu/packages/java.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Toggle diff (31 lines)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index fcac0c2367..2e28b28e4e 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -18,6 +18,7 @@
;;; Copyright © 2021 Mike Gerwitz <mtg@gnu.org>
;;; Copyright © 2021 Pierre Langlois <pierre.langlois@gmx.com>
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -6206,14 +6207,14 @@ included:
(define-public java-commons-lang3
(package
(name "java-commons-lang3")
- (version "3.9")
+ (version "3.12.0")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://apache/commons/lang/source/"
"commons-lang3-" version "-src.tar.gz"))
(sha256
- (base32 "0s4ffbvsyl16c90l45ximsg4dwd8hmz7wsza3p308fw43h6mwhb6"))))
+ (base32 "09dcv1pkdx3hpf06py8p9511f1wkin6jpacdll0c8vxpbi3yfwzv"))))
(build-system ant-build-system)
(arguments
`(#:jar-name "commons-lang3.jar"
--
2.25.1
--
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE B57C E9C5 A2D9 0898 A02F
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEE0MLqwTMQgi2Y3rV86cWi2QiYoC8FAmKmQTMACgkQ6cWi2QiY
oC+AwAgAlp/7Gp8zzHTt7pHVkWWByTc5cxtY3HeoApKit7r7T0ccFLDKtVNSNzyS
kR17MIBBhDYb4sen6oVltPeH4W/65AZolanbugIxqtPfmxpIL/M4hNuzhDkCQltd
zXtpdwIrO72jGg4EN45lRBw7U2br6nfGCxBAGkCt/UYRbR+Y2kDTgR4XRBYGqE8X
pqRQnkNxkAo1b8nezAULFwKxYPUB4gxLqDJsdgR+cGMZRXgMT6SkCd1lWFrt4ntY
+czNKVulD1sMFujVjC0QWVnZK6GNZ+YQ3JX4rGvP6x+2Sf1HPY64nh7cQFZSdoQ4
FpT8Yv/XZN3ix69c7QekTlwpkSiYGg==
=al16
-----END PGP SIGNATURE-----

Julien Lepiller wrote 3 years ago
(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)(address . 55931@debbugs.gnu.org)
20220612225018.4a167392@sybil.lepiller.eu
Le Sun, 12 Jun 2022 22:40:35 +0300,
"Artyom V. Poptsov" <poptsov.artyom@gmail.com> a écrit :

Toggle quote (11 lines)
> Hello,
>
> this patch updates 'java-commons-lang3' to 3.12.0.
>
> The update is required to add 'java-commons-text' package.
>
> Thanks,
>
> - Artyom
>

Hi!

The patch looks good and almost works. Unfortunately, the pom file
makes java-jmh fail eventually:

[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-enforcer-plugin:3.0.0:enforce
(enforce-maven) on project jmh-parent: Execution enforce-maven of goal
org.apache.maven.plugins:maven-enforcer-plugin:3.0.0:enforce failed:
Plugin org.apache.maven.plugins:maven-enforcer-plugin:3.0.0 or one of
its dependencies could not be resolved: Failed to collect dependencies
at org.apache.maven.plugins:maven-enforcer-plugin:jar:3.0.0 ->
org.apache.maven:maven-artifact:jar:3.8.5 ->
org.apache.commons:commons-lang3:jar:3.12.0: Failed to read artifact
descriptor for org.apache.commons:commons-lang3:jar:3.12.0: Cannot
access central (https://repo.maven.apache.org/maven2)in offline mode
and the artifact org.junit:junit-bom:pom:5.7.1 has not been downloaded
from it before. -> [Help 1]

From what I understand, maven tries to get org.junit:junit-bom because
it is referenced in commons-lang3's pom file, but we don't have it. This
is the only reference to junit-bom though:

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.7.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

I don't know maven well enough, so I'm not sure what that means, but is
junit-bom really needed? Do you think you could add a phase to remove
this dependencyManagement part of the pom file? It wouldn't be the
first time we modify a pom file to make maven happy later in the
dependency chain.

Otherwise, all packages build fine with this update :)
Artyom V. Poptsov wrote 3 years ago
(name . Julien Lepiller)(address . julien@lepiller.eu)(address . 55931@debbugs.gnu.org)
87mtehvxb8.fsf@gmail.com
Hello Julien,

I've added a patch that removes 'junit-bom' from 'pom.xml' and tried to
build 'java-jmh' as you did; it seems that everything now builds without
errors.

Please find the updated patch attached.

- Artyom
From 39c8cc2a9e057e606cb21dea2584794f8f1d2bec Mon Sep 17 00:00:00 2001
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
Date: Sun, 12 Jun 2022 22:34:28 +0300
Subject: [PATCH] gnu: java-commons-lang3: Update to 3.12.0

* gnu/packages/java.scm (java-commons-lang3): Update to 3.12.0.
* gnu/packages/patches/java-commons-lang-fix-dependency.patch: Add to the
repository.
---
gnu/packages/java.scm | 7 ++--
.../java-commons-lang-fix-dependency.patch | 35 +++++++++++++++++++
2 files changed, 40 insertions(+), 2 deletions(-)
create mode 100644 gnu/packages/patches/java-commons-lang-fix-dependency.patch

Toggle diff (74 lines)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index fcac0c2367..d2fbf840a0 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -18,6 +18,7 @@
;;; Copyright © 2021 Mike Gerwitz <mtg@gnu.org>
;;; Copyright © 2021 Pierre Langlois <pierre.langlois@gmx.com>
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -6206,14 +6207,16 @@ included:
(define-public java-commons-lang3
(package
(name "java-commons-lang3")
- (version "3.9")
+ (version "3.12.0")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://apache/commons/lang/source/"
"commons-lang3-" version "-src.tar.gz"))
(sha256
- (base32 "0s4ffbvsyl16c90l45ximsg4dwd8hmz7wsza3p308fw43h6mwhb6"))))
+ (base32 "09dcv1pkdx3hpf06py8p9511f1wkin6jpacdll0c8vxpbi3yfwzv"))
+ (patches
+ (search-patches "java-commons-lang-fix-dependency.patch"))))
(build-system ant-build-system)
(arguments
`(#:jar-name "commons-lang3.jar"
diff --git a/gnu/packages/patches/java-commons-lang-fix-dependency.patch b/gnu/packages/patches/java-commons-lang-fix-dependency.patch
new file mode 100644
index 0000000000..50e0e94c6b
--- /dev/null
+++ b/gnu/packages/patches/java-commons-lang-fix-dependency.patch
@@ -0,0 +1,35 @@
+From 5c15b04ff9d05235460ea58f303fcf3502a943f2 Mon Sep 17 00:00:00 2001
+From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
+Date: Mon, 13 Jun 2022 09:25:42 +0300
+Subject: [PATCH] pom.xml: Remove dependency on 'junit-bom'
+
+---
+ pom.xml | 12 ------------
+ 1 file changed, 12 deletions(-)
+
+diff --git a/pom.xml b/pom.xml
+index 167a85a47..6cd9be57b 100644
+--- a/pom.xml
++++ b/pom.xml
+@@ -513,18 +513,6 @@
+ </contributor>
+ </contributors>
+
+- <dependencyManagement>
+- <dependencies>
+- <dependency>
+- <groupId>org.junit</groupId>
+- <artifactId>junit-bom</artifactId>
+- <version>5.7.1</version>
+- <type>pom</type>
+- <scope>import</scope>
+- </dependency>
+- </dependencies>
+- </dependencyManagement>
+-
+ <!-- Lang should depend on very little -->
+ <dependencies>
+ <!-- testing -->
+--
+2.25.1
+
--
2.25.1
--
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE B57C E9C5 A2D9 0898 A02F
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEE0MLqwTMQgi2Y3rV86cWi2QiYoC8FAmKm5psACgkQ6cWi2QiY
oC+5Kgf9E7JOOUu2TJjk3cLZROGWdAjhRIieuMZbDR5y+EI9SCj7NqDk8jcUfozc
KIV+X6ovAZpDbkTDRWxXgIwMsDelHgXaQdS+LvnPYWjfP3uYYdyUgJL9LtrP+Ilz
y8mL/nnSERGJQ1gtYqXUy1er7YQ5fYieWIIyFuFehvte2ZT+yqZgIv6hi/L6Tpj0
zvWc24mBI5vLQdaWWsHSVrwCzQHYLNUBKenHTbvfC75jS/I6SOEFuUCjY3q8G0no
35GofQfCo5hky7uE4+xqR6oHJKVOID+/P14PfGk5YPSSdVlRrIod7D7lNffdU32D
puOpsymQ3SpYy3mXnjshI/LKR6XPrg==
=5B69
-----END PGP SIGNATURE-----

Julien Lepiller wrote 3 years ago
(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)(address . 55931-done@debbugs.gnu.org)
20220613225031.7a916194@sybil.lepiller.eu
Le Mon, 13 Jun 2022 10:26:19 +0300,
"Artyom V. Poptsov" <poptsov.artyom@gmail.com> a écrit :

Toggle quote (10 lines)
> Hello Julien,
>
> I've added a patch that removes 'junit-bom' from 'pom.xml' and tried
> to build 'java-jmh' as you did; it seems that everything now builds
> without errors.
>
> Please find the updated patch attached.
>
> - Artyom

Great! Pushed to master as 4ff9f1689d0d8f3c7555c472ce67aaa928af564d.

Before pushing, I applied a few changes. First, when you add a patch,
don't forget to add it to gnu/local.mk. This ensures "make dist" will
generate a complete tarball. Otherwise, the tarball won't contain the
patch. Second, I added a short comment in the patch to explain its
purpose. Finally, I slightly reworded the changelog text about the
patch, in the commit message.

Thanks!
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEHvsJCR8X0ozL+bE6U9RXstY27oIFAmKnoxcACgkQU9RXstY2
7oKVmw//Y/vZSsLj4rdw23nDUQXHsuDKh221SHc29j9dL0pr3n13XhXLAt5fy38O
+FJ0ZLlL20VQVUchAmvvCjHHQtVYhnp8c6/M9F4+J5AuvRIjktpj+ZE/jF7yWVOp
47SY+qUCG/30Z+wDGu+MUvr6W65d+ShUSxBG8z+y2KXvYDxyuB/VDBdopugiw1Mj
AsgyvHg3ZLJjOSSDP/FD1DJ4DmSjyE6kkyPlwfQLPTWebGNZuoZGPRdnMSplNyGT
Ob/VbfbJqiY9vw07cxkRGgxPufGuegwfnEWPtaWJJXDaEj9TeeIO1G5v5+zPZghv
+eyXdU0KAt0Cm0zuMLbLCiQ193u2Nf0BF+EkUKK6jv0OivY1gwu4zVWRT4Ieh28W
N0UldAvcLYGZFvhsYABzi0dN6MwxG9OttG8j8amI+XjtFCzScqktTsB3IF1+Me94
VTQg/gX4JthJ1XQOGELBiFq7X08Hc5ByHf49I2fThOxVvmEb1BWZXHdEbLVRSN+K
MO5kErsl8oRfaa/nUsGzySmd9e9Up4d8yh/bvrwNeScVmshRc8vpH5gD2IcrukLU
lxUJup2sLJLfX3JE+7FEZDffm3JBbtMTA25gXVrxrhOnxEImel/Ys/06kQC8ho0l
/wrHSzj1MBfaOfyOHOuBxVRBVMymsSVv5yjS9lxQ+QJRnMUepdo=
=V2My
-----END PGP SIGNATURE-----


Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 55931@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 55931
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help