Hello Lift community,
I'm a JEE developer and I'm looking for a cool and powerful web-framework, which can use my JEE business/backend components (should be simply possible with an JNDI lookup of my EnterpriseJavaBeans). So I found the
liftweb.net page and I'm really interested in using the Lift framework (because it is flexible as rails, grails, etc. - I need no persistence-layer from a web-framework, while this already exist's in my JEE environment ).
My aim:
- create a base-lift project using maven instead of the sbt ( it should be integrated as a module into an existing maven-project later on )
- I would like to use the lift 2.5-M2 version
- I would like to use the scala version 2.9.2
- with that base I want to learn the power of lift (by reading the exploring.lift /simply.lift books)
- in addition I also have to learn scala ( that should not be a big problem )
- create a REST interface, that should be used from lift itself, but also give the chance, that another client (like an android-app/ iOs app) can use the interface. Business objects should interpreted/mapped/converted as JSON objects for client's
- I'm using a JBoss AS 7.1 app-server. I think it should not be a problem to deploy the lift-war file to the jboss instead of a jetty server. If not, then a jetty will be used for the web-client.
My problem:
At the moment it is hard to create a simple base web-app structure. Beside the simply-lift book I've started to read the exploring-lift book.
Next, we use Maven’s archetype:generate command to create the skeleton of our project:
mvn archetype:generate -U \
-DarchetypeGroupId=net.liftweb \
-DarchetypeArtifactId=lift-archetype-blank \
-DarchetypeVersion=2.0 \
-DarchetypeRepository=http://scala-tools.org/repo-releases \
-DgroupId=demo.helloworld \
-DartifactId=helloworld \
-Dversion=1.0-SNAPSHOT
it will be created, but the following part
Maven should output several pages of text. It may stop and ask you to confirm the properties configuration, in which case you can just hit <enter>. At the end you should get a message that says BUILD SUCCESSFUL. You’ve now successfully created your first project! Don’t believe us? Let’s run it to confirm:
cd helloworld
mvn jetty:run
does not work.
mvn jetty:run
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building helloworld Project 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-jetty-plugin:6.1.22:run (default-cli) @ helloworld >>>
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.818s
[INFO] Finished at: Fri Nov 02 10:58:22 CET 2012
[INFO] Final Memory: 5M/112M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project helloworld: Could not resolve dependencies for project demo.helloworld:helloworld:war:1.0-SNAPSHOT: Failed to collect dependencies for [net.liftweb:lift-mapper:jar:2.0 (compile), javax.servlet:servlet-api:jar:2.5 (provided), junit:junit:jar:4.7 (test), org.mortbay.jetty:jetty:jar:[6.1.6,7.0) (test), org.scala-lang:scala-compiler:jar:2.7.7 (test)]: No versions available for javax.mail:mail:jar:[1.4,1.4.3) within specified range -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
My next try is to call a mvn install (I think it should be executed, before I can start the jetty), but that doesn't work, too. It will return the same error above.
It's a pity. ( In addition this is not a solution to use newer releases of lift / scala )
Then I have downloaded the lift tar, which includes the different base projects of lift. They are all configured for the sbt.
Should I use the blank project, remove all sbt artefacts and create a own pom.xml? But then the big question is, what are the required dependencies, what do I have to configure? ...
I hope, some of you can help me, what I have to do, to create a lift-2.5/scala 2.9.2 blank web project with maven. Or can give me a base pom.xml, which can be used for an own project.
Thank's a lot! : )
Kind regards!
Christian
--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code