-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.boot
76 lines (63 loc) · 2.34 KB
/
build.boot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
(set-env! :project 'adalab/search-lucene
:source-paths #{"src"}
:resource-paths #{"resources"}
:url "http://www.adalab-project.org/"
:dependencies '[[adalab/triple-loader "0.2.2-SNAPSHOT"]
[org.slf4j/slf4j-api "1.7.25"]
[org.clojure/tools.logging "0.3.1"]
[org.clojure/tools.cli "0.3.5"]
[org.eclipse.rdf4j/rdf4j-runtime "2.3-SNAPSHOT"]
[buddy/buddy-core "1.4.0"]
[ch.qos.logback/logback-classic "1.2.3"]
[degree9/boot-semver "1.7.0" :scope "test"]])
;; this line prevents confusing the deployer with dependencies` pom.xml files
(alter-var-root #'boot.pod/standard-jar-exclusions (constantly (conj boot.pod/standard-jar-exclusions #"/pom\.xml$")))
(require '[degree9.boot-semver :refer :all]
'[clojure.test :as test])
(def version-namespace (symbol "search.version"))
(task-options!
version {:minor 'zero :patch 'three :include false :generate version-namespace}
pom {:project (get-env :project) }
aot {:all true}
jar {:main 'search.lucene-search})
(deftask develop
"Build SNAPSHOT version of jar"
[]
(version :develop true :pre-release 'snapshot))
(deftask testing "Attach tests/ directory to classpath." []
(set-env! :source-paths #(conj % "tests/src" "tests/resources"))
identity)
(deftask run-test "Run unit tests"
[t test-name NAME str "Test to execute. Run all tests if not given."]
*opts*
(testing)
(println (format "Repositories: %s" (get-env :repositories)))
(use '[tests.basic]
'[tests.core])
(if (nil? (:test-name *opts*))
(do
(println "Run all tests")
(test/run-all-tests))
(do
(println (format "Run test: %s" (:test-name *opts*)))
(test/test-var (resolve (symbol (:test-name *opts*)))))))
(deftask build
"Build without dependencies" []
(comp
(pom)
(aot)
(jar)
(target)))
(deftask build-standalone
"Build standalone version"
[]
(comp
(pom)
(aot)
(uber)
(jar :file (format "%s-standalone.jar" (-> (get-env :project)
(str)
(.split "/")
(get 1)
)))
(target)))