Skip to content

Instantly share code, notes, and snippets.

@dmuylwyk
Created March 4, 2016 19:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmuylwyk/2093a61acf95467466f6 to your computer and use it in GitHub Desktop.
Save dmuylwyk/2093a61acf95467466f6 to your computer and use it in GitHub Desktop.
Example project.clj for troubleshooting deployment to Artifactory [SOLVED].
(defproject <groupId>/<artifactId> "1.0.1-SNAPSHOT"
:description "<description>"
:url "http://<hostname>:3443"
:license "<license>"
:dependencies [[org.clojure/clojure "1.8.0"]
[selmer "1.0.0"]
[markdown-clj "0.9.85"]
[luminus/config "0.5"]
[ring-middleware-format "0.7.0"]
[metosin/ring-http-response "0.6.5"]
[bouncer "1.0.0"]
[org.webjars/bootstrap "4.0.0-alpha.2"]
[org.webjars/font-awesome "4.5.0"]
[org.webjars.bower/tether "1.1.1"]
[org.webjars/jquery "2.2.0"]
[org.clojure/tools.logging "0.3.1"]
[com.taoensso/tower "3.0.2"]
[compojure "1.4.0"]
[ring-webjars "0.1.1"]
[ring/ring-defaults "0.1.5"]
[ring "1.4.0" :exclusions [ring/ring-jetty-adapter]]
[mount "0.1.8"]
[luminus-nrepl "0.1.2"]
[buddy "0.10.0"]
[migratus "0.8.9"]
[conman "0.2.9"]
[org.clojure/clojurescript "1.7.228" :scope "provided"]
[reagent "0.5.1"]
[reagent-forms "0.5.13"]
[reagent-utils "0.1.7"]
[secretary "1.2.3"]
[org.clojure/core.async "0.2.374"]
[cljs-ajax "0.5.3"]
[metosin/compojure-api "0.24.5"]
[metosin/ring-swagger-ui "2.1.4-0"]
[org.webjars/webjars-locator-jboss-vfs "0.1.0"]
[luminus-immutant "0.1.0"]
[luminus-log4j "0.1.2"]
[com.ibm.db2/db2jcc4 "10.5.0.6"]
[org.clojars.pntblnk/clj-ldap "0.0.9"]
[commons-codec "1.10"]
[ring/ring-ssl "0.2.1"]]
:min-lein-version "2.0.0"
:uberjar-name "<artifactId>.jar"
:jvm-opts ["-server"]
:resource-paths ["resources" "target/cljsbuild"]
:main <artifactId>.core
:plugins [[lein-environ "1.0.1"]
[lein-cljsbuild "1.1.1"]
[lein-pprint "1.1.1"]]
:repositories [["releases" {:url "http://artifactory:8080/artifactory/libs-releases-local/"
:creds :gpg
}]]
;;run all three with release.sh
:aliases {"release-prepare!" ["do"
["vcs" "assert-committed"]
["change" "version" "leiningen.release/bump-version" "release"]
["vcs" "commit"]
["vcs" "tag" "--no-sign"]
["uberjar"]]
"release-deploy!" ["deploy" "releases" "<groupId>/<artifactId>" :project/version "./target/<artifactId>.jar"]
"release-push!" ["do"
["change" "version" "leiningen.release/bump-version"]
["vcs" "commit"]
["vcs" "push"]]}
;;using :aliases with release.sh to complete :release-tasks
;;resolves error "password prompts are not supported when ran after other (potentially) interactive tasks"
:release-tasks [["vcs" "assert-committed"]
["change" "version" "leiningen.release/bump-version" "release"]
["vcs" "commit"]
["vcs" "tag"]
["deploy"]
["change" "version" "leiningen.release/bump-version"]
["vcs" "commit"]
["vcs" "push"]]
:clean-targets ^{:protect false} [:target-path [:cljsbuild :builds :app :compiler :output-dir] [:cljsbuild :builds :app :compiler :output-to]]
:cljsbuild
{:builds
{:app
{:source-paths ["src-cljs"]
:compiler
{:output-to "target/cljsbuild/public/js/app.js"
:output-dir "target/cljsbuild/public/js/out"
:externs ["react/externs/react.js"]
:pretty-print true}}}}
:profiles
{:uberjar {:omit-source true
:env {:production true}
:prep-tasks ["compile" ["cljsbuild" "once"]]
:cljsbuild
{:builds
{:app
{:source-paths ["env/prod/cljs"]
:compiler
{:optimizations :advanced
:pretty-print false
:closure-warnings
{:externs-validation :off :non-standard-jsdoc :off}}}}}
:aot :all
:source-paths ["env/prod/clj"]
:resource-paths ["env/prod/resources"]}
:dev [:project/dev :profiles/dev]
:test [:project/test :profiles/test]
:project/dev {:dependencies [[prone "1.0.1"]
[ring/ring-mock "0.3.0"]
[ring/ring-devel "1.4.0"]
[pjstadig/humane-test-output "0.7.1"]
[com.cemerick/piggieback "0.2.2-SNAPSHOT"]
[lein-doo "0.1.6"]
[lein-figwheel "0.5.0-6"]
[mvxcvi/puget "1.0.0"]]
:plugins [[lein-figwheel "0.5.0-6"] [lein-doo "0.1.6"] [org.clojure/clojurescript "1.7.228"]]
:cljsbuild
{:builds
{:app
{:source-paths ["env/dev/cljs"]
:compiler
{:main "<artifactId>.app"
:asset-path "/js/out"
:optimizations :none
:source-map true}}
:test
{:source-paths ["src-cljs" "test-cljs"]
:compiler
{:output-to "target/test.js"
:main "<artifactId>.doo-runner"
:optimizations :whitespace
:pretty-print true}}}}
:figwheel
{:http-server-root "public"
:server-port 3449
:nrepl-port 7002
:nrepl-middleware ["cemerick.piggieback/wrap-cljs-repl"]
:css-dirs ["resources/public/css"]
:ring-handler <artifactId>.handler/app}
:doo {:build "test"}
:source-paths ["env/dev/clj"]
:resource-paths ["env/dev/resources"]
:repl-options {:init-ns user}
:injections [(require 'pjstadig.humane-test-output)
(pjstadig.humane-test-output/activate!)]
;;when :nrepl-port is set the application starts the nREPL server on load
:env {:dev true
:port 3000
:nrepl-port 7000}}
:project/test {:env {:test true
:port 3001
:nrepl-port 7001}}
:profiles/dev {}
:profiles/test {}})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment