Coder Social home page Coder Social logo

technomancy / leiningen Goto Github PK

View Code? Open in Web Editor NEW
7.3K 223.0 1.6K 7.27 MB

Moved to Codeberg; this is a convenience mirror

Home Page: https://codeberg.org/leiningen/leiningen

License: Other

Shell 3.95% Clojure 87.78% Emacs Lisp 0.51% Java 0.05% Batchfile 2.18% PowerShell 1.02% HTML 2.21% CSS 2.29% Makefile 0.01%

leiningen's Introduction

Leiningen

Leiningen logo

Leiningen is for automating Clojure projects without setting your hair on fire.

Relocation notice!

The canonical repository for Leiningen is on Codeberg but we maintain a mirror on GitHub for the time being in order to ease the transition. Please update your links and git remotes.

The repo on github will be left around for a time as a convenience offered to those who haven't yet created a Codeberg account. You can still open issues here and submit pull requests. However, be sure to branch from main for your pull requests instead of this branch!

leiningen's People

Contributors

ato avatar bbatsov avatar bruceadams avatar cemerick avatar cldwalker avatar cprice404 avatar crisptrutski avatar dakrone avatar danielcompton avatar danlarkin avatar davidsantiago avatar gfredericks avatar glts avatar hugoduncan avatar hypirion avatar jcrossley3 avatar joegallo avatar juergenhoetzel avatar kaznak avatar michaelklishin avatar michalmarczyk avatar mpblair avatar mtyaka avatar ninjudd avatar raynes avatar technomancy avatar tobias avatar trptcolin avatar winks avatar xeqi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

leiningen's Issues

lein uberjar: "wrong number of arguments"

Running lein uberjar or lein jar gives the error message "wrong number of arguments". This happens when using a new project as well as when trying to bootstrap a snapshot of leiningen.

I am using leiningen 1.0.1 on Windows 7 via the included lein.bat.

lein uberjar does not handle signed dependency jars correctly

If one of the dependencies is signed, creating a standalone jar with "lein uberjar" yields the following exception when executing the main class of the project:

Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes

In my case the inclusion of a "META-INF/DUMMY.SF" file from one of the depedency (janino-2.5.15.jar) is the root of the problem. Patching leiningen as follows in the attahed patch fixes the problem (however this is probably not the right way to fix it).

lein-swank should somehow depend on ant >= 1.6.3, maybe by requiring leiningen itself

lein-swank declares a dependency on org.apache.maven/maven-ant-tasks 2.0.10, which in turn depends on ant 1.6.2.

But lein-swank will call the compile function in leiningen/leiningen.compile, which in turn calls the getCommandLine method of org.apache.tools.ant.taskdefs.Java, which has only existed since ant 1.6.3 (http://api.dpml.net/ant/1.6.5/org/apache/tools/ant/taskdefs/Java.html#getCommandLine()). The result is that you might end up (as I did) with maven downloading ant 1.6.2 and then complaining that the above method doesn't exist.

leiningen itself depends on Ant 1.6.5, maybe lein-swank should explicitly depend on leiningen anyway.

lein pom does not create <build> sections

I am trying to use leiningen from NetBeans. So, I figured I would need to generate a pom file and open the project in NetBeans. However, when I do lein pom the pom file does not contain the section which includes goodies like .

Here is the output from lein version:
Leiningen 1.1.0+0.velocitude3 on Java 1.6.0_17 Java HotSpot(TM) 64-Bit Server VM

lein new produces buggy project.clj

lein new update, produces:

"(defproject update "1.0.0-SNAPSHOT" :description "FIXME: write" :dependencies [[org.clojure/clojure "1.1.0-alpha-SNAPSHOT"] [org.clojure/clojure-contrib "1.0-SNAPSHOT"]])"

In a single line (nasty) with out-dated references to the jars.

help task fails; "java.util.zip.ZipException: error in opening zip file"

The problem is that my project's lib directory contains some bogus
jars fetched by `lein deps'. In my case it is these four jars: jms,
jmxri, jmxtools, and mail.

They contain instead: http://gist.github.com/331673

The contrib.classpath function that complains is: classpath-jarfiles, particularly it's usage of java.util.jar.JarFile. This should probably stay noisy like it is; the problem is probably in `lein deps'. Apparently, it needs to follow HTTP 301 instead of writing the error output as a jar file. It seems like it could be a problem in Maven's DependenciesTask which deps.clj uses like this: http://gist.github.com/331677

AOT compilations in `lein jar' ignored by jar users

.class files and .clj files in a jar generated by `lein jar' all have the same timestamp. As such, the compiler and loader will not use the .class files when loading modules.

This can be confirmed by depending on a project with a Leiningen-built jar, e.g. clojure-csv from clojars, running `lein compile', and seeing that com.davidsantiago.csv is compiled into the classes/ directory.

Add support for arbitrary class paths

Beyond merely adding lib, src etc... onto the classpath, it would be useful for lien to support an additional :classpath option which would allow explicit control of what classes and jar files make it onto the classpath in addition to those managed by mvn.... This option should support being given a vector of jar files, directories and maybe 'directory globs' e.g. /foo/*.jar which would get added to the classpath.

Some applications require more control over classpath than lein currently gives, and would benefit from being able to add several jars/classes in this manner without using maven.

The rational is that there are many proprietary libraries which are not in mvn repos, but are managed in an arbitrary /project-libs directory. Also, some projects demand more explicit control over the jvm classpath and classloading.

Other projects might also be predominantly java/ant based but want to have a development/interactive component written in clojure. If lein supported arbitrary classpaths developers could easily use swank/slime to interactively develop the clojure part (which had the ant built dist/project.jar added on the classpath).

Ideally project.clj should include the full classpath specification, without resorting to hacking the lien bash/bat script.

read-project only works in leiningen.core

In checkout-deps, unit tests fail like so:

java.lang.RuntimeException: java.lang.Exception: Unable to resolve symbol: defproject in this context (project.clj:1)

This can also be reproduced by adding (ns whatever) to the top of a project.clj.

The reason is that importing defproject into clojure.core is not enough to make it show up in every package; it must be interned there as well.

We can either call (intern 'clojure.core 'defproject @#'leiningen.core/defproject) or remove the capability to put project.clj in another namespace and bind ns appropriately around the load-file call in read-project.

cannot use rt.jar outside of os x

because osx forks by default and native-path does not exist, on Linux I cannot refer to classes in rt.jar when compiling or testing.

if I copy rt.jar under lib I can compile but I cannot run tests because the classes in rt.jar are already loaded from the bootloader but are not visible.

(when (or (= :macosx (get-os)) native-path)
  (.setFork java true)

example stack trace:
[null] Caused by: java.lang.ClassNotFoundException: com.sun.net.httpserver.HttpHandler
[null] at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1149)
[null] at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1090)
[null] at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:966)
[null] at java.lang.ClassLoader.loadClass(ClassLoader.java:332)
[null] at java.lang.Class.forName0(Native Method)
[null] at java.lang.Class.forName(Class.java:186)
[null] at http.server$loading__6309__auto____298.invoke(server.clj:1)
[null] at clojure.lang.AFn.applyToHelper(AFn.java:171)
[null] at clojure.lang.AFn.applyTo(AFn.java:164)
[null] at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:2775)

Installation not working

I don't know how to fix this but thought I would tell you. I followed your directions for installing:

  1. Download the script: http://github.com/technomancy/leiningen/raw/master/bin/lein
  2. Place it on your path and chmod it to be executable.
  3. Run: lein self-install

and here is the error I am getting:

Exception in thread "main" java.lang.NoClassDefFoundError: leiningen/core
Caused by: java.lang.ClassNotFoundException: leiningen.core
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:330)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:254)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:399)

lein swank not multi user capable

lein swank creates a file /tmp/swank-port.txt which causes seriouse problems if more then one person use lein swank on the same hardware: the first one gets the txt file the rest gets problems since they can't write the file it should be named /tmp/user-project-swank-port.txt (where user and project are taken from the current logged in user and the current lein project) so many people can work even on the same projects and one person can work on multiple projects.

windows problem (leiningens own test)

In test_new.clj and tes_compile.clj the lein command is given to the shell. When using Windows (sorry, but I have to), this fails. If "lein.bat" is given instead (and is in the path, of course), this will work.

e.g.
(sh "lein.bat" "compile")

Can this somehow be given as parameter? Or can the test look what OS it is? Or just try this when "lein" fails? Or stuff?

pom.xml doesn't include :excludes

:excludes works as you'd expect in lein deps and other commands that use it, but the generated pom.xml from lein pom doesn't keep the exclusion information, meaning those that depend on it will get the full dependencies.

"lein new" has bug with "-" character

Steps to reproduce with lein 1.1.0;

  1. $ cd /tmp
  2. $ lein new my-project
  3. $ cd !$
  4. Edit project.clj to read as the following;
    (defproject my-project "1.0.0-SNAPSHOT"
    :description "FIXME: write"
    :dependencies [[org.clojure/clojure "1.1.0"]
    [org.clojure/clojure-contrib "1.1.0"]]
    :main my-project.core)
  5. Modify src/my_project/core.clj to read as the following;
    (ns my-project.core
    (:gen-class))
    (defn -main & args)
  6. $ lein compile
  7. $ lein uberjar
  8. $ java -jar my-project-standalone.jar

Notice the "Exception in thread "main" java.lang.NoClassDefFoundError: my-project/core"
throw at execution.
If you change the project to read ":main my_project.core", then "$ lein compile" will fail.

OS X bug for Leiningen 1.0 ?

http://github.com/swannodette/lein-macosx-bug

If I try to use this project with lein swank (using lein 1.0), I get a fairly weird exception:

Cannot load apple.laf.AquaLookAndFeel

I ran this project using the normal Emacs clojure setup (setting the classpath manually in my .emacs file) and it works perfectly.

Everything needed to recreate this bug is in the repo.

Add option to run REPL without Jline

When I run 'lein repl', I am unable to paste the characters "ใ›ใ‚“" (they show up as "??" instead). When I remove Jline from the REPL command, I can type them without a problem.

Maybe an environment variable like LEIN_ENABLE_JLINE=false or a different command like 'lein utf-repl' to spawn a REPL without jline?

Test classification

As a leiningen user I would like to be able to categorize tests. And execute categories separately.

Currently I have a project with several unit- and integration test files (in different directories). I would like to run all unit tests separately from Webdriver integration tests and vice versa.

If categorization is hard, it would be OK, if I could somehow run all tests from one directory in single execution.

BR, Jussi

add `classpath' command

A `classpath' built-in command, would be useful for development tools that want classpath information, either to start up or configure a useful classloader themselves with their own fruit, or do autocompletion/other processing on information in those classes.

find -H not available on all platforms

The lein script doesn't build up a correct classpath on my linux box, as its version of find doesn't support the -H switch.

$ find -H .
find: invalid predicate `-H'
$ uname -a
Linux snvl-b-app98 2.6.9-78.0.8.ELsmp \#1 SMP Wed Nov 19 19:42:38 EST 2008 x86_64 x86_64 x86_64 GNU/Linux

I've hacked my local lein script to use -follow instead (which must come after the lib/ path, not before).

'lein new' groupid not compatible with 'lein compile'

If the following command is ran:

lein new uk.org.alienscience/testproj

A source file is created in src/uk.org.alienscience/testproj.clj. However, 'lein compile' assumes all dots in namespace names should be converted to slashes (namespaces-to-compile function in compile.clj). This causes a last modified check for src/uk/org/alienscience/testproj.clj which doesn't exist.

I personally prefer the shallow directory structure but don't know how compile.clj can be adapted to handle this.

new task: run

I often wish to run an application that I am developing. Currently I use the following sequence of commands:

 lein compile
 lein uberjar
 java -jar myproject-standalone.jar

It would be nice to be able to do this instead:

 lein run

Symbols not evaluated for versions of dependencies

I started work on using lein with an existing project of mine. I seemed obvious in the Dont Repeat Yourself sense of the word, to define symbols for repeated and related version numbers. No dice:

(def slf4j-version "1.5.2")
(def jetty-version "7.0.0.RC4")
(def selenium-version "1.0.1")

(defproject com.howardlewisship.cascade/core "1.0.0-SNAPSHOT"
  :description "Simple, fast, easy web applications in idiomatic Clojure"
  :url "http://github.com/hlship/cascade/"
  :dependencies 
    [[org.clojure/clojure "1.1.0"]
     [org.clojure/clojure-contrib "1.1.0"]
     [org.slf4j/slf4j-api slf4j-version]
     [org.slf4j/slf4j-log4j12 slf4j-version]
     [log4j/log4j "1.2.14"]]
  :dev-dependencies
    [[org.eclipse.jetty/jetty-servlet jetty-version]
     [org.easymock/easymock "2.5.1"]
     [org.seleniumhq.selenium.client-drivers/selenium-java-client-driver selenium-version]
     [org.seleniumhq.selenium.server/selenium-server selenium-version] 
     [org.seleniumhq.selenium.server/selenium-server-coreless selenium-version]]
  :warn-on-reflection true
  :source-path "src/main/clojure"
  :test-path "src/test/clojure"
  :resources-path "src/main/resources"
  :jar-dir "target/")

$ lein deps
Exception in thread "main" java.lang.ClassCastException: clojure.lang.Symbol cannot be cast to java.lang.String (NO_SOURCE_FILE:0)
    at clojure.lang.Compiler.eval(Compiler.java:4658)
    at clojure.core$eval__5236.invoke(core.clj:2017)
    at clojure.main$eval_opt__7411.invoke(main.clj:227)
    at clojure.main$initialize__7418.invoke(main.clj:246)
    at clojure.main$null_opt__7446.invoke(main.clj:271)
    at clojure.main$main__7466.doInvoke(main.clj:346)
    at clojure.lang.RestFn.invoke(RestFn.java:426)
    at clojure.lang.Var.invoke(Var.java:363)
    at clojure.lang.AFn.applyToHelper(AFn.java:175)
    at clojure.lang.Var.applyTo(Var.java:476)
    at clojure.main.main(main.java:37)
Caused by: java.lang.ClassCastException: clojure.lang.Symbol cannot be cast to java.lang.String
    at leiningen.deps$make_dependency__704.invoke(deps.clj:20)
    at leiningen.deps$deps__716.invoke(deps.clj:57)
    at leiningen.deps$deps__716.invoke(deps.clj:66)
    at clojure.lang.Var.invoke(Var.java:359)
    at clojure.lang.AFn.applyToHelper(AFn.java:173)
    at clojure.lang.Var.applyTo(Var.java:476)
    at clojure.core$apply__4370.invoke(core.clj:436)
    at leiningen.core$_main__46$fn__49.invoke(core.clj:81)
    at leiningen.core$_main__46.doInvoke(core.clj:78)
    at clojure.lang.RestFn.invoke(RestFn.java:413)
    at user$eval__55.invoke(NO_SOURCE_FILE:1)
    at clojure.lang.Compiler.eval(Compiler.java:4642)
    ... 10 more
~/clojure-workspace/cascade
$

This seems sensible to me; the symbols should be expanded to string and used as version numbers.

lein swank no properly sets the classpath properly, fb95c5ef57a554081c012df139b2751344cc970a

I did a git bisect to isolate the commit, the report from git bisect:

fb95c5ef57a554081c012df139b2751344cc970a is the first bad commit
commit fb95c5ef57a554081c012df139b2751344cc970a
Author: Alex Osborne 
Date:   Mon Nov 30 15:34:14 2009 +1100

    Run compile and test tasks in isolated classloader
    
    This means that we can:
    - Safely compile against alternative versions of Clojure.
    - Move classpath logic from the shell script to lein itself.
    - Run lein with: java -jar leiningen-standalone.jar
    
    This patch also makes the source, test and library paths configurable
    which is useful for people with special requirements like mixed-language
    projects.

:040000 040000 774de0be90b5eb0153e20f4feec2fc1825d54880 1ac84f70003f2bc1a5c556f1190fde2456aca7a3 M  bin
:100644 100644 258d998f33e07a2806aabe7381a760d82193aeca 37c2617eec50029a8fbd14c84efb4f7eb450a109 M  project.clj
:040000 040000 06856937f35cceaa24022dea2be68d2aa76ba2c9 e7581f3b09af316962457bf3d050dd1cac8e2acc M  src
:100644 100644 d4c610fc1cab49d4940dd986cfa30ab395eb6848 da77ff8a8e7722b749dbf12ab78fe29fb4af001a M  todo.org

"lein test" broken for Clojure 1.0.0 projects

Looks like the testing code expects clojure.test, a namespace that only exists post-1.0. I'll see if I can fix, unless you have a something in mind.

To reproduce:

lein new testbug
cd testbug
sed -i 's/1\.1\.0/1\.0\.0/g' project.clj
lein deps
lein test

Error when attempting to bootstrap

When I run:

$ lein deps

I get an error about 13 required artifacts missing. Maybe I missed some step, but I don't think so.

Thanks for making this.

hacking on leiningen (improving bootstrap instructions)

The following doesn't work for me if I'm following the bootstrap instructions

lines 34-36 in bin/lein:

if [ ! -r "lib/leiningen*jar" -a ! -r "$LEIN_JAR" -a "$1" != "self-install" ]; then
        echo "Leiningen is not installed. Please run \"lein self-install\"."
fi

I switched it to the following:

if [ ! -r "$BIN_DIR/../lib/leiningen.jar" -a ! -r "$LEIN_JAR" -a "$1" != "self-install" ]; then
    echo "Leiningen is not installed. Please run \"lein self-install\"."
fi

Also the hacking instructions don't point out that you need to run the following still from the checkout directory:

$ lein compile
$ mv leiningen.jar lib/

can't create new project in current or relative dir

$ lein new .
Exception in thread "main" java.lang.IllegalArgumentException: /core.clj is not a relative path (NO_SOURCE_FILE:0)

$ lein new ../mmemail/
Exception in thread "main" java.lang.IllegalArgumentException: /mmemail/core.clj is not a relative path (NO_SOURCE_FILE:0)

Sample application not working (?)

There is no instruction on how to run the sample application from the github repo. Attempting
lein compile
lein uberjar
java -jar nomnomnom.jar
Results in
Failed to load Main-Class manifest attribute from
nomnomnom.jar
Besides that, it is difficult to figure out how to make a new project with a main function. Is it possible to have lein set this up as well? Is it documented how to do this anywhere?

usurping :main option

When the :main option is provided in project.clj, the jar and uberjar tasks no longer work. In my case the :main launched a web server. When launching the jar or uberjar tasks, the webserver starts and no jar files get created.

Tracking org.clojure/clojure with master-SNAPSHOT

The version string for Clojure's development HEAD has changed from 1.1.0-alpha-SNAPSHOT to 1.1.0-master-SNAPSHOT to reflect its git branch, so, assuming the intention is to track bleeding edge, leiningen's references should be changed as well, both in its own project.clj & in the bin/lein launch script. (See build.clojure.org/snapshots/org/clojure/clojure/, where the last build of alpha is 26 Nov.)

Thanks for lein,
Perry

lein deps (from Git) never returns

lein stable has some issues with projects that use Clojure 1.2.0-master-SNAPSHOT, so I switched to the master branch. It seems to have a problem (since at least Friday 04/30) -- 'lein deps' reproducibly gets stuck and does not finish:

$ lein new foo
Created new project in: foo
$ cd foo
$ lein deps
[copy] Copying 2 files to /home/michel/checkouts/leiningen/foo/lib
Copied :dependencies into /home/michel/checkouts/leiningen/foo/lib.
^C$

lein new without project name throws an exception

"lein help new" is not very helpful, so I tried to run "lein new". An exception was thrown:

Exception in thread "main" java.lang.IllegalArgumentException: No method in multimethod 'as-file' for dispatch value: null (NO_SOURCE_FILE:0)
at clojure.lang.Compiler.eval(Compiler.java:4658)
at clojure.core$eval__5254.invoke(core.clj:2031)
at clojure.main$eval_opt__7429.invoke(main.clj:225)
at clojure.main$initialize__7436.invoke(main.clj:244)
at clojure.main$null_opt__7464.invoke(main.clj:269)
at clojure.main$main__7484.doInvoke(main.clj:338)
at clojure.lang.RestFn.invoke(RestFn.java:426)
at clojure.lang.Var.invoke(Var.java:363)
at clojure.lang.AFn.applyToHelper(AFn.java:175)
at clojure.lang.Var.applyTo(Var.java:476)
at clojure.main.main(main.java:37)
Caused by: java.lang.IllegalArgumentException: No method in multimethod 'as-file' for dispatch value: null
at clojure.lang.MultiFn.getFn(MultiFn.java:115)
at clojure.lang.MultiFn.invoke(MultiFn.java:157)
at clojure.contrib.java_utils$file__462.invoke(java_utils.clj:86)
at leiningen.new$new__63.doInvoke(new.clj:8)
at clojure.lang.RestFn.invoke(RestFn.java:415)
at clojure.lang.Var.invoke(Var.java:359)
at clojure.lang.AFn.applyToHelper(AFn.java:173)
at clojure.lang.Var.applyTo(Var.java:476)
at clojure.core$apply__4379.invoke(core.clj:436)
at leiningen.core$_main__42$fn__45.invoke(core.clj:68)
at leiningen.core$_main__42.doInvoke(core.clj:67)
at clojure.lang.RestFn.invoke(RestFn.java:413)
at user$eval__51.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:4642)
... 10 more

