Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Need jump-start to create a base lift 2.5 project with maven
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  15 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Christian Thomas  
View profile  
 More options Nov 2 2012, 6:22 am
From: Christian Thomas <chris...@googlemail.com>
Date: Fri, 2 Nov 2012 03:22:04 -0700 (PDT)
Local: Fri, Nov 2 2012 6:22 am
Subject: Need jump-start to create a base lift 2.5 project with maven

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.

But following does not work ( Exploring Lift<http://exploring.liftweb.net/master/index-1.html> )
:

> Next, we use Maven’s archetype:generate command to create the skeleton of
> our project:

mvn archetype:generate -U \

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

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
andr...@officenet.no  
View profile  
 More options Nov 2 2012, 7:20 am
From: andr...@officenet.no
Date: Fri, 2 Nov 2012 12:19:41 +0100 (CET)
Local: Fri, Nov 2 2012 7:19 am
Subject: Sv: [Lift] Need jump-start to create a base lift 2.5 project with maven

På fredag 02. november 2012 kl. 11:22:04, skrev Christian Thomas <chris81t@googlemail.com>:
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. 
 
But following does not work ( Exploring Lift ) :
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
 
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
 

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christian Thomas  
View profile  
 More options Nov 2 2012, 7:57 am
From: Christian Thomas <chris...@googlemail.com>
Date: Fri, 2 Nov 2012 04:57:17 -0700 (PDT)
Local: Fri, Nov 2 2012 7:57 am
Subject: Re: [Lift] Need jump-start to create a base lift 2.5 project with maven

Hi andreak,

wow, thank you for your link to your example project.

You have combined many technologies together. So I have focused your "web"
project. Is it enough to include the dependency

<properties>
 <version.lift>2.5-M1</version.lift>
 <version.scala-maven-plugin>3.1.0</version.scala-maven-plugin>
 <version.scala>2.9.1</version.scala>
</properties>

...

<dependency>
  <groupId>net.liftweb</groupId>
  <artifactId>lift-webkit_${version.scala}</artifactId>
  <version>${version.lift}</version>
</dependency>
<dependency>
  <groupId>org.scala-lang</groupId>
  <artifactId>scala-library</artifactId>
  <version>${version.scala}</version>
</dependency>

....
<plugins>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>${version.scala-maven-plugin}</version>
<configuration>
<jvmArgs>
<jvmArg>-Xss1m</jvmArg>
<jvmArg>-Xmx512m</jvmArg>
</jvmArgs>
<scalaVersion>${version.scala}</scalaVersion>
<recompileMode>modified-only</recompileMode>
</configuration>
  </plugin>
</plugins>

to get everything I need to build a lift application? At the beginning I
would start with a plain lift- app to learn/understand it.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christian Thomas  
View profile  
 More options Nov 2 2012, 7:59 am
From: Christian Thomas <chris...@googlemail.com>
Date: Fri, 2 Nov 2012 04:59:15 -0700 (PDT)
Local: Fri, Nov 2 2012 7:59 am
Subject: Re: [Lift] Need jump-start to create a base lift 2.5 project with maven

I'm sorry, why ever while formatting the code-block the post would
published (it seems that I have pressed the wrong key-combination)

wait for a moment. I will continue my post...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christian Thomas  
View profile  
 More options Nov 2 2012, 8:05 am
From: Christian Thomas <chris...@googlemail.com>
Date: Fri, 2 Nov 2012 05:05:54 -0700 (PDT)
Local: Fri, Nov 2 2012 8:05 am
Subject: Re: [Lift] Need jump-start to create a base lift 2.5 project with maven

Okay, next try:

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

Many thanks for your help!!

Christian


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
andr...@officenet.no  
View profile  
 More options Nov 2 2012, 8:40 am
From: andr...@officenet.no
Date: Fri, 2 Nov 2012 13:39:54 +0100 (CET)
Local: Fri, Nov 2 2012 8:39 am
Subject: Sv: Re: [Lift] Need jump-start to create a base lift 2.5 project with maven

På fredag 02. november 2012 kl. 13:05:54, skrev Christian Thomas <chris81t@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.
 
--
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
 

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Diego Medina  
View profile  
 More options Nov 2 2012, 11:29 am
From: Diego Medina <di...@fmpwizard.com>
Date: Fri, 2 Nov 2012 11:29:00 -0400
Subject: Re: Sv: Re: [Lift] Need jump-start to create a base lift 2.5 project with maven

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:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christian Thomas  
View profile  
 More options Nov 2 2012, 12:10 pm
From: Christian Thomas <chris...@googlemail.com>
Date: Fri, 2 Nov 2012 09:10:39 -0700 (PDT)
Local: Fri, Nov 2 2012 12:10 pm
Subject: Re: Need jump-start to create a base lift 2.5 project with maven

So,

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>

 <repositories>
 <repository>
 <id>scala-tools.org</id>
 <name>Scala-tools Maven2 Repository</name>
 <url>http://scala-tools.org/repo-releases</url>
 </repository>
 </repositories>

 <pluginRepositories>
 <pluginRepository>
 <id>scala-tools.org</id>
 <name>Scala-tools Maven2 Repository</name>
 <url>http://scala-tools.org/repo-releases</url>
 </pluginRepository>
 </pluginRepositories>

 <properties>
 <version.scala>2.9.1</version.scala>
 <version.lift>2.5-M1</version.lift>

 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 <project.reporting.outputEncoding>${project.build.sourceEncoding}
</project.reporting.outputEncoding>
 </properties>

 <dependencyManagement>
 <dependencies>
 <dependency>
 <groupId>org.scala-lang</groupId>
 <artifactId>scala-library</artifactId>
 <version>${version.scala}</version>
 </dependency>

 <dependency>
 <groupId>net.liftweb</groupId>
 <artifactId>lift-mapper_${version.scala}</artifactId>
 <version>${version.lift}</version>
 </dependency>

 <dependency>
 <groupId>net.liftmodules</groupId>
 <artifactId>lift-jquery-module_${version.scala}</artifactId>
 <version>2.5-M1-1.0</version>
 </dependency>                
 </dependencies>    
 </dependencyManagement>

 <dependencies>
 <dependency>
 <groupId>org.scala-lang</groupId>
 <artifactId>scala-library</artifactId>
 </dependency>
 <dependency>
 <groupId>net.liftweb</groupId>
 <artifactId>lift-mapper_${version.scala}</artifactId>
 </dependency>                        
 <dependency>
 <groupId>net.liftmodules</groupId>
 <artifactId>lift-jquery-module_${version.scala}</artifactId>
 </dependency>                
 </dependencies>

 <build>
 <sourceDirectory>src/main/scala</sourceDirectory>
 <testSourceDirectory>src/test/scala</testSourceDirectory>

 <pluginManagement>
 <plugins>
 <plugin>
 <groupId>org.apache.maven.plugins</groupId>
 <artifactId>maven-eclipse-plugin</artifactId>
 <version>2.9</version>
 </plugin>
 <plugin>
 <groupId>net.alchim31.maven</groupId>
 <artifactId>scala-maven-plugin</artifactId>
 <version>3.1.0</version>
 </plugin>
 </plugins>      
 </pluginManagement>

 <plugins>    
 <plugin>
 <groupId>org.apache.maven.plugins</groupId>
 <artifactId>maven-eclipse-plugin</artifactId>
 <configuration>
 <downloadSources>true</downloadSources>
 <additionalProjectnatures>
 <projectnature>ch.epfl.lamp.sdt.core.scalanature</projectnature>
 </additionalProjectnatures>
 <additionalBuildcommands>
 <buildcommand>ch.epfl.lamp.sdt.core.scalabuilder</buildcommand>
 </additionalBuildcommands>
 <classpathContainers>
 <classpathContainer>ch.epfl.lamp.sdt.launching.SCALA_CONTAINER
</classpathContainer>
 <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER
</classpathContainer>
 </classpathContainers>ll
 </configuration>
 </plugin>        
 <plugin>
 <groupId>net.alchim31.maven</groupId>
 <artifactId>scala-maven-plugin</artifactId>
 <executions>
 <execution>
 <goals>
 <goal>compile</goal>
 <goal>testCompile</goal>
 </goals>
 </execution>
 </executions>

 <configuration>
 <charset>${project.build.sourceEncoding}</charset>      
 <jvmArgs>
 <jvmArg>-Xms64m</jvmArg>
 <jvmArg>-Xmx1024m</jvmArg>
 </jvmArgs>
 <scalaVersion>${version.scala}</scalaVersion>
 <recompileMode>modified-only</recompileMode>
 </configuration>
 </plugin>
 </plugins>
 </build>

</project>

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.

  lift_mvn_base.zip
23K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
andr...@officenet.no  
View profile  
 More options Nov 2 2012, 2:38 pm
From: andr...@officenet.no
Date: Fri, 2 Nov 2012 19:37:22 +0100 (CET)
Local: Fri, Nov 2 2012 2:37 pm
Subject: Sv: [Lift] Re: Need jump-start to create a base lift 2.5 project with maven

På fredag 02. november 2012 kl. 17:10:39, skrev Christian Thomas <chris81t@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'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
 

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christian Thomas  
View profile  
 More options Nov 2 2012, 2:41 pm
From: Christian Thomas <chris...@googlemail.com>
Date: Fri, 2 Nov 2012 11:41:47 -0700 (PDT)
Local: Fri, Nov 2 2012 2:41 pm
Subject: Re: [Lift] Re: Need jump-start to create a base lift 2.5 project with maven

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:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christian Thomas  
View profile  
 More options Nov 2 2012, 3:42 pm
From: Christian Thomas <chris...@googlemail.com>
Date: Fri, 2 Nov 2012 12:42:45 -0700 (PDT)
Local: Fri, Nov 2 2012 3:42 pm
Subject: Re: [Lift] Re: Need jump-start to create a base lift 2.5 project with maven

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.

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:

  lift_mvn_base-inc-jetty.zip
23K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
andr...@officenet.no  
View profile  
 More options Nov 2 2012, 4:34 pm
From: andr...@officenet.no
Date: Fri, 2 Nov 2012 21:33:11 +0100 (CET)
Local: Fri, Nov 2 2012 4:33 pm
Subject: Sv: Re: [Lift] Re: Need jump-start to create a base lift 2.5 project with maven

På fredag 02. november 2012 kl. 20:42:45, skrev Christian Thomas <chris81t@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 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
 

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christian Thomas  
View profile  
 More options Nov 3 2012, 6:37 pm
From: Christian Thomas <chris...@googlemail.com>
Date: Sat, 3 Nov 2012 15:37:31 -0700 (PDT)
Local: Sat, Nov 3 2012 6:37 pm
Subject: Re: Re: [Lift] Re: Need jump-start to create a base lift 2.5 project with maven

Hey andreak,

thanks for response.

Am Freitag, 2. November 2012 21:34:24 UTC+1 schrieb andreak:

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.

Oh great. I will have a look for this.

> Your maven-config looks fine, although I don't think you need
> http://scala-tools.org/repo-releases as a repo anymore.

Okay, I will remove the obsolete scala-repo. ...While checking your pom, I
have seen, that you use the scala-maven-plugin<http://posterous.implicit.ly/scala-maven-plugin-310>instead of the
maven-scala-plugin<http://scala-tools.org/mvnsites/maven-scala-plugin/usage.html>(that one I have found first). So I have seen, that your choice is the
newer one - so I switched the plugins.

> When it comes to "compile-reload" JReble has a free license for use with
> Scala-code, that's my best option.

Okay, I will have a look.

Perfect. Now I have a base to start learning lift / scala : )

Thank you for your time!

--


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christian Thomas  
View profile  
 More options Nov 4 2012, 7:25 am
From: Christian Thomas <chris...@googlemail.com>
Date: Sun, 4 Nov 2012 04:25:23 -0800 (PST)
Local: Sun, Nov 4 2012 7:25 am
Subject: Re: Re: [Lift] Re: Need jump-start to create a base lift 2.5 project with maven

So, I have subscribed a free jRebel scala licence and it work's fine!

@andreak: I have found in your pom following configured plugin:

 <plugin>
 <groupId>org.zeroturnaround</groupId>
 <artifactId>javarebel-maven-plugin</artifactId>
 <executions>
 <execution>
 <id>generate-rebel-xml</id>
 <phase>process-resources</phase>
 <goals>
 <goal>generate</goal>
 </goals>
 </execution>
 </executions>
 </plugin>

during the jRebel licence activation a maven guide was popup'd and gives me
the following one:

 <plugin>
 <groupId>org.zeroturnaround</groupId>
 <artifactId>jrebel-maven-plugin</artifactId>
 <version>1.1.1</version>
 </plugin>
...
 <plugin>
 <groupId>org.zeroturnaround</groupId>
 <artifactId>jrebel-maven-plugin</artifactId>
 <executions>
 <execution>
 <id>generate-rebel-xml</id>
 <phase>process-resources</phase>
 <goals>
 <goal>generate</goal>
 </goals>
 </execution>
 </executions>
 </plugin>

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:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Austen Holmes  
View profile  
 More options Nov 8 2012, 2:52 pm
From: Austen Holmes <austen.hol...@gmail.com>
Date: Thu, 8 Nov 2012 11:52:51 -0800 (PST)
Local: Thurs, Nov 8 2012 2:52 pm
Subject: Re: Re: [Lift] Re: Need jump-start to create a base lift 2.5 project with maven

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.

https://github.com/serveace/maven-lift-skeleton/tree/master/parent/li... if
you want to clone it.

You should be able to clone it, run mvn install, and drop the war in any
container (tomcat7, for example) and have it run.

-Austen


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »