laurentpetit edited this page Sep 27, 2012 · 9 revisions

#Informal specifications for Leiningen Support


This first version of Leiningen Support aims at maintaining on the user's behalf the project's classpath (e.g. Java Build Path), by keeping it synchronized with the project's project.clj file.


  • Targets Leiningen 2

  • because it's more powerful than Lein 1

  • because it's almost ready

  • because it will help spread adoption of Lein 2

  • because Lein 2 is modular enough to be embedded in a Plugin

  • Embeds leiningen-core into an Eclipse Plug-in

  • Will not require pre-existing install of Leiningen (good for Windows citizens)

  • Will free user from having to choose a particular version of Lein2

  • All dependencies in :dependencies key will be grouped into a Classpath Container

  • How should it control the Java Build Path ?

    1. Full control, e.g. everytime it is called for synchronization, clears the Java Build path, and add entries found in project.clj (classpath container + java source path, test source path, resource source path, classes/ compilation folder, etc.) ?
    2. Work only by addition (thus if the user adds entries, they are preserved) => the problem is that if java source path change inside project.clj, the old java source path will not be removed automatically ...
    3. Try the (risky) 'smart way' of only working by addition, but for the java build path entries which existed before in the previous known state of project.clj.

My preference goes to "Full control", because I see Leiningen Support as a way to prevent the user from even opening the "Java Build Path" property again.

##Several ways to get Leiningen Support

It all depends on where you're starting from

###Have an existing Blank or Java or Clojure Project in your workspace ?

Use the Configure > Convert to Leiningen Project contextual menu on the project's node in the Package Explorer:

Project configure menu

###Have a freshly Leiningen project cloned from GitHub in your file system ?

In a first version of the plugin:

  • Create a new project, but do not use the default path, rather go select the right path on the filesystem
  • Add Leiningen support via ( Configure > Convert to Leiningen Project )


Global Preferences Page:

Not all these preferences will be available in a first version.

Global Preferences

Project Properties Page:

The "Workspace resolution" stuff will probably not be available in a first version.

Project Properties

Project contextual Menu:

Project Menu

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.