Of course the third guess was to run "lein new projectname" but a more a bit more descriptive error message would be nice.

Thanks.

Support for 'Class-Path' in jar manifest

For some deployments, I tend to prefer not using an uberjar, but instead using a regular jar and a lib folder for dependencies. However it can be painful getting the class-path set up so setting the 'Class-Path' in the jar manifest lets it still be run with a simple "java -jar". Is this worth adding (or maybe I'm missing another easier way)?

Here's a rough but working example in 'make-manifest': http://github.com/mlehman/leiningen/blob/master/src/leiningen/jar.clj

lein swank sets incorrect working directory

My assumption would be for the working directory to be set as the directory containing project.clj, or the directory from which lein swank was run.

I'm finding that the JVM's pwd is being set to /src/ rather than the directory I loaded lein from... e.g. at the swank repl:

(import java.io.File)
(. (File. ".") getAbsolutePath)

Yields "/src/project"

generated classes cannot be used with the :main directive if they have a - in the namespace

I have reproduced this here:

https://gist.github.com/338153/44403dc808add9b2c9fb94296a7bc29e9a0ad8a2

You can clone it with:
git clone git://gist.github.com/338153.git gist-338153

This used to work with Leiningen 1.0.1 but does not with Leiningen 1.1.0.

I have tried using "foo-bar.core" in the project.clj as well. It compiles but then when I run the jar it blows up saying "Exception in thread "main" java.lang.NoClassDefFoundError: foo-bar/core".

Option to download sources w/ dependencies

When you have dependencies on Java libraries, it would be nice to have the option to download the source jars for them (into lib/, or perhaps lib-src/). When working inside Eclipse or another IDE, it's very nice to have dependencies with source attachments.

install script error in cygwin

Hi, I got this error when tried to run the install script under cygwin.

$ ./lein self-install
Downloading Leiningen now...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0Warning: Failed to create the file
Warning: /home/brian/.m2/repository/leiningen/leiningen/1.0.1/leiningen-1.0.1-s
Warning: tandalone.jar
0 8156k 0 4137 0 0 13789 0 0:10:05 --:--:-- 0:10:05 68950
curl: (23) Failed writing body (0 != 4137)

thanks
Brian

Feature Request: Adding a splashcreen to your projects

Java 6 introduced splash screens that are displayed while the JVM loads. It would be nice if we could configure our projects to use one to cover the load of the JVM and clojure.

It's only a matter of adding the following line to the manifest:
SplashScreen-Image: filename

lein deps fails when using clojure 1.2.0-SNAPSHOT

$ lein version
Leiningen 1.1.0 on Java 1.6.0_17 Java HotSpot(TM) 64-Bit Server VM
/clojure-workspace/clojure-kata
$ cat project.clj
(defproject com.howardlewisship/clojure-kata "1.0.0-SNAPSHOT"
:description "FIXME: write"
:dependencies [[org.clojure/clojure "1.2.0-SNAPSHOT"]
[org.clojure/clojure-contrib "1.2.0-SNAPSHOT"]])
/clojure-workspace/clojure-kata
$ lein deps
Downloading: org/clojure/clojure/1.2.0-SNAPSHOT/clojure-1.2.0-SNAPSHOT.pom from central
Downloading: org/clojure/clojure/1.2.0-SNAPSHOT/clojure-1.2.0-SNAPSHOT.pom from clojure
Downloading: org/clojure/clojure/1.2.0-SNAPSHOT/clojure-1.2.0-SNAPSHOT.pom from clojure-snapshots
Downloading: org/clojure/clojure/1.2.0-SNAPSHOT/clojure-1.2.0-SNAPSHOT.pom from clojars
Downloading: org/clojure/clojure/1.2.0-SNAPSHOT/clojure-1.2.0-SNAPSHOT.jar from central
Downloading: org/clojure/clojure/1.2.0-SNAPSHOT/clojure-1.2.0-SNAPSHOT.jar from clojure
Downloading: org/clojure/clojure/1.2.0-SNAPSHOT/clojure-1.2.0-SNAPSHOT.jar from clojure-snapshots
Downloading: org/clojure/clojure/1.2.0-SNAPSHOT/clojure-1.2.0-SNAPSHOT.jar from clojars
[null] An error has occurred while processing the Maven artifact tasks.
[null] Diagnosis:
[null]
[null] Unable to resolve artifact: Missing:
[null] ----------
[null] 1) org.clojure:clojure:jar:1.2.0-SNAPSHOT
[null]
[null] Try downloading the file manually from the project website.
[null]
[null] Then, install it using the command:
[null] mvn install:install-file -DgroupId=org.clojure -DartifactId=clojure -Dversion=1.2.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
[null]
[null] Alternatively, if you host your own repository you can deploy the file there:
[null] mvn deploy:deploy-file -DgroupId=org.clojure -DartifactId=clojure -Dversion=1.2.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[null]
[null] Path to dependency:
[null] 1) org.apache.maven:super-pom:jar:2.0
[null] 2) org.clojure:clojure:jar:1.2.0-SNAPSHOT
[null]
[null] ----------
[null] 1 required artifact is missing.
[null]
[null] for artifact:
[null] org.apache.maven:super-pom:jar:2.0
[null]
[null] from the specified remote repositories:
[null] clojure (http://build.clojure.org/releases),
[null] clojars (http://clojars.org/repo/),
[null] clojure-snapshots (http://build.clojure.org/snapshots),
[null] central (http://repo1.maven.org/maven2)
[null]
[null]

Exception in thread "main" Unable to resolve artifact: Missing:

  1. org.clojure:clojure:jar:1.2.0-SNAPSHOT

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=org.clojure -DartifactId=clojure -Dversion=1.2.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.clojure -DartifactId=clojure -Dversion=1.2.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) org.apache.maven:super-pom:jar:2.0
2) org.clojure:clojure:jar:1.2.0-SNAPSHOT


1 required artifact is missing.

for artifact:
org.apache.maven:super-pom:jar:2.0

from the specified remote repositories:
clojure (http://build.clojure.org/releases),
clojars (http://clojars.org/repo/),
clojure-snapshots (http://build.clojure.org/snapshots),
central (http://repo1.maven.org/maven2)

(NO_SOURCE_FILE:0)
at clojure.lang.Compiler.eval(Compiler.java:4658)
at clojure.core$eval__5236.invoke(core.clj:2017)
at clojure.main$eval_opt__7411.invoke(main.clj:227)
at clojure.main$initialize__7418.invoke(main.clj:246)
at clojure.main$null_opt__7446.invoke(main.clj:271)
at clojure.main$main__7466.doInvoke(main.clj:346)
at clojure.lang.RestFn.invoke(RestFn.java:426)
at clojure.lang.Var.invoke(Var.java:363)
at clojure.lang.AFn.applyToHelper(AFn.java:175)
at clojure.lang.Var.applyTo(Var.java:476)
at clojure.main.main(main.java:37)

Caused by: Unable to resolve artifact: Missing:

  1. org.clojure:clojure:jar:1.2.0-SNAPSHOT

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=org.clojure -DartifactId=clojure -Dversion=1.2.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.clojure -DartifactId=clojure -Dversion=1.2.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) org.apache.maven:super-pom:jar:2.0
2) org.clojure:clojure:jar:1.2.0-SNAPSHOT


1 required artifact is missing.

for artifact:
org.apache.maven:super-pom:jar:2.0

from the specified remote repositories:
clojure (http://build.clojure.org/releases),
clojars (http://clojars.org/repo/),
clojure-snapshots (http://build.clojure.org/snapshots),
central (http://repo1.maven.org/maven2)

at org.apache.maven.artifact.ant.DependenciesTask.doExecute(DependenciesTask.java:175)
at org.apache.maven.artifact.ant.AbstractArtifactTask.execute(AbstractArtifactTask.java:678)
at leiningen.deps$deps__716.invoke(deps.clj:61)
at leiningen.deps$deps__716.invoke(deps.clj:66)
at clojure.lang.Var.invoke(Var.java:359)
at clojure.lang.AFn.applyToHelper(AFn.java:173)
at clojure.lang.Var.applyTo(Var.java:476)
at clojure.core$apply__4370.invoke(core.clj:436)
at leiningen.core$_main__46$fn__49.invoke(core.clj:81)
at leiningen.core$_main__46.doInvoke(core.clj:78)
at clojure.lang.RestFn.invoke(RestFn.java:413)
at user$eval__55.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:4642)
... 10 more

Caused by: org.apache.maven.artifact.resolver.MultipleArtifactsNotFoundException: Missing:

  1. org.clojure:clojure:jar:1.2.0-SNAPSHOT

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=org.clojure -DartifactId=clojure -Dversion=1.2.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.clojure -DartifactId=clojure -Dversion=1.2.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) org.apache.maven:super-pom:jar:2.0
2) org.clojure:clojure:jar:1.2.0-SNAPSHOT


1 required artifact is missing.

for artifact:
org.apache.maven:super-pom:jar:2.0

from the specified remote repositories:
clojure (http://build.clojure.org/releases),
clojars (http://clojars.org/repo/),
clojure-snapshots (http://build.clojure.org/snapshots),
central (http://repo1.maven.org/maven2)

at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:324)
at org.apache.maven.artifact.ant.DependenciesTask.doExecute(DependenciesTask.java:170)
... 22 more

~/clojure-workspace/clojure-kata
$

New project (just created with lein new), editted the project.clj, trying to download Clojure 1.2.0-SNAPSHOT and get a mysterious Maven error. Ick.

plugin tasks doesn't honour :library-path directive (lein swank doesn't work unless swank is in lib/)

(defproject website "0.1.0-SNAPSHOT"
:dependencies [[org.buntin/compojure "0.4.0-SNAPSHOT"] [hiccup "0.4.0-SNAPSHOT"] [org.clojure/clojure "1.1.0"][org.clojure/clojure-contrib "1.1.0"] [ring "0.1.1-SNAPSHOT"][com.google.appengine/appengine-tools-sdk "1.3.0"]]
:dev-dependencies [[swank-clojure "1.1.0"] [leiningen/lein-swank "1.2.0-SNAPSHOT"]]
:namespaces [website]
:main website
:compile-path "war/WEB-INF/classes/"
:library-path "war/WEB-INF/lib/")

---- problem described below:

$ lein swank

swank is not a task. Use "help" to list all tasks.

$ ls war/WEB-INF/lib/lein-swank-1.2.0-20100308.145053-1.jar

war/WEB-INF/lib/lein-swank-1.2.0-20100308.145053-1.jar

$ mkdir lib

$ cp war/WEB-INF/lib/lein-swank-1.2.0-20100308.145053-1.jar lib/

$ ls lib/

lein-swank-1.2.0-20100308.145053-1.jar

$ lein swank
[null] user=> Connection opened on local port 4005
[null] #<ServerSocket ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=4005]>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.