[PATCH] gnu: Add maven-doxia-core

DoneSubmitted by Artyom V. Poptsov.
Details
2 participants
  • Julien Lepiller
  • Artyom V. Poptsov
Owner
unassigned
Severity
normal
A
A
Artyom V. Poptsov wrote on 25 Jun 12:26 +0200
(address . guix-patches@gnu.org)
878rplniny.fsf@gmail.com
Hello,

this patch adds "Maven Doxia Core" under the name 'maven-doxia-core'.
From 4e06642ac47d0b69fb5aeb5e8b21efaacbc7ed67 Mon Sep 17 00:00:00 2001
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
Date: Sat, 25 Jun 2022 13:20:02 +0300
Subject: [PATCH] gnu: Add maven-doxia-core

* gnu/packages/maven.scm (maven-doxia-core): New variable.
---
gnu/packages/maven.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm
index e5831ee614..95de84e845 100644
--- a/gnu/packages/maven.scm
+++ b/gnu/packages/maven.scm
@@ -3921,6 +3921,32 @@ encapsulate common text syntax.  A start tag is denoted by @code{xxxx()}
 method and a end of tag by @code{xxxx_()} method.")
     (license license:asl2.0)))
 
+(define-public maven-doxia-core
+  (package
+    (inherit maven-doxia-sink-api)
+    (name "maven-doxia-core")
+    (arguments
+     `(#:jar-name "doxia-core.jar"
+       #:source-dir "doxia-core/src/main/java"
+       #:tests? #f ;no tests
+       #:phases (modify-phases %standard-phases
+                  (replace 'install
+                    (install-from-pom "doxia-core/pom.xml")))))
+    (inputs (list maven-doxia-sink-api
+                  java-slf4j-api
+                  java-javax-inject
+                  java-plexus-utils
+                  java-eclipse-sisu-plexus
+                  java-commons-text))
+    (home-page "https://maven.apache.org/doxia/index.html")
+    (synopsis "Doxia core classes and interfaces")
+    (description
+     "Doxia is a content generation framework that provides powerful
+techniques for generating static and dynamic content, supporting a variety of
+markup languages.")
+    (license license:asl2.0)))
+
+
 (define maven-doxia-parent-pom
   (package
     (inherit maven-doxia-sink-api)
-- 
2.25.1
Thanks,

- Artyom

--
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-----

iQEzBAEBCgAdFiEE0MLqwTMQgi2Y3rV86cWi2QiYoC8FAmK24sEACgkQ6cWi2QiY
oC85iAgAlMEjaJa43l9MAJsjmB+xl3xgxTgU2kxCGTjhn90vTdYOWbc8p9/SkOzT
x4N0epAYyAbxFDBwpxKc7RIm0sTJN4/FBiqrMf6/2mz9mJlW5DymB/Qcsz68ZA6T
2DeqwED0Bfzl4MdfXPJGZE4LzLiJ7rf50rL8tGA+ZCaar2QpV9FUQsPXdC7Ij3lf
DJ3DWzOoQfxpSTt/LEI9ByoYIGX+QLM8vJY0AdI9jrvdSft+SOvrYR+aAUVmPLaJ
qMZDsmM1QVHKQoxfCofw5EDrBomRICqO5M3b6L/v033cRXLGjeHWwPA1fTBkyQg7
37YAozF+PJhufgl5yotxjlBCopfViQ==
=4X+O
-----END PGP SIGNATURE-----

J
J
Julien Lepiller wrote on 25 Jun 13:21 +0200
(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)(address . 56213@debbugs.gnu.org)
20220625132117.6da69dda@sybil.lepiller.eu
Thanks for the patch!

A few remarks below :)

Le Sat, 25 Jun 2022 13:26:09 +0300,
"Artyom V. Poptsov" <poptsov.artyom@gmail.com> a écrit :

Toggle quote (5 lines)
> From 4e06642ac47d0b69fb5aeb5e8b21efaacbc7ed67 Mon Sep 17 00:00:00 2001
> From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
> Date: Sat, 25 Jun 2022 13:20:02 +0300
> Subject: [PATCH] gnu: Add maven-doxia-core

Missing full stop at the end of the subject line.

Toggle quote (23 lines)
>
> * gnu/packages/maven.scm (maven-doxia-core): New variable.
> ---
> gnu/packages/maven.scm | 26 ++++++++++++++++++++++++++
> 1 file changed, 26 insertions(+)
>
> diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm
> index e5831ee614..95de84e845 100644
> --- a/gnu/packages/maven.scm
> +++ b/gnu/packages/maven.scm
> @@ -3921,6 +3921,32 @@ encapsulate common text syntax. A start tag
> is denoted by @code{xxxx()} method and a end of tag by @code{xxxx_()}
> method.") (license license:asl2.0)))
>
> +(define-public maven-doxia-core
> + (package
> + (inherit maven-doxia-sink-api)
> + (name "maven-doxia-core")
> + (arguments
> + `(#:jar-name "doxia-core.jar"
> + #:source-dir "doxia-core/src/main/java"
> + #:tests? #f ;no tests

This package actually has tests, could you enable them?

Toggle quote (10 lines)
> + #:phases (modify-phases %standard-phases
> + (replace 'install
> + (install-from-pom "doxia-core/pom.xml")))))
> + (inputs (list maven-doxia-sink-api
> + java-slf4j-api
> + java-javax-inject
> + java-plexus-utils
> + java-eclipse-sisu-plexus
> + java-commons-text))

The pom file references most of these as runtime dependencies, so we
need to propagate them, so maven can find them.

We also need to propagated the parent pom :)

