Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boot uber jar generation with stuart sierra component and clojure 1.7.0-alpha5 and above #193

Closed
stijnopheide opened this issue Apr 21, 2015 · 5 comments

Comments

@stijnopheide
Copy link

When executing an uber jar that has been generated with boot for an application that starts a com.stuartsierra.component with clojure-1.7.0-alpha5 (or beta1), component/start doesn't get executed.

An example project can be found here: https://github.com/stijnopheide/boot-component-uberjar

it works with clojure 1.7.0-alpha4

$ git checkout 1.7.0-alpha4
Switched to branch '1.7.0-alpha4'
$ boot build
Compiling 1/1 boot-component.core...
Writing pom.xml and pom.properties...
Adding uberjar entries...
Writing boot-component-0.1.0-BOOT.jar...
$ java -jar target/boot-component-0.1.0-BOOT.jar 
started
$

it doesn't with clojure 1.7.0-beta1 (or alpha5)

$ git checkout 1.7.0-beta1
Switched to branch '1.7.0-beta1'
$ boot build
Compiling 1/1 boot-component.core...
Writing pom.xml and pom.properties...
Adding uberjar entries...
Writing boot-component-0.1.0-BOOT.jar...
$ java -jar target/boot-component-0.1.0-BOOT.jar 
$ 

but it works with leiningen

$ lein clean && lein uberjar
Compiling boot-component.core
Created /Users/stijn/Documents/code/tryouts/boot-component/target/boot-component-0.1.0-LEININGEN.jar
Created /Users/stijn/Documents/code/tryouts/boot-component/target/boot-component-0.1.0-LEININGEN-standalone.jar
$ java -jar target/boot-component-0.1.0-LEININGEN-standalone.jar 
started
$ 
$ boot -u
#https://github.com/boot-clj/boot
#Tue Apr 21 13:18:09 CEST 2015
BOOT_CLOJURE_VERSION=1.6.0
BOOT_VERSION=2.0.0-rc14
#App version: 2.0.0-rc14

Changing the BOOT_CLOJURE_VERSION doesn't have an effect on the result, although I didn't try out all possible combinations.

@micha
Copy link
Contributor

micha commented Apr 28, 2015

Can you see a difference in the JAR files? Like is there something missing from the boot JAR that's in the lein one?

@danielsz
Copy link
Contributor

There is an example in the system library that might be useful in the context of this discussion.

https://github.com/danielsz/system/tree/master/examples/boot

@micha
Copy link
Contributor

micha commented May 20, 2015

This issue has been fixed in subsequent releases of Clojure, I think. Please see danielsz/holygrail for examples of boot and system in action! Feel free to reopen if necessary :)

@flyingmachine
Copy link

I just tried using component with Clojure 1.7.0 and ran into this issue. Here's my example project: https://github.com/flyingmachine/boot-component-issue . If I change the clojure version to 1.6.0 it works fine.

Weirdly, when I try to start a component system in another project which has a ton of dependencies, it works OK. Still, a project with just clojure and component as dependencies should be able to work fine.

@flyingmachine
Copy link

correction - it looks like I was wrong when I said "when I try to start a component in another project it works OK", it's still not starting 😨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants