Skip to content

Instantly share code, notes, and snippets.

@laurentpetit
Last active December 14, 2015 23:29
Show Gist options
  • Save laurentpetit/5165928 to your computer and use it in GitHub Desktop.
Save laurentpetit/5165928 to your computer and use it in GitHub Desktop.
ccw.util.launch wraps JDT launcher. lein is an example of a generic leiningen launcher based on ccw.util.launch.
(ns ccw.leiningen.launch
(:require [ccw.util.launch :as launch]
[ccw.util.eclipse :as e]))
(defn lein [project command]
(let [launch {
:private true
:java/project-name (e/project-name project)
:java/classpath [{:entry-type :archive
:path "/Users/laurentpetit/.lein/self-installs/leiningen-2.0.0-preview10-standalone.jar"}
{:entry-type :jre-container
:name launch/default-jre-container-name}]
:java/default-classpath false
:java/vm-arguments (str " -Dfile.encoding=UTF-8"
" -Dmaven.wagon.http.ssl.easy=false"
" -Dleiningen.original.pwd=\"/Users/laurentpetit/tmp\"")
:java/main-type-name "clojure.main"
:java/program-arguments (str "-m leiningen.core.main " command)
}]
(launch/run launch)))
(comment
(lein "project-name" "repl :headless"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment