[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
13/32: gnu: Add java-joda-time.
From: |
julien lepiller |
Subject: |
13/32: gnu: Add java-joda-time. |
Date: |
Sat, 10 Feb 2018 13:05:12 -0500 (EST) |
roptat pushed a commit to branch master
in repository guix.
commit 0158ea8a82bf60555665addc17dc8895bf4efe36
Author: Julien Lepiller <address@hidden>
Date: Sat Nov 18 21:48:44 2017 +0100
gnu: Add java-joda-time.
* gnu/packages/java.scm (java-joda-time): New variable.
---
gnu/packages/java.scm | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index e73cd3d..0c8c2ab 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -8114,3 +8114,67 @@ Dependency Injection (CDI).")
conversion between Objects and Strings. It is not intended to tackle the
wider problem of Object to Object transformation.")
(license license:asl2.0)))
+
+(define-public java-joda-time
+ (package
+ (name "java-joda-time")
+ (version "2.9.9")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
"https://github.com/JodaOrg/joda-time/archive/v"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "java-joda-time.jar"
+ #:source-dir "src/main/java"
+ #:test-include (list "**/Test*.java")
+ ;; There is no runnable test in these files
+ #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'build 'build-resources
+ (lambda _
+ (mkdir-p "build/classes/org/joda/time/tz/data")
+ (mkdir-p "build/classes/org/joda/time/format")
+ ;; This will produce an exception, but it's all right.
+ (zero? (system* "java" "-cp"
+ (string-append "build/classes:" (getenv
"CLASSPATH"))
+ "org.joda.time.tz.ZoneInfoCompiler"
+ "-src" "src/main/java/org/joda/time/tz/src"
+ "-dst" "build/classes/org/joda/time/tz/data"
+ "africa" "antarctica" "asia" "australasia"
+ "europe" "northamerica" "southamerica"
+ "pacificnew" "etcetera" "backward" "systemv"))
+ (for-each (lambda (f)
+ (copy-file f (string-append
+ "build/classes/org/joda/time/format/"
+ (basename f))))
+ (find-files "src/main/java/org/joda/time/format"
".*.properties"))
+ #t))
+ (add-before 'install 'regenerate-jar
+ (lambda _
+ ;; We need to regenerate the jar file to add generated data.
+ (delete-file "build/jar/java-joda-time.jar")
+ (zero? (system* "ant" "jar"))))
+ (add-before 'check 'copy-test-resources
+ (lambda _
+ (mkdir-p "build/test-classes/org/joda/time/tz/data")
+ (copy-file "src/test/resources/tzdata/ZoneInfoMap"
+ "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
+ (copy-recursively "src/test/resources" "build/test-classes")
+ #t)))))
+ (inputs
+ `(("java-joda-convert" ,java-joda-convert)))
+ (native-inputs
+ `(("java-junit" ,java-junit)
+ ("java-hamcrest-core" ,java-hamcrest-core)
+ ("tzdata" ,tzdata)))
+ (home-page "http://www.joda.org/joda-time/")
+ (synopsis "Replacement for the Java date and time classes")
+ (description "Joda-Time is a replacement for the Java date and time
+classes prior to Java SE 8.")
+ (license license:asl2.0)))
- 14/32: licenses: Add W3C license., (continued)
- 14/32: licenses: Add W3C license., julien lepiller, 2018/02/10
- 07/32: gnu: Add java-jansi-native., julien lepiller, 2018/02/10
- 30/32: gnu: Add java-jline., julien lepiller, 2018/02/10
- 18/32: gnu: Add java-jaxen-bootstrap., julien lepiller, 2018/02/10
- 28/32: gnu: Add java-jdom2., julien lepiller, 2018/02/10
- 27/32: gnu: Add java-jettison., julien lepiller, 2018/02/10
- 11/32: gnu: Add java-cdi-api., julien lepiller, 2018/02/10
- 15/32: gnu: Add java-jaxp., julien lepiller, 2018/02/10
- 12/32: gnu: Add java-joda-convert., julien lepiller, 2018/02/10
- 10/32: gnu: Add java-jboss-interceptors-api-spec., julien lepiller, 2018/02/10
- 13/32: gnu: Add java-joda-time.,
julien lepiller <=
- 22/32: gnu: Add java-xmlpull2., julien lepiller, 2018/02/10
- 19/32: gnu: Add java-xom., julien lepiller, 2018/02/10
- 25/32: gnu: Add java-kxml2., julien lepiller, 2018/02/10
- 32/32: gnu: Add java-xmlunit-legacy., julien lepiller, 2018/02/10
- 23/32: gnu: Add java-dom4j., julien lepiller, 2018/02/10
- 29/32: gnu: Add java-xstream., julien lepiller, 2018/02/10
- 31/32: gnu: Add java-xmlunit., julien lepiller, 2018/02/10
- 26/32: gnu: Add java-stax., julien lepiller, 2018/02/10
- 24/32: gnu: Add java-jaxen., julien lepiller, 2018/02/10
- 20/32: gnu: Add java-xsdlib., julien lepiller, 2018/02/10