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

default-war-root fails sometimes in IntelliJ #18

Open
jevgeni opened this issue May 1, 2011 · 2 comments
Open

default-war-root fails sometimes in IntelliJ #18

jevgeni opened this issue May 1, 2011 · 2 comments

Comments

@jevgeni
Copy link

jevgeni commented May 1, 2011

default-war-root should look for "war" locaton using some other point (maybe, project.clj?) as it may fail sometimes. The reason is the following:

When I do development in REPL in IntelliJ La Clojure REPL, the baseLoader is here:
user=> (-> (clojure.lang.RT/baseLoader)
(.getResource "."))

<URL file:/home/jevgeni/projects/sandbox/lib/>

However, if I build/make the project, the REPL will have another baseLoader:
user=> (-> (clojure.lang.RT/baseLoader)
(.getResource "."))

<URL file:/home/jevgeni/projects/sandbox/out/production/sandbox/>

This all will make static resource unavailable, until you remove the "out" manually.

This issue is definitely IntelliJ's specific, but, I guess, the default-war-root should be more robust or give some feedback on this... Otherwise you can spend few hours searching why static resource is found on one machine and isn't on another :)

@gcv
Copy link
Owner

gcv commented May 10, 2011

  1. Did you solve the problem by passing :war-root to your def-appengine-app form?
  2. Would it help if default-war-root checks for the existence of a "war" directory where expected?

@jevgeni
Copy link
Author

jevgeni commented May 11, 2011

the workaround is to rm -rf out folder in the project, so the repl would start with correct root (that is I didnt use war-root property). The problem was that the repl was starting in a different location than the one, expected by app engine magic. I don't think checking for war folder would help, as sometimes "out" contains war folder... I think you could check for project.clj presence (i guess you already depend on that for gae preparation stuff) in the baseLoader folder.

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

2 participants