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.
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. > Youve now successfully created your first project! Dont believe us? Lets > run it to confirm:
> cd helloworld
> mvn jetty:run
> [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/DependencyResolution...
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.
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.
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. Youve now successfully created your first project! Dont believe us? Lets 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
Take a look at this project here: https://github.com/andreak/on-example-rpm
It's tries to address "everything" a JEE-developer wants to know jumping on the Scala/Lift-train. Disclaimer; I'm no JEE-container fan and try to avoid using JEE-containers/EJBs etc. as much as I can, but I have been using Scala/Lift successfully in production for over a year with WebLogic Server co-existing with JSF. That being said, I've had even more success using Scala/Lift in Tomcat with Spring/Hibernate.
Feel free to ask for help, I'd be happy to help you out.
--
Andreas Joseph Krogh <andreak@officenet.no> mob: +47 909 56 963
Senior Software Developer / CTO - OfficeNet AS - http://www.officenet.no
Public key: http://home.officenet.no/~andreak/public_key.asc
If I want to start with a new maven-lift project, is it enough to use the scala / lift-webkit dependencies?
Is following possible: - Using the base project ( scala_29/lift_blank ) from the lift - download archive - Create an own pom file to use it as a maven project - Add the dependencies appropriate to your pom files
If I want to start with a new maven-lift project, is it enough to use the scala / lift-webkit dependencies?
Yes, and the scala-maven-plugin to compile it all of course.
Is following possible:
- Using the base project ( scala_29/lift_blank ) from the lift - download archive
- Create an own pom file to use it as a maven project
- Add the dependencies appropriate to your pom files
Many thanks for your help!!
I don't know how up-to-date the lift_blank project is and in general I don't trust "example-blank-project-xxx". I'd go for creating your own POM for your web-project, as you would otherwise do, and include the deps which I've used in the example-project.
Try it out and let me know if you have problems.
--
Andreas Joseph Krogh <andreak@officenet.no> mob: +47 909 56 963
Senior Software Developer / CTO - OfficeNet AS - http://www.officenet.no
Public key: http://home.officenet.no/~andreak/public_key.asc
Those templates for 2.5 are very well maintain, I make sure they all work
as we release new versions of lift, so, if you decide to go the sbt route
you can trust them.
Thanks
Diego
Diego
Sent from my android cell
On Nov 2, 2012 8:40 AM, <andr...@officenet.no> wrote:
> På fredag 02. november 2012 kl. 13:05:54, skrev Christian Thomas <
> chris...@googlemail.com>:
> Okay, next try:
> If I want to start with a new maven-lift project, is it enough to use the
> scala / lift-webkit dependencies?
> Yes, and the scala-maven-plugin to compile it all of course.
> Is following possible:
> - Using the base project ( scala_29/lift_blank ) from the lift - download
> archive
> - Create an own pom file to use it as a maven project
> - Add the dependencies appropriate to your pom files
> Many thanks for your help!!
> I don't know how up-to-date the lift_blank project is and in general I
> don't trust "example-blank-project-xxx". I'd go for creating your own POM
> for your web-project, as you would otherwise do, and include the deps which
> I've used in the example-project.
> Try it out and let me know if you have problems.
I've started to create my base maven pom file. Following steps I have done:
1. I have create with netbeans a new maven project by using the archtype lift-archetype-basic_2.9.1 to get another pom file. 2. Then I have deployed the generated war file on my local jboss to see, that it works -> there was no problem 3. I have created an empty folder lift-maven-base and copied the src folder including all content of the /scala_29/lift_blank download archive 4. Then I have started to write my pom file by influence of andreak's project and the generated one of step 1. Here you can see the first version: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <groupId>de.lift</groupId> <artifactId>lift-mvn-base</artifactId> <name>lift maven base project</name> <version>1.0.0-SNAPSHOT</version> <packaging>war</packaging>
5. Normally I'm using the Eclipse IDE ( currently Juno, while I don't like the m2plugin - I'm using instead of it the maven-eclipse-plugin ). So I've found the run-jetty-run eclipse plugin 6. mvn install works, but the jetty (started inside from eclipse) throws an error: <div> Error locating template: <b>/templates-hidden/default.html</b> <br/> Message: <b>expected closing tag of div</b> <br/> <pre> scala.xml.parsing.FatalError: expected closing tag of divscala.xml.parsing.MarkupParser$class.errorNoEnd(MarkupParser.scala:41) net.liftweb.util.PCDataXmlParser.errorNoEnd(PCDataMarkupParser.scala:98) scala.xml.parsing.MarkupParserCommon$class.xEndTag(MarkupParserCommon.scala :93) net.liftweb.util.PCDataXmlParser.xEndTag(PCDataMarkupParser.scala:98) scala.xml.parsing.MarkupParser$class.element1(MarkupParser.scala:543) net.liftweb.util.PCDataXmlParser.element1(PCDataMarkupParser.scala:98) scala.xml.parsing.MarkupParser$class.content1(MarkupParser.scala:396) net.liftweb.util.PCDataXmlParser.content1(PCDataMarkupParser.scala:98) scala.xml.parsing.MarkupParser$class.content(MarkupParser.scala:417) net.liftweb.util.PCDataXmlParser.content(PCDataMarkupParser.scala:98) scala.xml.parsing.MarkupParser$class.element1(MarkupParser.scala:542) net.liftweb.util.PCDataXmlParser.element1(PCDataMarkupParser.scala:98) scala.xml.parsing.MarkupParser$class.content1(MarkupParser.scala:396) net.liftweb.util.PCDataXmlParser.content1(PCDataMarkupParser.scala:98) ....
The first time some closing tags of h1 and img were expected, but that one I don't find (see the attachment). I think I can remove the whole html files, if I will start to implement the app of the exploring lift book.
Okay, to this time I think it looks good.
But what do you experts think? Would you optimize something of the pom, or would you do something completly different?
Please give me some feedback (Remember: This should the base to learn lift by reading the free books with the examples. Later on this base will be used for the proper project).
Thank you very much : )
If someone has enough time or is interested in, I have add the base- project as an attachment.
I've started to create my base maven pom file. Following steps I have done:
[snip]
6. mvn install works, but the jetty (started inside from eclipse) throws an error:
<div>
Error locating template:
<b>/templates-hidden/default.html</b>
<br/>
Message:
<b>expected closing tag of div</b>
<br/>
<pre>
scala.xml.parsing.FatalError: expected closing tag of divscala.xml.parsing.MarkupParser$class.errorNoEnd(MarkupParser.scala:41) net.liftweb.util.PCDataXmlParser.errorNoEnd(PCDataMarkupParser.scala:98) scala.xml.parsing.MarkupParserCommon$class.xEndTag(MarkupParserCommon.scala:93) net.liftweb.util.PCDataXmlParser.xEndTag(PCDataMarkupParser.scala:98) scala.xml.parsing.MarkupParser$class.element1(MarkupParser.scala:543) net.liftweb.util.PCDataXmlParser.element1(PCDataMarkupParser.scala:98) scala.xml.parsing.MarkupParser$class.content1(MarkupParser.scala:396) net.liftweb.util.PCDataXmlParser.content1(PCDataMarkupParser.scala:98) scala.xml.parsing.MarkupParser$class.content(MarkupParser.scala:417) net.liftweb.util.PCDataXmlParser.content(PCDataMarkupParser.scala:98) scala.xml.parsing.MarkupParser$class.element1(MarkupParser.scala:542) net.liftweb.util.PCDataXmlParser.element1(PCDataMarkupParser.scala:98) scala.xml.parsing.MarkupParser$class.content1(MarkupParser.scala:396) net.liftweb.util.PCDataXmlParser.content1(PCDataMarkupParser.scala:98)
....
The first time some closing tags of h1 and img were expected, but that one I don't find (see the attachment). I think I can remove the whole html files, if I will start to implement the app of the exploring lift book.
Okay, to this time I think it looks good.
But what do you experts think? Would you optimize something of the pom, or would you do something completly different?
Please give me some feedback (Remember: This should the base to learn lift by reading the free books with the examples. Later on this base will be used for the proper project).
Thank you very much : )
If someone has enough time or is interested in, I have add the base- project as an attachment.
I'm unable to start jetty:
$ mvn jetty:run
[INFO] Scanning for projects...
Downloading: https://www.officenet.no/nexus/content/groups/public/org/codehaus/mojo/maven-metadata.xml
Downloading: https://www.officenet.no/nexus/content/groups/public/org/apache/maven/plugins/maven-metadata.xml
Downloaded: https://www.officenet.no/nexus/content/groups/public/org/apache/maven/plugins/maven-metadata.xml (11 KB at 6.3 KB/sec)
Downloaded: https://www.officenet.no/nexus/content/groups/public/org/codehaus/mojo/maven-metadata.xml (25 KB at 12.0 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.897s
[INFO] Finished at: Fri Nov 02 19:35:41 CET 2012
[INFO] Final Memory: 18M/481M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'jetty' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/home/andreak/.m2/repository), internal-repository (https://www.officenet.no/nexus/content/groups/public/)] -> [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/NoPluginFoundForPrefixException
Please configure your pom correctly (include the jetty-plugin) and I'll be able to help you.
--
Andreas Joseph Krogh <andreak@officenet.no> mob: +47 909 56 963
Senior Software Developer / CTO - OfficeNet AS - http://www.officenet.no
Public key: http://home.officenet.no/~andreak/public_key.asc
That's correct, I have installed the run-jetty-run eclipse plugin. Not the maven plugin. But I will configure the jetty maven plugin and will attach the sources again... so you should be able to start the project without anyting else....
Am Freitag, 2. November 2012 19:38:33 UTC+1 schrieb andreak:
> På fredag 02. november 2012 kl. 17:10:39, skrev Christian Thomas <
> chri...@googlemail.com <javascript:>>:
> So,
> I've started to create my base maven pom file. Following steps I have done:
> [snip] > 6. mvn install works, but the jetty (started inside from eclipse) throws > an error:
> <div>
> Error locating template: > <b>/templates-hidden/default.html</b>
> <br/>
> Message: > <b>expected closing tag of div</b>
> <br/> > <pre>
> scala.xml.parsing.FatalError: expected closing tag of > divscala.xml.parsing.MarkupParser$class.errorNoEnd(MarkupParser.scala:41) > net.liftweb.util.PCDataXmlParser.errorNoEnd(PCDataMarkupParser.scala:98) > scala.xml.parsing.MarkupParserCommon$class.xEndTag(MarkupParserCommon.scala :93) > net.liftweb.util.PCDataXmlParser.xEndTag(PCDataMarkupParser.scala:98) > scala.xml.parsing.MarkupParser$class.element1(MarkupParser.scala:543) > net.liftweb.util.PCDataXmlParser.element1(PCDataMarkupParser.scala:98) > scala.xml.parsing.MarkupParser$class.content1(MarkupParser.scala:396) > net.liftweb.util.PCDataXmlParser.content1(PCDataMarkupParser.scala:98) > scala.xml.parsing.MarkupParser$class.content(MarkupParser.scala:417) > net.liftweb.util.PCDataXmlParser.content(PCDataMarkupParser.scala:98) > scala.xml.parsing.MarkupParser$class.element1(MarkupParser.scala:542) > net.liftweb.util.PCDataXmlParser.element1(PCDataMarkupParser.scala:98) > scala.xml.parsing.MarkupParser$class.content1(MarkupParser.scala:396) > net.liftweb.util.PCDataXmlParser.content1(PCDataMarkupParser.scala:98)
> ....
> The first time some closing tags of h1 and img were expected, but that one > I don't find (see the attachment). I think I can remove the whole html > files, if I will start to implement the app of the exploring lift book.
> Okay, to this time I think it looks good.
> But what do you experts think? Would you optimize something of the pom, or > would you do something completly different?
> Please give me some feedback (Remember: This should the base to learn lift > by reading the free books with the examples. Later on this base will be > used for the proper project).
> Thank you very much : )
> If someone has enough time or is interested in, I have add the base- > project as an attachment.
I have add the jetty plugin for maven and it works! Why ever the run-jetty-run eclipse plugin has some issues?! I would like to use the run-jetty-run for hot-deployment (any changes -> automatically deployment).
If I would use the maven-jetty-plugin, I have also to configure the jrebel plugin? (this requires a licence, right?) Or are there another ways for hot-deployment techniques?
What do you think about the pom configuration (especially the scala / lift config). Is it okay, or do you prefer some other settings when writing lift apps?
Also here is the new attachment.
Christian
PS: okay, I've found, that the run-jetty-run plugin provides the version 6.1.26. The maven plugin is version 8.1.7.v20120910. May that's the problem...
Am Freitag, 2. November 2012 19:41:47 UTC+1 schrieb Christian Thomas:
> That's correct, I have installed the run-jetty-run eclipse plugin. Not the > maven plugin. But I will configure the jetty maven plugin and will attach > the sources again... so you should be able to start the project without > anyting else....
> Am Freitag, 2. November 2012 19:38:33 UTC+1 schrieb andreak:
>> På fredag 02. november 2012 kl. 17:10:39, skrev Christian Thomas <
>> chri...@googlemail.com>:
>> So,
>> I've started to create my base maven pom file. Following steps I have >> done:
>> [snip] >> 6. mvn install works, but the jetty (started inside from eclipse) throws >> an error:
>> <div>
>> Error locating template: >> <b>/templates-hidden/default.html</b>
>> <br/>
>> Message: >> <b>expected closing tag of div</b>
>> <br/> >> <pre>
>> scala.xml.parsing.FatalError: expected closing tag of >> divscala.xml.parsing.MarkupParser$class.errorNoEnd(MarkupParser.scala:41) >> net.liftweb.util.PCDataXmlParser.errorNoEnd(PCDataMarkupParser.scala:98) >> scala.xml.parsing.MarkupParserCommon$class.xEndTag(MarkupParserCommon.scala :93) >> net.liftweb.util.PCDataXmlParser.xEndTag(PCDataMarkupParser.scala:98) >> scala.xml.parsing.MarkupParser$class.element1(MarkupParser.scala:543) >> net.liftweb.util.PCDataXmlParser.element1(PCDataMarkupParser.scala:98) >> scala.xml.parsing.MarkupParser$class.content1(MarkupParser.scala:396) >> net.liftweb.util.PCDataXmlParser.content1(PCDataMarkupParser.scala:98) >> scala.xml.parsing.MarkupParser$class.content(MarkupParser.scala:417) >> net.liftweb.util.PCDataXmlParser.content(PCDataMarkupParser.scala:98) >> scala.xml.parsing.MarkupParser$class.element1(MarkupParser.scala:542) >> net.liftweb.util.PCDataXmlParser.element1(PCDataMarkupParser.scala:98) >> scala.xml.parsing.MarkupParser$class.content1(MarkupParser.scala:396) >> net.liftweb.util.PCDataXmlParser.content1(PCDataMarkupParser.scala:98)
>> ....
>> The first time some closing tags of h1 and img were expected, but that >> one I don't find (see the attachment). I think I can remove the whole html >> files, if I will start to implement the app of the exploring lift book.
>> Okay, to this time I think it looks good.
>> But what do you experts think? Would you optimize something of the pom, >> or would you do something completly different?
>> Please give me some feedback (Remember: This should the base to learn >> lift by reading the free books with the examples. Later on this base will >> be used for the proper project).
>> Thank you very much : )
>> If someone has enough time or is interested in, I have add the base- >> project as an attachment.
I have add the jetty plugin for maven and it works! Why ever the run-jetty-run eclipse plugin has some issues?! I would like to use the run-jetty-run for hot-deployment (any changes -> automatically deployment).
If I would use the maven-jetty-plugin, I have also to configure the jrebel plugin? (this requires a licence, right?) Or are there another ways for hot-deployment techniques?
What do you think about the pom configuration (especially the scala / lift config). Is it okay, or do you prefer some other settings when writing lift apps?
Also here is the new attachment.
Thanks, I've got it up and running now.
Why the run-jetty-run Eclipse-plugin doesn't work is beyond me, I simply don't know.
I see the following "strangeness" in you app;
You've chosen to use (configured in Boot.scala) Html5Properties, yet default.html isn't valid HTML5, or xhtml for that matter. IDEA highlights the errors so I spot them easily, look at line 69 for example. And - in HTML5, the HR-tag doesn't have an end-tag. default.html declares a doc-type of xhtml so either you should convert it to HTML5, to match your configured LiftRules.htmlProperties, or change LiftRules.htmlProperties.
I find it way easier to work with xhtml, so I easily can se markup-errors, as input and use HTML5 as output. Luckily, Lift supports this by configuring XHtmlInHtml5OutProperties like this:
LiftRules.htmlProperties.default.set((r: Req) => new XHtmlInHtml5OutProperties(r.userAgent))
While using xhtml as input-format, using data-lift and other data-* tags work.
Your maven-config looks fine, although I don't think you need http://scala-tools.org/repo-releases as a repo anymore.
When it comes to "compile-reload" JReble has a free license for use with Scala-code, that's my best option.
--
Andreas Joseph Krogh <andreak@officenet.no> mob: +47 909 56 963
Senior Software Developer / CTO - OfficeNet AS - http://www.officenet.no
Public key: http://home.officenet.no/~andreak/public_key.asc
> På fredag 02. november 2012 kl. 20:42:45, skrev Christian Thomas <
> chri...@googlemail.com <javascript:>>:
> Okay,
> I have add the jetty plugin for maven and it works! Why ever the > run-jetty-run eclipse plugin has some issues?! I would like to use the > run-jetty-run for hot-deployment (any changes -> automatically deployment).
> If I would use the maven-jetty-plugin, I have also to configure the jrebel > plugin? (this requires a licence, right?) Or are there another ways for > hot-deployment techniques?
> What do you think about the pom configuration (especially the scala / lift > config). Is it okay, or do you prefer some other settings when writing lift > apps?
> Also here is the new attachment.
> Thanks, I've got it up and running now.
> Why the run-jetty-run Eclipse-plugin doesn't work is beyond me, I simply > don't know.
I will try to use a newer (equal to the maven variant) version of the run-jetty-run embedded jetty server.
> I see the following "strangeness" in you app;
> You've chosen to use (configured in Boot.scala) Html5Properties, yet > default.html isn't valid HTML5, or xhtml for that matter. IDEA highlights > the errors so I spot them easily, look at line 69 for example. And - in > HTML5, the HR-tag doesn't have an end-tag. default.html declares a doc-type > of xhtml so either you should convert it to HTML5, to match your configured > LiftRules.htmlProperties, or change LiftRules.htmlProperties.
Yeah, you're right. After the first run with the *run-jetty-run* plugin I became the error, that some end tags are expected ( some of them were the hr tag ). To avoid the error, I have (for this test) give the server its missing end-tags in hope, that the web-app would run.
> I find it way easier to work with xhtml, so I easily can se markup-errors, > as input and use HTML5 as output. Luckily, Lift supports this by > configuring XHtmlInHtml5OutProperties like this:
> LiftRules.htmlProperties.default.set((r: Req) => new > XHtmlInHtml5OutProperties(r.userAgent))
> While using xhtml as input-format, using data-lift and other data-* tags > work.
May it is interesting for you, that another, may newer jrebel-maven-plugin instead of the javarebel-maven-plugin exist's.
I like it. Simply run mvn jetty:run and mvn scala:cc and thats it.
To the run-jetty-run (a may alternative for hot-deployment):
I have switched to version 7 and 8, but problem still exists. The eclipse internal codepage is set to UTF8 - like the maven env.
Kind regards!
Christian
Am Samstag, 3. November 2012 23:37:31 UTC+1 schrieb Christian Thomas:
> Am Freitag, 2. November 2012 21:34:24 UTC+1 schrieb andreak:
>> På fredag 02. november 2012 kl. 20:42:45, skrev Christian Thomas <
>> chri...@googlemail.com>:
>> Okay,
>> I have add the jetty plugin for maven and it works! Why ever the >> run-jetty-run eclipse plugin has some issues?! I would like to use the >> run-jetty-run for hot-deployment (any changes -> automatically deployment).
>> If I would use the maven-jetty-plugin, I have also to configure the >> jrebel plugin? (this requires a licence, right?) Or are there another ways >> for hot-deployment techniques?
>> What do you think about the pom configuration (especially the scala / >> lift config). Is it okay, or do you prefer some other settings when writing >> lift apps?
>> Also here is the new attachment.
>> Thanks, I've got it up and running now.
>> Why the run-jetty-run Eclipse-plugin doesn't work is beyond me, I simply >> don't know.
> I will try to use a newer (equal to the maven variant) version of the > run-jetty-run embedded jetty server.
>> I see the following "strangeness" in you app;
>> You've chosen to use (configured in Boot.scala) Html5Properties, yet >> default.html isn't valid HTML5, or xhtml for that matter. IDEA highlights >> the errors so I spot them easily, look at line 69 for example. And - in >> HTML5, the HR-tag doesn't have an end-tag. default.html declares a doc-type >> of xhtml so either you should convert it to HTML5, to match your configured >> LiftRules.htmlProperties, or change LiftRules.htmlProperties.
> Yeah, you're right. After the first run with the *run-jetty-run* plugin I > became the error, that some end tags are expected ( some of them were the > hr tag ). To avoid the error, I have (for this test) give the server its > missing end-tags in hope, that the web-app would run.
>> I find it way easier to work with xhtml, so I easily can se >> markup-errors, as input and use HTML5 as output. Luckily, Lift supports >> this by configuring XHtmlInHtml5OutProperties like this:
>> LiftRules.htmlProperties.default.set((r: Req) => new >> XHtmlInHtml5OutProperties(r.userAgent))
>> While using xhtml as input-format, using data-lift and other data-* tags >> work.
I currently use maven with my lift projects because I know maven fairly well and it's integrated with will intellij, which I find to be a very productive tool for scala programming. The IDE can read the pom files and automatically manage my dependencies in addition to the other useful plugins it has.
I created a sort of skeleton app based on lift 2.5-SNAPSHOT and scala 2.9.2 that may also help you jump-start.
I typically have a parent pom, a template project, and then other sub-projects that either inherit from or are clones of the template project.
It's also set up with my typical setup. MySQL + Lift + Squeryl + Twitter Bootstrap.
> May it is interesting for you, that another, may newer jrebel-maven-plugin > instead of the javarebel-maven-plugin exist's.
> I like it. Simply run mvn jetty:run and mvn scala:cc and thats it.
> To the run-jetty-run (a may alternative for hot-deployment):
> I have switched to version 7 and 8, but problem still exists. The eclipse > internal codepage is set to UTF8 - like the maven env.
> Kind regards!
> Christian
> Am Samstag, 3. November 2012 23:37:31 UTC+1 schrieb Christian Thomas:
>> Hey andreak,
>> thanks for response.
>> Am Freitag, 2. November 2012 21:34:24 UTC+1 schrieb andreak:
>>> På fredag 02. november 2012 kl. 20:42:45, skrev Christian Thomas <
>>> chri...@googlemail.com>:
>>> Okay,
>>> I have add the jetty plugin for maven and it works! Why ever the >>> run-jetty-run eclipse plugin has some issues?! I would like to use the >>> run-jetty-run for hot-deployment (any changes -> automatically deployment).
>>> If I would use the maven-jetty-plugin, I have also to configure the >>> jrebel plugin? (this requires a licence, right?) Or are there another ways >>> for hot-deployment techniques?
>>> What do you think about the pom configuration (especially the scala / >>> lift config). Is it okay, or do you prefer some other settings when writing >>> lift apps?
>>> Also here is the new attachment.
>>> Thanks, I've got it up and running now.
>>> Why the run-jetty-run Eclipse-plugin doesn't work is beyond me, I simply >>> don't know.
>> I will try to use a newer (equal to the maven variant) version of the >> run-jetty-run embedded jetty server.
>>> I see the following "strangeness" in you app;
>>> You've chosen to use (configured in Boot.scala) Html5Properties, yet >>> default.html isn't valid HTML5, or xhtml for that matter. IDEA highlights >>> the errors so I spot them easily, look at line 69 for example. And - in >>> HTML5, the HR-tag doesn't have an end-tag. default.html declares a doc-type >>> of xhtml so either you should convert it to HTML5, to match your configured >>> LiftRules.htmlProperties, or change LiftRules.htmlProperties.
>> Yeah, you're right. After the first run with the *run-jetty-run* plugin >> I became the error, that some end tags are expected ( some of them were the >> hr tag ). To avoid the error, I have (for this test) give the server its >> missing end-tags in hope, that the web-app would run.
>>> I find it way easier to work with xhtml, so I easily can se >>> markup-errors, as input and use HTML5 as output. Luckily, Lift supports >>> this by configuring XHtmlInHtml5OutProperties like this:
>>> LiftRules.htmlProperties.default.set((r: Req) => new >>> XHtmlInHtml5OutProperties(r.userAgent))
>>> While using xhtml as input-format, using data-lift and other data-* tags >>> work.