Subject: [bug#55979] [PATCH] gnu: Add java-commons-text

From: Julien Lepiller <[email-masked]>
Date: Sat, 18 Jun 2022 21:42:05 +0200

Le Sat, 18 Jun 2022 19:25:29 +0300,
"Artyom V. Poptsov" <[email-masked]> a écrit :

> +    (build-system ant-build-system)
> +    (arguments
> +     (list #:jar-name "java-commons-text.jar"
> +           #:source-dir "src/main/java"
> +           #:test-dir "src/test"
> +           ;; XXX: Tests require JUnit5, namely
> 'org.junit.jupiter.api' module
> +           ;; from JUnit5.

I think ;; tests require junit5
is enough here :)

> +           #:tests? #f
> +           #:phases #~(modify-phases %standard-phases
> +                        (replace 'install
> +                          (install-from-pom "pom.xml")))))

great :)

> +    (inputs
> +     (list java-commons-lang3
> +           java-commons-io))
> +    (propagated-inputs
> +     (list apache-commons-parent-pom-52))

So this is an error, because apache-commons-parent-pom-52 is not the
parent of this package's pom file. Here's the content of the pom file
(btw you can view it easily with "guix build -S java-commons-text"):

  <parent>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-parent</artifactId>
    <version>51</version>
  </parent>

so the parent is apache-commons-parent-pom-51 (note the version number).

Also in the list of dependencies from that file I see
java-commons-lang3, so it needs to be propagated, otherwise maven might
not be able to find it.

> +    (home-page "https://commons.apache.org/text/")
> +    (synopsis "Library focused on algorithms working on strings")