Search code examples
eclipsegoogle-app-engineclojurering

"lein ring uberwar" just hanging there


I'm trying to figure out how to create uberwar from Clojure Ring and Compojure application in Eclipse Mars with Counterclockwise on Windows.

I'm following this tutorial, and I'm basically doing this:

  1. in package explorer, I right click and create new Clojure project
  2. right click newly created project, Leiningen, Generic Leiningen Command Line, enter lein new compojure-app gae-app-demo as per tutorial
  3. this creates the Hello World app which I can run locally without any problems
  4. then I go on and in the same way as in step 2 run lein ring uberwar
  5. This starts new Console window which doesn't output anything and basically hangs until I manually stop it. It doesn't output anything, it doesn't report any errors, and it doesn't create war in target folder.

I've checked several other tutorials and I didn't find anybody having problems with creating uberwar. Where can I start debugging this, am I doing something wrong? This is one of the basic things one needs to do with every Ring/Compjure application, so it should be something simple I'm missing I hope.


Solution

  • When you do step 1, you create a generic project, with CCW using leiningen in the background. With step 2, you create another project inside, using the lein new command. I don't think this is what you want.

    Since you want it all from Eclipse/CCW, the first thing is to get the latest version (0.34.0 as I write) and install it (instructions: http://doc.ccw-ide.org/documentation.html#install-as-standalone-product).

    Use the wizard to create your project, but change the text default in the Leiningen template field with compojure-app. Wait a few secs after hitting enter, as leiningen will download your deps.

    Open project.clj. Right-click for the menu and select Leiningen | Generic Leiningen Command Line (or Alt+L then L), to open the lein prompt.

    Type uberjar (this replaces <task> at the prompt) then hit enter. Wait a few secs and watch the status of the jar being built in the console tab.

    Hope this helps.