summary refs log tree commit diff
diff options
context:
space:
mode:
authorJulien Lepiller <julien@lepiller.eu>2018-03-14 16:18:32 +0100
committerJulien Lepiller <julien@lepiller.eu>2018-04-05 19:47:56 +0200
commit5fe981dc83a2dded5a9b4a479e447642363a4d2f (patch)
tree07ce8e7ddca63261b425f000ea47dc1aa195bcc5
parent5f5b31c63f2752744b93cb56d600e0ea8116298f (diff)
downloadguix-5fe981dc83a2dded5a9b4a479e447642363a4d2f.tar.gz
gnu: Add java-commons-vfs.
* gnu/packages/java.scm (java-commons-vfs): New variable.
-rw-r--r--gnu/packages/java.scm49
1 files changed, 49 insertions, 0 deletions
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index f40665ed66..9efb8d2054 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -9374,3 +9374,52 @@ graphs, and pie charts.")
 implementation.  It also provides reusable components for client-side
 authentication, HTTP state management, and HTTP connection management.")
     (license license:asl2.0)))
+
+(define-public java-commons-vfs
+  (package
+    (name "java-commons-vfs")
+    (version "2.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://apache/commons/vfs/source/"
+                                  "commons-vfs2-distribution-" version "-src.tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin
+                  (for-each delete-file
+                            (find-files "." "\\.jar$"))
+                  #t))))
+    (build-system ant-build-system)
+    (arguments
+     `(#:jar-name "commons-vfs.jar"
+       #:source-dir "commons-vfs2/src/main/java"
+       #:test-dir "commons-vfs2/src/test"
+       ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
+       #:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'remove-hadoop-and-webdav
+           ; Remove these files as they are not required and depend on difficult
+           ; packages.
+           (lambda _
+             (for-each delete-file-recursively
+               '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
+                 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs")))))))
+    (inputs
+     `(("java-commons-collections4" ,java-commons-collections4)
+       ("java-commons-compress" ,java-commons-compress)
+       ("java-commons-httpclient" ,java-commons-httpclient)
+       ("java-commons-logging-minimal" ,java-commons-logging-minimal)
+       ("java-commons-net" ,java-commons-net)
+       ("java-jsch" ,java-jsch)))
+    (home-page "http://commons.apache.org/proper/commons-vfs/")
+    (synopsis "Java filesystem library")
+    (description "Commons VFS provides a single API for accessing various
+different file systems.  It presents a uniform view of the files from various
+different sources, such as the files on local disk, on an HTTP server, or
+inside a Zip archive.")
+    (license license:asl2.0)))