From 0c088eb67d43680f6a62a15fc3b57a89b57b6574 Mon Sep 17 00:00:00 2001 From: Stephen Clayton Date: Thu, 3 Aug 2017 16:25:00 +0200 Subject: [PATCH] remove unused imports --- README.md | 2 +- bin/install.sh | 40 +++++++++++++++++++ project.clj | 2 +- .../clojure/de/mpg/shh/util_webdav/client.clj | 5 +-- 4 files changed, 43 insertions(+), 6 deletions(-) create mode 100755 bin/install.sh diff --git a/README.md b/README.md index bd59d53..ad72332 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ EOF # copy our java trust store and add our self signed cert cp /Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/security/cacerts . #echo -n | openssl s_client -connect foo.shh.mpg.de:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > foo.crt -# The above fails becuase this server has multiple identities (i.e. the first is bar-foo.mpg.shh.de but we want foo.shh.mpg.de) +# The above fails becuase this server has multiple identities (i.e. the first is bar-foo.shh.mpg.de but we want foo.shh.mpg.de) echo -n | openssl s_client -connect foo.shh.mpg.de:443 -servername foo.shh.mpg.de | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > foo.crt keytool -import -keystore cacerts -trustcacerts -storepass changeit -noprompt -alias foo -file foo.crt # test using our trust store copy with our self signed cert installed diff --git a/bin/install.sh b/bin/install.sh new file mode 100755 index 0000000..6480d86 --- /dev/null +++ b/bin/install.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash + +numArgs=$# + +set -e -o pipefail + +function die() { + MESG="${1:-Died}" + echo "${MESG}" >&2 + exit 1 +} + + +if [[ !$numArgs -gt 0 ]]; then + die "Please supply a version number e.g. 0.0.1" +fi + +group="de.mpg.shh" +artifact="util-webdav" +version=$1 + +lein clean +lein deps +lein jar +lein pom + +test -f "target/${artifact}-${version}.jar" || die "Build failed: jar not found" + +lein localrepo install -p pom.xml target/${artifact}-${version}.jar ${group}/${artifact} ${version} + +# create sha1sums for the jar and pom +group_path=$(echo "${group}" | tr "." "/") +jar_path="${HOME}/.m2/repository/${group_path}/${artifact}/${version}/${artifact}-${version}.jar" +jar_sum_path="${jar_path}.sha1" + +pom_path="${HOME}/.m2/repository/${group_path}/${artifact}/${version}/${artifact}-${version}.pom" +pom_sum_path="${pom_path}.sha1" + +shasum ${jar_path} | cut -d ' ' -f 1 > ${jar_sum_path} +shasum ${pom_path} | cut -d ' ' -f 1 > ${pom_sum_path} diff --git a/project.clj b/project.clj index 00218d4..943c7b0 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject de.mpg.shh/webdav "0.0.1" +(defproject de.mpg.shh/util-webdav "0.0.1" :description "LIMS for ssh" :url "http://www.shh.mpg.de/" :license {:name "Eclipse Public License" diff --git a/src/main/clojure/de/mpg/shh/util_webdav/client.clj b/src/main/clojure/de/mpg/shh/util_webdav/client.clj index cab1d1b..2a8abf9 100644 --- a/src/main/clojure/de/mpg/shh/util_webdav/client.clj +++ b/src/main/clojure/de/mpg/shh/util_webdav/client.clj @@ -4,10 +4,7 @@ [clojure.edn :as edn]) (import [java.util Collections] [java.nio.file Files] - [java.io ByteArrayInputStream] - [org.apache.http.conn.ssl SSLContextBuilder] - [org.apache.http.impl.client HttpClients] - [com.github.sardine.impl SardineImpl SardineException SardineRedirectStrategy] + [com.github.sardine.impl SardineImpl SardineException] [com.github.sardine.util SardineUtil] [javax.xml.namespace QName]))