Subject: [bug#57726] [PATCH] gnu: Add java-eclipse-sisu-maven-plugin.

From: "Artyom V. Poptsov" <[email-masked]>
Date: Sat, 17 Sep 2022 00:28:00 +0300

Hello Julien.

> The name implies this is a plugin for maven. The way you build it,
> maven will not be able to use it because it's missing some metadata.

Okay.  I moved the package to (gnu packages maven) as it seems to be
the more appropriate place for Maven plugins indeed.

> You can use generate-plugin.xml to generate the required file. The
> parser might not work properly, I'll have a look if it doesn't work, but
> that might take some time.

Thanks for the hint, I modified the patch so now the package uses
"generate-plugin.xml".

Please find the new patch attached.
From 14b58121576e154b4bf96564dffb9fd09f5e0b81 Mon Sep 17 00:00:00 2001
From: "Artyom V. Poptsov" <[email-masked]>
Date: Sat, 17 Sep 2022 00:23:33 +0300
Subject: [PATCH] gnu: Add maven-sisu-plugin.

* gnu/packages/maven.scm (maven-sisu-plugin): New variable.
---
 gnu/packages/maven.scm | 45 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm
index 28ec4eb9a8..b897c6ed34 100644
--- a/gnu/packages/maven.scm
+++ b/gnu/packages/maven.scm
@@ -27,6 +27,7 @@ (define-module (gnu packages maven)
   #:use-module (guix git-download)
   #:use-module (guix utils)
   #:use-module (guix build-system ant)
+  #:use-module (guix gexp)
   #:use-module (gnu packages)
   #:use-module (gnu packages base)
   #:use-module (gnu packages compression)
@@ -3012,6 +3013,50 @@ (define-public maven-enforcer-plugin
            maven-plugin-annotations
            maven-enforcer-parent-pom))))
 
+(define-public maven-sisu-plugin
+  (package
+    (name "maven-sisu-plugin")
+    (version "0.3.5")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/eclipse/sisu.mojos/")
+                    (commit (string-append "releases/" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "00hb7v6hz8jg0mgkj3cl0nmqz49za4k2a0rbjr4gdhy2m7f34sq3"))))
+    (build-system ant-build-system)
+    (arguments
+     (list #:jar-name "maven-sisu-plugin.jar"
+           #:source-dir "src"
+           #:tests? #f ;no tests
+           #:phases #~(modify-phases %standard-phases
+                        (add-before 'build 'generate-plugin.xml
+                          (generate-plugin.xml "pom.xml" "sisu"
+                           "src/main/java/org/eclipse/sisu/mojos/"
+                           (list (list "IndexMojo.java")
+                                 (list "MainIndexMojo.java")
+                                 (list "TestIndexMojo.java"))))
+                        (replace 'install
+                          (install-from-pom "pom.xml")))))
+    (propagated-inputs (list java-sonatype-oss-parent-pom-9))
+    (inputs (list maven-artifact
+                  maven-plugin-api
+                  maven-plugin-annotations
+                  maven-core
+                  maven-common-artifact-filters
+                  java-slf4j-nop
+                  java-eclipse-sisu-inject
+                  java-plexus-utils
+                  java-plexus-build-api
+                  java-slf4j-api))
+    (home-page "https://www.eclipse.org/sisu/")
+    (synopsis "Maven plugin that generates annotation indexes for Sisu")
+    (description "Maven plugin that generates annotation indexes for Sisu to
+avoid classpath scanning at runtime.")
+    (license license:epl1.0)))
+
 (define-public maven-artifact-transfer
   (package
     (name "maven-artifact-transfer")
-- 
2.34.1

- Artyom

-- 
Artyom "avp" Poptsov <[email-masked]>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F