Subject: [PATCH 04/14] gnu: Add java-mime4j-core.

From: Hartmut Goebel <[email-masked]>
Date: Sun, 22 Dec 2024 23:51:36 +0100

* gnu/packages/java.scm (java-mime4j-core): New variable.
---
 gnu/packages/java.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index ed895d8dbf..e7b72eeb0d 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -21,6 +21,7 @@
 ;;; Copyright © 2022 Artyom V. Poptsov <[email-masked]>
 ;;; Copyright © 2024 Paul A. Patience <[email-masked]>
 ;;; Copyright © 2024 Raven Hallsby <[email-masked]>
+;;; Copyright © 2024 Hartmut Goebel <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -11835,6 +11836,35 @@ (define-public java-mapdb
 disk storage or off-heap memory.")
     (license license:bsd-3)))
 
+(define-public java-mime4j-core
+  (package
+    (name "java-mime4j-core")
+    (version "0.8.11")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://apache/james/mime4j/" version
+                                  "/james-mime4j-sources-" version ".zip"))
+              (sha256
+               (base32
+                "1ba1cglpjll3dggahadh8x23s6bwfzpgljyl0scspyn8g26k9ha4"))))
+    (build-system ant-build-system)
+    (arguments
+     `(#:tests? #f  ;; has no tests
+       #:source-dir "core/src/main/java"
+       #:jar-name "apache-mime4j-core.jar"))
+    (native-inputs
+     (list java-commons-io--latest ;; requries >= 2.7
+           java-junit
+           unzip))
+    (home-page "https://james.apache.org/mime4j/apache-mime4j-core/")
+    (synopsis "Java stream based MIME message parser")
+    (description "Apache James Mime4J provides a parser, MimeStreamParser, for
+e-mail message streams in plain rfc822 and MIME format.  The parser uses a
+callback mechanism to report parsing events such as the start of an entity
+header, the start of a body, etc.  If you are familiar with the SAX XML parser
+interface you should have no problem getting started with mime4j.")
+    (license license:asl2.0)))
+
 (define-public java-jeromq
   (package
     (name "java-jeromq")
-- 
2.41.1