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
|
(def jetty-version "9.x")
(defproject puppetlabs/trapperkeeper-webserver-jetty9 "4.5.2"
:description "A jetty9-based webserver implementation for use with the puppetlabs/trapperkeeper service framework."
:url "https://github.com/puppetlabs/trapperkeeper-webserver-jetty9"
:license {:name "Apache License, Version 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0"}
:min-lein-version "2.9.1"
;; Abort when version ranges or version conflicts are detected in
;; dependencies. Also supports :warn to simply emit warnings.
;; requires lein 2.2.0+.
:pedantic? :abort
:dependencies [[org.clojure/clojure "1.x"]
[org.clojure/java.jmx "debian"]
[org.clojure/tools.logging "debian"]
[org.codehaus.janino/janino "debian"]
[org.flatland/ordered "debian"]
[javax.servlet/javax.servlet-api "debian"]
;; Jetty Webserver
[org.eclipse.jetty/jetty-server ~jetty-version
:exclusions [org.eclipse.jetty.orbit/javax.servlet]]
[org.eclipse.jetty/jetty-servlet ~jetty-version]
[org.eclipse.jetty/jetty-servlets ~jetty-version]
[org.eclipse.jetty/jetty-webapp ~jetty-version]
[org.eclipse.jetty/jetty-proxy ~jetty-version]
[org.eclipse.jetty/jetty-jmx ~jetty-version]
[org.eclipse.jetty.websocket/websocket-server "debian"]
[prismatic/schema "debian"]
[ring/ring-servlet "debian"]
[ring/ring-codec "debian"]
[puppetlabs/ssl-utils "debian"]
[puppetlabs/kitchensink "debian"]
[puppetlabs/trapperkeeper "debian"]
[puppetlabs/i18n "debian"]
[puppetlabs/trapperkeeper-filesystem-watcher "debian"]
[org.slf4j/jul-to-slf4j "debian"]]
:source-paths ["src"]
:java-source-paths ["java"]
:plugins [[puppetlabs/i18n "debian" :exclusions [org.clojure/clojure]]]
:deploy-repositories [["releases" {:url "https://clojars.org/repo"
:username :env/clojars_jenkins_username
:password :env/clojars_jenkins_password
:sign-releases false}]]
;; By declaring a classifier here and a corresponding profile below we'll get an additional jar
;; during `lein jar` that has all the code in the test/ directory. Downstream projects can then
;; depend on this test jar using a :classifier in their :dependencies to reuse the test utility
;; code that we have.
:classifiers [["test" :testutils]]
:test-paths ["test/clj"]
:profiles {:defaults {:source-paths ["examples/multiserver_app/src"
"examples/ring_app/src"
"examples/servlet_app/src/clj"
"examples/war_app/src"
"examples/webrouting_app/src"]
:java-source-paths ["examples/servlet_app/src/java"
"test/java"]
:dependencies [[puppetlabs/http-client "debian"]
[puppetlabs/kitchensink "debian" :classifier "test"]
[puppetlabs/trapperkeeper "debian" :classifier "test"]
[org.clojure/tools.namespace "debian"]
[ring/ring-core "debian"]]
:resource-paths ["dev-resources"]
:jvm-opts ["-Djava.util.logging.config.file=dev-resources/logging.properties"]}
:dev [:defaults
{:dependencies [[org.bouncycastle/bcpkix "debian"]]}]
;; per https://github.com/technomancy/leiningen/issues/1907
;; the provided profile is necessary for lein jar / lein install
:provided {:dependencies [[org.bouncycastle/bcpkix "debian"]]
:resource-paths ["dev-resources"]}
;; a pseudo dev profile that can be combined with the FIPS profiling for testing only
:pseudo-dev {:dependencies [
[stylefruits/gniazdo nil :exclusions [org.eclipse.jetty.websocket/websocket-api
org.eclipse.jetty.websocket/websocket-client
org.eclipse.jetty/jetty-util]]]}
:fips [:defaults ; merge in the default profile
{:dependencies [[org.bouncycastle/bcpkix-fips]
[org.bouncycastle/bc-fips]
[org.bouncycastle/bctls-fips]]
:exclusions [[org.bouncycastle/bcpkix-jdk18on]]
;; this only ensures that we run with the proper profiles
;; during testing. This JVM opt will be set in the puppet module
;; that sets up the JVM classpaths during installation.
:jvm-opts ~(let [version (System/getProperty "java.version")
[major minor _] (clojure.string/split version #"\.")
unsupported-ex (ex-info "Unsupported major Java version. Expects 11 or 17."
{:major major
:minor minor})]
(condp = (java.lang.Integer/parseInt major)
1 (if (= 8 (java.lang.Integer/parseInt minor))
["-Djava.security.properties==dev-resources/jdk8-fips-security"]
(throw unsupported-ex))
11 ["-Djava.security.properties==dev-resources/jdk11-fips-security"]
17 ["-Djava.security.properties==dev-resources/jdk11-fips-security"]
(do)))}]
:testutils {:source-paths ^:replace ["test/clj"]
:java-source-paths ^:replace ["test/java"]}}
:main puppetlabs.trapperkeeper.main
:repositories [["puppet-releases" "https://artifactory.delivery.puppetlabs.net/artifactory/list/clojure-releases__local/"]
["puppet-snapshots" "https://artifactory.delivery.puppetlabs.net/artifactory/list/clojure-snapshots__local/"]]
:local-repo "debian/maven-repo")
|