aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/web.scm
diff options
context:
space:
mode:
authorJulien Lepiller <julien@lepiller.eu>2017-10-15 00:07:09 +0200
committerJulien Lepiller <julien@lepiller.eu>2017-10-23 22:54:30 +0200
commit339bef37cd2fce78333ac1c52060c0b03db62aae (patch)
treefc58dd832b60f879adf2935cd1f838406ead8136 /gnu/packages/web.scm
parent91072287a6b07a9fd6a43c717cc6fcecaa7e77c9 (diff)
downloadguix-339bef37cd2fce78333ac1c52060c0b03db62aae.tar
guix-339bef37cd2fce78333ac1c52060c0b03db62aae.tar.gz
gnu: Add java-eclipse-jetty-test-helper.
* gnu/packages/web.scm (java-eclipse-jetty-test-helper): New variable.
Diffstat (limited to 'gnu/packages/web.scm')
-rw-r--r--gnu/packages/web.scm51
1 files changed, 51 insertions, 0 deletions
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index bc0c606f86..b1d267dc49 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -5436,3 +5436,54 @@ WebSocket")
Servlet, JavaServer Pages, Java Expression Language and Java WebSocket
technologies.")
(license l:asl2.0)))
+
+(define-public java-eclipse-jetty-test-helper
+ (package
+ (name "java-eclipse-jetty-test-helper")
+ (version "4.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/eclipse/jetty.toolchain/"
+ "archive/jetty-test-helper-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1jd6r9wc26fa11si4rn2gvy8ml8q4zw1nr6v04mjp8wvwpgvzwx5"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "eclipse-jetty-test-helper.jar"
+ #:source-dir "src/main/java"
+ #:test-dir "src/test"
+ #:jdk ,icedtea-8
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'chdir
+ (lambda _
+ (chdir "jetty-test-helper")))
+ (add-before 'build 'fix-paths
+ (lambda _
+ ;; TODO:
+ ;; This file assumes that the build directory is named "target"
+ ;; but it is not the case with our ant-build-system. Once we have
+ ;; maven though, we will have to rebuild this package because this
+ ;; assumption is correct with maven-build-system.
+ (substitute*
+ "src/main/java/org/eclipse/jetty/toolchain/test/MavenTestingUtils.java"
+ (("\"target\"") "\"build\"")
+ (("\"tests\"") "\"test-classes\""))
+ ;; Tests assume we are building with maven, so that the build
+ ;; directory is named "target", and not "build".
+ (with-directory-excursion "src/test/java/org/eclipse/jetty/toolchain/test"
+ (substitute* '("FSTest.java" "OSTest.java" "TestingDirTest.java"
+ "MavenTestingUtilsTest.java")
+ (("target/tests") "build/test-classes")
+ (("\"target") "\"build")))
+ #t)))))
+ (inputs
+ `(("junit" ,java-junit)
+ ("hamcrest" ,java-hamcrest-all)))
+ (home-page "https://www.eclipse.org/jetty/")
+ (synopsis "Helper classes for jetty tests")
+ (description "This packages contains helper classes for testing the Jetty
+Web Server.")
+ ;; This program is licensed under both epl and asl.
+ (license (list l:epl1.0 l:asl2.0))))