Toggle quote (7 lines)
> + (synopsis "Doxia core classes and interfaces")
> + (description
> + "Doxia is a content generation framework that provides powerful
> +techniques for generating static and dynamic content, supporting a
> variety of +markup languages.")

This feels like a description of the whole Doxia project. Could you add
maybe one sentence to explain how this package is related to the whole
doxia project?

Toggle quote (7 lines)
> + (license license:asl2.0)))
> +
> +
> (define maven-doxia-parent-pom
> (package
> (inherit maven-doxia-sink-api)

Lastly, I would put this package just below maven-doxia-parent-pom, but
that's mostly aesthetic :)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEHvsJCR8X0ozL+bE6U9RXstY27oIFAmK2760ACgkQU9RXstY2
7oLK9BAAh67JwhTBb2zicG3lnhL98lvv9tNyKS3nuzZQTsFWNgYHim5U96bnAVxi
drKWUd13enoFCvOt6hCg+AEFk0eZyq+XYBT1rL0aXbzMqXSeg47z1xO2L0yYkQ42
5M/npDu8dpuDSdvRh64rQr0XsSgTpGiR5Tu9UH97DoxHI2eBQkIjQmycsDJz/Llv
JVlocCgoiHjXegw9Z4eVXBLh5C7eKEzFFyY0ger25Cj3AeQ5gtZq1vJ61gHWh4kf
b8N+7lLFAcxwJyikMfzeDYhS68/ySnjmp1yPS21PTZJZEJ3yjcI/xJZBjKk5zmQO
JZ3Ph/PW0VOmNcA3HwP62bcmOeBu0BKz8D8IJiZh506zleIIirCYgf2kHtmi+Sld
1l+xfnjbAdh8SwpbXnkn5lFh+O45HwfS33yzMMqzB5/ZU1JJI9uQH+iCRYt4CheV
cb+00fAQ+W4NPxeo+8wd9lowAi7UwStguETypgYNQEEwj/dNeAErx+zdljzXMpIP
BtVilynJGH9LgSOU4dw9U5iDRLXraEv3DbTeUyjyhZAjtXll89uV/j1aYU6n+NcK
u8vru4jG/OmzmPGJdz43lgXpFkv4qnN8nB7xSn/jNF/FGh3EFm2vt13bstRnrpfa
yS4yLr0J1/0Rt3sxJPb32BWmJrNaRZ0AVgZ8fjN+VcA44QmlM28=
=w0ok
-----END PGP SIGNATURE-----


A
A
Artyom V. Poptsov wrote on 25 Jun 14:14 +0200
(name . Julien Lepiller)(address . julien@lepiller.eu)(address . 56213@debbugs.gnu.org)
87wnd52b3x.fsf@gmail.com
Hello Julien.

Toggle quote (2 lines)
> Thanks for the patch!

Thanks for taking your time for reviewing my patch. :-)

Toggle quote (2 lines)
> Missing full stop at the end of the subject line.

Okay, added a full-stop.

FWIW, I'm usually following those rules when writing commit messages:

The rules explicitly say that a committer should not add a full-stop at
the end of the first line.

Toggle quote (2 lines)
> This package actually has tests, could you enable them?

Unfortunately tests require JUnit5. :-/

Toggle quote (5 lines)
> The pom file references most of these as runtime dependencies, so we
> need to propagate them, so maven can find them.

> We also need to propagated the parent pom :)

