-
Notifications
You must be signed in to change notification settings - Fork 108
Expand file tree
/
Copy pathproject.clj
More file actions
168 lines (157 loc) · 9.94 KB
/
Copy pathproject.clj
File metadata and controls
168 lines (157 loc) · 9.94 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
#_{:clj-kondo/ignore [:unresolved-namespace]}
(def version
"Parses the version out of this file to use in names of referenced files"
(let [project-clj-lines (-> "project.clj" slurp (clojure.string/split #"\n"))]
(-> (filter (partial re-find #"^\(defproject") project-clj-lines)
first
(clojure.string/split #" ")
last
(clojure.string/replace "\"" ""))))
(def uberjar-name
(str "target/cmr-es-spatial-plugin-" version "-standalone.jar"))
(def plugin-zip-name
(str "target/cmr-es-spatial-plugin-" version ".zip"))
(def es-deps-uberjar-name
(str "cmr-es-spatial-plugin-deps-" version "-standalone.jar"))
(def es-deps-jar-name
(str "cmr-es-spatial-plugin-deps-" version ".jar"))
(def es-deps-target-path
"es-deps")
(def elastic-version "8.19.14")
(defproject nasa-cmr/cmr-es-spatial-plugin "0.1.0-SNAPSHOT"
:description "A Elastic Search plugin that enables spatial search entirely within elastic."
:url "https://github.com/nasa/Common-Metadata-Repository/tree/master/es-spatial-plugin"
:jvm-opts ^:replace ["-server"
"-Dclojure.compiler.direct-linking=true"]
:plugins [[lein-shell "0.5.0"]]
:profiles {:security {:plugins [[com.livingsocial/lein-dependency-check "1.4.1"]]
:dependency-check {:output-format [:all]
:suppression-file "resources/security/suppression.xml"}}
:provided {:dependencies [[nasa-cmr/cmr-common-lib "0.1.1-SNAPSHOT"
:exclusions [[com.fasterxml.jackson.dataformat/jackson-dataformat-yaml]
[gov.nasa.earthdata/quartzite]]]
[nasa-cmr/cmr-spatial-lib "0.1.0-SNAPSHOT"
:exclusions [[com.fasterxml.jackson.dataformat/jackson-dataformat-yaml]
[gov.nasa.earthdata/quartzite]]]
;; Elastic library
[org.apache.logging.log4j/log4j-api "2.25.4"]
[org.apache.logging.log4j/log4j-core "2.25.4"]
[org.elasticsearch/elasticsearch-lz4 ~elastic-version
:exclusions [org.lz4/lz4-java]]
[org.elasticsearch/elasticsearch ~elastic-version
:exclusions [net.jpountz.lz4/lz4
org.apache.logging.log4j/log4j-api
org.apache.logging.log4j/log4j-core
org.lz4/lz4-java
org.jruby.joni/joni
org.jruby.jcodings/jcodings]]
[at.yawk.lz4/lz4-java "1.11.1"]
[org.clojure/tools.reader "1.3.2"]
[org.yaml/snakeyaml "1.31"]]}
:es-deps {:dependencies [[nasa-cmr/cmr-spatial-lib "0.1.0-SNAPSHOT"
;; These exclusions will be provided by elasticsearch.
:exclusions [[com.dadrox/quiet-slf4j]
[com.fasterxml.jackson.dataformat/jackson-dataformat-yaml]
[commons-codec]
[commons-logging]
[org.ow2.asm/asm]
[org.ow2.asm/asm-all]
;; Both lz4 libraries are linked together. yawk
;; is supposed to be a drop in replacement and
;; uses the same package name as the original.
[net.jpountz.lz4/lz4]
[at.yawk.lz4/lz4-java]
[org.locationtech.jts/jts-core]
[org.locationtech.jts.JTSVersion]
[org.slf4j/slf4j-api]
[gov.nasa.earthdata/quartzite]]]
[org.clojure/tools.reader "1.3.2"]
[org.clojure/clojure "1.11.2"]]
:target-path ~es-deps-target-path
:uberjar-name ~es-deps-uberjar-name
:uberjar-exclusions [#"(?i)^org/apache/commons/io/.*"]
:jar-name ~es-deps-jar-name
:aot [cmr.elasticsearch.plugins.spatial.script.core
cmr.elasticsearch.plugins.spatial.factory.lfactory
cmr.elasticsearch.plugins.spatial.factory.core
cmr.elasticsearch.plugins.spatial.engine.core
cmr.elasticsearch.plugins.spatial.plugin]}
:es-plugin {:aot [cmr.elasticsearch.plugins.spatial.script.core
cmr.elasticsearch.plugins.spatial.factory.lfactory
cmr.elasticsearch.plugins.spatial.factory.core
cmr.elasticsearch.plugins.spatial.engine.core
cmr.elasticsearch.plugins.spatial.plugin]}
:dev {:dependencies [[criterium "0.4.4"]
[cheshire "5.12.0"]
[org.clojure/tools.reader "1.3.2"]
[nasa-cmr/cmr-common-lib "0.1.1-SNAPSHOT"]
[nasa-cmr/cmr-spatial-lib "0.1.0-SNAPSHOT"]
[org.elasticsearch/elasticsearch ~elastic-version]
[org.clojars.gjahad/debug-repl "0.3.3"]
[org.clojure/tools.nrepl "0.2.13"]
[org.clojure/tools.namespace "0.2.11"]
[org.yaml/snakeyaml "1.31"]]
:aot [cmr.elasticsearch.plugins.spatial.script.core
cmr.elasticsearch.plugins.spatial.factory.lfactory
cmr.elasticsearch.plugins.spatial.factory.core
cmr.elasticsearch.plugins.spatial.engine.core
cmr.elasticsearch.plugins.spatial.plugin]
:global-vars {*warn-on-reflection* false
*assert* false}}
:static {}
:lint {:source-paths ^:replace ["src"]
:test-paths ^:replace []
:plugins [[jonase/eastwood "1.4.2"]
[lein-ancient "0.7.0"]
[lein-bikeshed "0.5.0"]
[lein-kibit "0.1.6"]]}
;; The following profile is overriden on the build server or in the user's
;; ~/.lein/profiles.clj file.
:internal-repos {}
:kaocha {:dependencies [[lambdaisland/kaocha "1.0.732"]
[lambdaisland/kaocha-cloverage "1.0.75"]
[lambdaisland/kaocha-junit-xml "0.0.76"]]}}
:aliases {"install-es-deps" ["do"
"with-profile" "es-deps,provided" "clean,"
"with-profile" "es-deps,provided" "uberjar,"
;; target-path is being ignored for uberjar. move uberjar to es-deps-target-path.
["shell" "echo" "inst-es-deps"]
"shell" "mv" ~(str "target/" es-deps-uberjar-name) ~es-deps-target-path]
"install-es-plugin" ["do"
["shell" "echo" "inst-es-plugin"]
"with-profile" "es-plugin,provided" "clean,"
"with-profile" "es-plugin,provided" "uberjar,"]
"package-es-plugin" ["do"
"install-es-deps"
["shell" "echo" "pack-es-deps"]
"shell"
"zip"
"-j"
~plugin-zip-name
~(str es-deps-target-path "/" es-deps-uberjar-name)
"resources/plugin/plugin-descriptor.properties"]
"build-all" ["do"
["shell" "echo" "build-all"]
"install-es-deps,"
"install-es-plugin,"]
;; Kaocha test aliases
;; refer to tests.edn for test configuration
"kaocha" ["with-profile" "+kaocha" "run" "-m" "kaocha.runner"]
"itest" ["kaocha" "--focus" ":integration"]
"utest" ["kaocha" "--focus" ":unit"]
"ci-test" ["kaocha" "--profile" ":ci"]
"ci-itest" ["itest" "--profile" ":ci"]
"ci-utest" ["utest" "--profile" ":ci"]
"package-all" ["do"
["shell" "echo" "package-all"]
"install-es-deps,"
"package-es-plugin,"
"shell"
"zip"
"-j"
"target/spatial-plugin-including-deps.zip"
~plugin-zip-name
~(str es-deps-target-path "/" es-deps-uberjar-name)]
"check-sec" ["with-profile" "security" "dependency-check"]
;; Placeholder for future docs and enabler of top-level alias
"generate-static" ["with-profile" "static" "shell" "echo" "no generate-static action needed"]})