简体   繁体   中英

Compiling resources in clojure project

I have a simple clojure project which just contains files in the resources folder. I would like to compile those resources using jenkins.

Previously I ran it manually using

cd my-project
lein ring server

and changed .md files in the resources/templates folder. Those got compiled as .html files into resources/public on the running server.

Now I set up Jenkins as build server and want to automate that process. But I had no success so far. I tried different tasks such as lein ring server which starts the server but keeps it running. I tried compile but that doesn't compile the resources files actually.

My project.clj looks like the following currently:

(defproject leiningen_clojure_test "1.0.0-SNAPSHOT"
  :description "clojure test app"
  :url "http://example.com/none"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}

  ;; added this according to http://stackoverflow.com/questions/8009829/resources-in-clojure-applications, but no success
  :profiles {:dev {:resource-paths ["resources"]}}

  :dependencies [[org.clojure/clojure "1.8.0"]]

  :plugins [[lein-ring "0.10.0"]]

  ;; this also didn't help
  :aot :all

  :ring {:handler leiningen-clojure-test.core/handler}
  )

Is there a common way, how tho achieve this? I didn't yet get how this should work from the different tutorials.

Hm, I wasn't aware there's bit more missing. Actually I had to use the project structure from Cryogen , because my original clojure project is made up from a Cryogen template. So I modified the project structure and dependencies and it works now.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM