timperrett / lift-shiro

Lift Integration with the Shiro security framework
http://blog.getintheloop.eu/2011/08/23/using-apache-shiro-with-lift/
Apache License 2.0
50 stars 32 forks source link

Unable to build/run #9

Closed agoodno closed 13 years ago

agoodno commented 13 years ago

Hi, your lift-shiro project looks like just what we're looking for. I'm having problems running it though.

1 ) I had to update the reference to the maven repo becuase it looks like your domain is not resolving.

diff --git a/project/plugins/build.sbt b/project/plugins/build.sbt index 31d6ae1..82a69ee 100644 --- a/project/plugins/build.sbt +++ b/project/plugins/build.sbt @@ -1,4 +1,4 @@ -resolvers += "web-plugin.repo" at "http://siasia.github.com/maven2"

+resolvers += "web-plugin.repo" at "https://github.com/siasia/siasia.github.com/tree/master/maven2"

addSbtPlugin("com.github.siasia" %% "xsbt-web-plugin" % "0.1.2")

2) Building using sbt 0.11.0, I get:

$ ./sbt [info] Loading project definition from /home/agoodno/work/scala/lift-shiro/project/plugins [error] java.lang.NoClassDefFoundError: sbt/JettyConfiguration [error] Use 'last' for the full log. Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?

Any ideas?

Andy

timperrett commented 13 years ago

This is very odd. I've blown away my .ivy2 and .m2 and everything packages fine. Please also clear your local caches... you probably have something broken.

agoodno commented 13 years ago

Ok, blowing away both caches fixed the compile. Thanks for the suggestion. Shouldn't there now be a task in the jetty context so I can just do 'jetty:run' to run the example? Is there another way to run it? Also, just to follow-up on the resolver problem above. I'm still unable to ping siasia.github.com or browse to that URL so I'm not sure how that's working.

timperrett commented 13 years ago

You need to do the following to run the sample:

project example [...] jetty-run

agoodno commented 13 years ago

Yeah I tried that too:

agoodno@agoodno-ubuntu:~/work/scala/lift-shiro$ ./sbt [info] Loading project definition from /home/agoodno/work/scala/lift-shiro/project/plugins [info] Set current project to lift-shiro-root (in build file:/home/agoodno/work/scala/lift-shiro/)

project [info] lift-shiro-root (in build file:/home/agoodno/work/scala/lift-shiro/) project example [error] Not a valid project ID: example [error] project example [error] ^

timperrett commented 13 years ago

Sorry, I was thinking of another project. Please use the SBT documentation to become familiar with project navigation etc. Here's what you need to do in the immediate:

[lift-shiro-root]> projects [info] In file:/Users/timperrett/repositories/lift/lift-shiro/ [info] lift-shiro-example [info] lift-shiro [info] * lift-shiro-root [lift-shiro-root]> project lift-shiro-example [info] Set current project to lift-shiro-example (in build file:/Users/timperrett/repositories/lift/lift-shiro/) [lift-shiro-example]> jetty-run

agoodno commented 13 years ago

Ok, that worked. Our projects are structured differently and it didn't occur to me that the project name would be different than the directory that it's in. Thanks.