Move :prep-tasks to default project instead of profile.

This commit is contained in:
Phil Hagelberg 2012-04-02 10:29:17 -07:00
parent 2d236dd662
commit 56c8f1dd4d
2 changed files with 7 additions and 9 deletions

View file

@ -27,6 +27,7 @@
:native-path "native"
:compile-path "target/classes"
:target-path "target"
:prep-tasks ["javac" "compile"]
:repositories (ordered/ordered-map
"central" {:url "http://repo1.maven.org/maven2"}
;; TODO: point to releases-only before 2.0 is out
@ -114,8 +115,7 @@
(def default-profiles
"Profiles get merged into the project map. The :dev and :user
profiles are active by default."
(atom {:default {:resource-paths ["dev-resources"]
:prep-tasks ["javac" "compile"]}
(atom {:default {:resource-paths ["dev-resources"]}
:test {}
:offline {:offline? true}
:debug {:debug true}}))

View file

@ -179,10 +179,8 @@ Create a $PROJECT-$VERSION.jar file containing project's source files as well
as .class files if applicable. If project.clj contains a :main key, the -main
function in that namespace will be used as the main-class for executable jar."
[project]
(let [classpath [] ;; (classpath/resolve-dependencies project)
project (:without-profiles (meta project) project)]
(eval/prep project)
(let [jar-file (get-jar-filename project)]
(write-jar project jar-file (filespecs project classpath))
(println "Created" (str jar-file))
jar-file)))
(eval/prep (:without-profiles (meta project) project))
(let [jar-file (get-jar-filename project)]
(write-jar project jar-file (filespecs project []))
(println "Created" (str jar-file))
jar-file))