librelist archives

« back to archive

lein2 trampoline on Windows XP doesn't use :local-repo but downloads artifacts to maven .m2 default location?

lein2 trampoline on Windows XP doesn't use :local-repo but downloads artifacts to maven .m2 default location?

From:
George Oliver
Date:
2012-07-15 @ 23:08
hi, apologies as I posted this to the Google Group originally.

I'm not sure what the problem is exactly but this is what's happening, I'm
hoping someone can spot the issue.

After running into problems with file path spaces on Windows XP trying to
get the lein-cljsbuild advanced example working (
https://github.com/emezeske/lein-cljsbuild/tree/0.2.4/example-projects/advanced
), I reinstalled lein2 to a directory path without spaces and set
:local-repo in my profiles.clj also to a directory path without spaces.
This worked for changing maven's download directory to my :local-repo.

Note that I learned today the lein-cljsbuild examples are for lein1x (
https://github.com/emezeske/lein-cljsbuild/issues/107), but I don't think
my current problem is related to that. The simple project (
https://github.com/emezeske/lein-cljsbuild/tree/0.2.4/example-projects/simple)
works for example with a minor change.

Now I can get the first half of the cljsbuild advanced example running with
$ lein ring server-headless 3000. However when I try the second step, lein
trampoline cljsbuild repl-launch firefox http://localhost:3000/repl-demo,
lein creates a new .m2 directory in the old default location
(%userprofile%/.m2), which I had deleted before reinstalling lein2, and
starts downloading 'missing' jars to there. It ends with this error,


Exception in thread "main" clojure.lang.LispReader$ReaderException:
java.lang.RuntimeException: EOF while reading, starting at line 1
        at clojure.lang.LispReader.read(LispReader.java:215)
        at clojure.core$read.invoke(core.clj:3346)
        at clojure.core$read.invoke(core.clj:3344)
        at clojure.main$eval_opt.invoke(main.clj:295)
        at clojure.main$initialize.invoke(main.clj:316)
        at clojure.main$script_opt.invoke(main.clj:340)
        at clojure.main$main.doInvoke(main.clj:427)
        at clojure.lang.RestFn.invoke(RestFn.java:3894)
        at clojure.lang.Var.invoke(Var.java:527)
        at clojure.lang.AFn.applyToHelper(AFn.java:410)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: EOF while reading, starting at line 1
        at clojure.lang.Util.runtimeException(Util.java:170)
        at clojure.lang.LispReader.readDelimitedList(LispReader.java:1117)
        at clojure.lang.LispReader$ListReader.invoke(LispReader.java:962)
        at clojure.lang.LispReader.read(LispReader.java:180)
        ... 11 more



I set debug=y before trying to launch the repl and got this information
back,





CLASSPATH=C:\george\bin\.lein\self-installs\leiningen-2.0.0-preview7-standalone.jar

[...skipping jar downloading...]

Trampoline command: ""java"" "-cp"

"C:\george\work\advanced\src-clj;C:\george\work\advanced\src-cljs;C:\george\work\advanced\test-cljs;C:\george\work\advanced\src-cljs;C:\george\work\advanced\.crossover-cljs;C:\Documents
and

Settings\george\.m2\repository\com\google\code\findbugs\jsr305\1.3.9\jsr305-1.3.9.jar;C:\Documents
and

Settings\george\.m2\repository\clj-stacktrace\clj-stacktrace\0.2.4\clj-stacktrace-0.2.4.jar;C:\Documents
and

Settings\george\.m2\repository\javax\servlet\servlet-api\2.5\servlet-api-2.5.jar;C:\Documents
and

Settings\george\.m2\repository\org\apache\commons\commons-compress\1.3\commons-compress-1.3.jar;C:\Documents
and

Settings\george\.m2\repository\com\google\javascript\closure-compiler\r1918\closure-compiler-r1918.jar;C:\Documents
and

Settings\george\.m2\repository\cljsbuild\cljsbuild\0.2.4\cljsbuild-0.2.4.jar;C:\Documents
and
Settings\george\.m2\repository\clout\clout\1.0.1\clout-1.0.1.jar;C:\Documents
and

Settings\george\.m2\repository\org\clojure\core.incubator\0.1.0\core.incubator-0.1.0.jar;C:\Documents
and
Settings\george\.m2\repository\junit\junit\4.8.2\junit-4.8.2.jar;C:\Documents
and

Settings\george\.m2\repository\com\google\protobuf\protobuf-java\2.4.1\protobuf-java-2.4.1.jar;C:\Documents
and

Settings\george\.m2\repository\ring\ring-core\1.1.0\ring-core-1.1.0.jar;C:\Documents
and

Settings\george\.m2\repository\org\clojure\tools.macro\0.1.0\tools.macro-0.1.0.jar;C:\Documents
and

Settings\george\.m2\repository\commons-io\commons-io\2.1\commons-io-2.1.jar;C:\Documents
and

Settings\george\.m2\repository\org\clojure\google-closure-library\0.0-1376\google-closure-library-0.0-1376.jar;C:\Documents
and

Settings\george\.m2\repository\clj-time\clj-time\0.3.7\clj-time-0.3.7.jar;C:\Documents
and
Settings\george\.m2\repository\hiccup\hiccup\1.0.0\hiccup-1.0.0.jar;C:\Documents
and

Settings\george\.m2\repository\org\clojure\clojure\1.4.0\clojure-1.4.0.jar;C:\Documents
and

Settings\george\.m2\repository\org\mozilla\rhino\1.7R3\rhino-1.7R3.jar;C:\Documents
and

Settings\george\.m2\repository\compojure\compojure\1.0.4\compojure-1.0.4.jar;C:\Documents
and

Settings\george\.m2\repository\commons-codec\commons-codec\1.6\commons-codec-1.6.jar;C:\Documents
and

Settings\george\.m2\repository\joda-time\joda-time\2.0\joda-time-2.0.jar;C:\Documents
and Settings\george\.m2\repository\fs\fs\1.1.2\fs-1.1.2.jar;C:\Documents
and

Settings\george\.m2\repository\com\googlecode\jarjar\jarjar\1.1\jarjar-1.1.jar;C:\Documents
and

Settings\george\.m2\repository\org\json\json\20090211\json-20090211.jar;C:\Documents
and

Settings\george\.m2\repository\com\google\guava\guava\10.0.1\guava-10.0.1.jar;C:\Documents
and
Settings\george\.m2\repository\args4j\args4j\2.0.12\args4j-2.0.12.jar;C:\Documents
and

Settings\george\.m2\repository\commons-fileupload\commons-fileupload\1.2.1\commons-fileupload-1.2.1.jar;C:\Documents
and

Settings\george\.m2\repository\org\clojure\clojurescript\0.0-1443\clojurescript-0.0-1443.jar"
"-Dclojure.compile.path=null" "-D.version=null" "-Dclojure.debug=true"
"clojure.main" "-e" ""(do (require (quote cljsbuild.repl.listen)) (set!
*warn-on-reflection* nil)
(do (cljsbuild.repl.listen/run-repl-launch 9000 \".lein-cljsbuild-repl\"
(quote
{:stdout \".repl-firefox-out\", :stderr \".repl-firefox-err\", :shell
(\"firefox\" \"http://localhost:3000/repl-demo\")}))
(clojure.core/shutdown-agents)))""



I can run lein repl normally from this project.


Does anyone know why it's still using the default directory with
trampoline, and/or what the error relates to?


thanks, George

Re: [leiningen] lein2 trampoline on Windows XP doesn't use :local-repo but downloads artifacts to maven .m2 default location?

From:
Phil Hagelberg
Date:
2012-07-15 @ 23:35
George Oliver <georgeolivergo@gmail.com> writes:

> I can run lein repl normally from this project.
>
> Does anyone know why it's still using the default directory with
> trampoline, and/or what the error relates to?

Can you try `lein trampoline repl` to see if the problem is specific to cljsbuild?

-Phil

Re: [leiningen] lein2 trampoline on Windows XP doesn't use :local-repo but downloads artifacts to maven .m2 default location?

From:
George Oliver
Date:
2012-07-15 @ 23:46
On Sun, Jul 15, 2012 at 4:35 PM, Phil Hagelberg <phil@hagelb.org> wrote:

> George Oliver <georgeolivergo@gmail.com> writes:
>
> > I can run lein repl normally from this project.
> >
> > Does anyone know why it's still using the default directory with
> > trampoline, and/or what the error relates to?
>
> Can you try `lein trampoline repl` to see if the problem is specific to
> cljsbuild?
>
>

I get exactly the same error,

C:\george\work\advanced>lein trampoline repl
Exception in thread "main" clojure.lang.LispReader$ReaderException:
java.lang.RuntimeException: EOF while reading, starting at line 1
        at clojure.lang.LispReader.read(LispReader.java:215)
        at clojure.core$read.invoke(core.clj:3346)
        at clojure.core$read.invoke(core.clj:3344)
        at clojure.main$eval_opt.invoke(main.clj:295)
        at clojure.main$initialize.invoke(main.clj:316)
        at clojure.main$script_opt.invoke(main.clj:340)
        at clojure.main$main.doInvoke(main.clj:427)
        at clojure.lang.RestFn.invoke(RestFn.java:3659)
        at clojure.lang.Var.invoke(Var.java:518)
        at clojure.lang.AFn.applyToHelper(AFn.java:388)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: EOF while reading, starting at line 1
        at clojure.lang.Util.runtimeException(Util.java:170)
        at clojure.lang.LispReader.readDelimitedList(LispReader.java:1117)
        at clojure.lang.LispReader$ListReader.invoke(LispReader.java:962)
        at clojure.lang.LispReader.read(LispReader.java:180)
        ... 11 more


As an experiment I deleted reply from my :local-repo
(C:\george\lib\.m2\repository). Also the default ~/.m2 repo was deleted.
Then I reran lein trampoline repl. Lein then downloaded reply to my
:local-repo, and exited with the same error.

Re: [leiningen] lein2 trampoline on Windows XP doesn't use :local-repo but downloads artifacts to maven .m2 default location?

From:
Phil Hagelberg
Date:
2012-07-23 @ 21:49
On Sun, Jul 15, 2012 at 4:46 PM, George Oliver <georgeolivergo@gmail.com> wrote:
> As an experiment I deleted reply from my :local-repo
> (C:\george\lib\.m2\repository). Also the default ~/.m2 repo was deleted.
> Then I reran lein trampoline repl. Lein then downloaded reply to my
> :local-repo, and exited with the same error.

It looks like this is just a bug in Leiningen; the trampoline task
isn't honoring :local-repo. I've created an issue to track this:

  https://github.com/technomancy/leiningen/issues/695

-Phil

Re: [leiningen] lein2 trampoline on Windows XP doesn't use :local-repo but downloads artifacts to maven .m2 default location?

From:
George Oliver
Date:
2012-08-25 @ 02:57
On Mon, Jul 23, 2012 at 2:49 PM, Phil Hagelberg <phil@hagelb.org> wrote:

>
> It looks like this is just a bug in Leiningen; the trampoline task
> isn't honoring :local-repo. I've created an issue to track this:
>
>   https://github.com/technomancy/leiningen/issues/695
>
>
>
Excited to see this issue closed! I can now run 'lein trampoline repl'
successfully. However the behavior of the original error with 'lein
trampoline cljsbuild repl-launch firefox http://localhost:3000/repl-demo'
persists; Lein downloads dependencies to the %userprofile%\.m2 repo rather
than the :local-repo in my profile.

Note that just 'lein trampoline repl' respects the :local-repo. Any clue
what could be the problem here? It seems weird that cljsbuild would mess
with the .m2 repo.


thanks, George