Done.

However, 'guix lint' gave me the following warning:
Toggle snippet (3 lines)
/home/avp/src/dist/guix/gnu/packages/maven.scm:3943:2: maven-doxia-core@2.0.0-M2: propagated inputs plexus-parent-pom@5.1 and plexus-parent-pom@4.0 collide

I don't know yet how to properly fix that; probably the issue is that I
made all the inputs propagated, but I don't see how to differentiate
them looking at the Doxia Core 'pom.xml'.

Toggle quote (4 lines)
> This feels like a description of the whole Doxia project. Could you add
> maybe one sentence to explain how this package is related to the whole
> doxia project?

Done.

Toggle quote (3 lines)
> Lastly, I would put this package just below maven-doxia-parent-pom, but
> that's mostly aesthetic :)

Done.

Please find the updated patch attached.
From 749617e6c68d11edea3437cc72dc74013e851463 Mon Sep 17 00:00:00 2001
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
Date: Sat, 25 Jun 2022 13:20:02 +0300
Subject: [PATCH] gnu: Add maven-doxia-core.

* gnu/packages/maven.scm (maven-doxia-core): New variable.
---
gnu/packages/maven.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm
index e5831ee614..514ba97028 100644
--- a/gnu/packages/maven.scm
+++ b/gnu/packages/maven.scm
@@ -3938,3 +3938,32 @@ method and a end of tag by @code{xxxx_()} method.")
     (description "@samp{Doxia} is a content generation framework that provides
 powerful techniques for generating static and dynamic content, supporting a
 variety of markup languages.")))
+
+(define-public maven-doxia-core
+  (package
+    (inherit maven-doxia-sink-api)
+    (name "maven-doxia-core")
+    (arguments
+     `(#:jar-name "doxia-core.jar"
+       #:source-dir "doxia-core/src/main/java"
+       #:test-dir "doxia-core/src/test/java"
+       #:tests? #f ; tests require JUnit5
+       #:phases (modify-phases %standard-phases
+                  (replace 'install
+                    (install-from-pom "doxia-core/pom.xml")))))
+    (propagated-inputs (list maven-doxia-parent-pom
+                             maven-doxia-sink-api
+                             java-slf4j-api
+                             java-javax-inject
+                             java-plexus-utils
+                             java-eclipse-sisu-plexus
+                             java-commons-text))
+    (home-page "https://maven.apache.org/doxia/index.html")
+    (synopsis "Doxia core classes and interfaces")
+    (description
+     "Doxia is a content generation framework that provides powerful
+techniques for generating static and dynamic content, supporting a variety of
+markup languages.
+
+This package contains Doxia core classes and interfaces.")
+    (license license:asl2.0)))
-- 
2.25.1
- Artyom

--
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-----

iQEzBAEBCgAdFiEE0MLqwTMQgi2Y3rV86cWi2QiYoC8FAmK2/EIACgkQ6cWi2QiY
oC+sLAf/db+yzh7K53598Sv2LkHUVmWvi4IxROCp7R8THRWGuk0KKFpHBBsIhFMB
6TvnXBbuKJw4giMDmA8gUEvTdMyirFsohsGheUvet5hHl0x+u1e24fTJryNaqcbL
DEqDvhWEPOLk3ULW+21NMBMJgiHk9A+TCaa0/mqNkWcsNx9QL5GbB7KzpW2tjggV
JVq1tCK4qSyBrfhlnkgDdHGOTttClS8+cdLKY7GKUDIk57EXudYZ6gdCKToVL0Wq
OHPVwCYECI12WbtPf8rxP9NP8+JclK7LoKQ4mpjSySPhOH1x3Ao23I8u7TEBv6Rj
1gN8p+Br5oDVcJvapeXPxORkDcgE6A==
=KGco
-----END PGP SIGNATURE-----

J
J
Julien Lepiller wrote on 25 Jun 22:25 +0200
(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)(address . 56213-done@debbugs.gnu.org)
20220625222559.5e92b63f@sybil.lepiller.eu
Pushed to master as d039f9dc151eed8017a7f54682dbf713221b8005, thank you!

A few answers below:

Le Sat, 25 Jun 2022 15:14:58 +0300,
"Artyom V. Poptsov" <poptsov.artyom@gmail.com> a écrit :

Toggle quote (16 lines)
> Hello Julien.
>
> > Thanks for the patch!
>
> Thanks for taking your time for reviewing my patch. :-)
>
> > Missing full stop at the end of the subject line.
>
> Okay, added a full-stop.
>
> FWIW, I'm usually following those rules when writing commit messages:
> https://cbea.ms/git-commit/#end
>
> The rules explicitly say that a committer should not add a full-stop
> at the end of the first line.

We follow our own rules that mandate a full stop. I thought I could
send you to the manual, but apart a vague mention of the ChangeLog
format, I can't find the rules. Have we always applied such strict
rules without writing them down properly?

Toggle quote (12 lines)
>
> However, 'guix lint' gave me the following warning:
> --8<---------------cut here---------------start------------->8---
> /home/avp/src/dist/guix/gnu/packages/maven.scm:3943:2:
> maven-doxia-core@2.0.0-M2: propagated inputs plexus-parent-pom@5.1
> and plexus-parent-pom@4.0 collide --8<---------------cut
> here---------------end--------------->8---
>
> I don't know yet how to properly fix that; probably the issue is that
> I made all the inputs propagated, but I don't see how to differentiate
> them looking at the Doxia Core 'pom.xml'.

You can ignore these issues about parent poms. There's no real
collision except for the package name. No files in common between the
two packages, so that's fine. Nothing we can do anyway.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEHvsJCR8X0ozL+bE6U9RXstY27oIFAmK3b1cACgkQU9RXstY2
7oKi/Q/8Dhz8akLG818fVqtRoD6u4pqEjqkb+ZJWwmxyIhpm9KfTscqmcn09gGI+
DMjJC6xTPfiZMCaHA3v3ElF8RZISCjapOV/QvoWHxJDrPkjluQ/JUdoTTRMp6F4W
IytwPtvil0U6gaH7+2y7L0eMHLCUuiaQFn450Y4MmVIyhRd3hdvCt3gVsaB4Xxt/
UPTbVW2GYrGe1CYUKpst3Rh0OwDr9ezOKt2Dv1w9MDm0rkDOp0/4XXQq6tfpPEXD
SBNLH1Ab7pUEof0I53rtXKb7wsvANIn1pjS/fSz3MT7m3WOYfySuot0YT/vrOD9d
huR+o9eL8Fwrzj3/pmFDopy5XeMpP0+u1QYcebH+xrRS7EbSCZo+DyzpLIZ2zRt2
HvlY8c1r54vYks1+shPWIm6Lu166z3IXXySFKYsKquQtrmQzps+15nSgk9cfEgmq
XhWk9ihYZSs4OlqoKyErUTvVIcvXuVWS27QxcSver2+c4lDspT9+1rc/qWbDm6r7
4GSrB1WlHxWLfjhzL52dwlpBmvaQEN3FIT/oiD3bAPhLq4+LSan4HBBU50AyvIdg
eJ5rWjJBWbtCUVWeTvSBStzKBadR8ciuN/8CjLBpBSG4vUfKxppWhBBFu/PTHcrG
BJULGKMrdm7H/xnP04CO8XquNffcRMIFZRMtO3oCdiw6ZC4zX1Y=
=CebK
-----END PGP SIGNATURE-----


Closed
?
Your comment

This issue is archived.

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