Lift 2.x snapshots now available for Scala 2.8.0

108 views
Skip to first unread message

Indrajit Raychaudhuri

unread,
Jul 15, 2010, 3:01:38 PM7/15/10
to Lift, lift-announce
Folks,

Lift 2.1 snapshots now builds on Scala 2.8.0-final!

With the upcoming Lift 2.1 slated to support both Scala 2.7.x and 2.8.x
we are making some adjustments in the way we identify the distributable
archetypes and jars.

The Lift modules would have the artifactId suffixed with
"_${scala.version}", where ${scala.version} resolves to the actual Scala
version on which they are built.

This means the jar files would be of the form:
${artifact}_${scala.version}-2.1-SNAPSHOT.jar

Taking lift-mapper as an example,

The jar would be of the form:
lift-mapper_2.7.7-2.1-SNAPSHOT.jar (Scala 2.7.7)
lift-mapper_2.8.0-2.1-SNAPSHOT.jar (Scala 2.8.0)

For a Maven based project, dependency section would be:
<dependency>
<groupId>net.liftweb</groupId>
<artifactId>lift-mapper_${scala.version}</artifactId>
<version>2.1-SNAPSHOT</version>
</dependency>

For an SBT based project, the declaration would be:
val dispatch = "net.liftweb" %% "lift-mapper" % "2.1-SNAPSHOT"

(take note of the cross-build friendliness above)

Please feel encouraged to give Lift 2.1-SNAPSHOT versions for 2.8.0 (or
2.7.7 if you are conservative :)) a try and let us know how it goes.

For those interested in building from the source, take note of the
appropriate source branches in GitHub.

Scala 2.7.7 build: http://github.com/lift/lift/tree/2.x-2.7_devel
Scala 2.8.0 build: http://github.com/lift/lift/tree/2.x-2.8_devel


Cheers,
Indrajit
--
twitter.com/indrajitr

David Pollak

unread,
Jul 15, 2010, 3:10:35 PM7/15/10
to Lift
Indrajit,

Thanks for your excellent work in making this happen!

David
--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Blog: http://goodstuff.im
Surf the harmonics

Naftoli Gugenheim

unread,
Jul 15, 2010, 11:52:26 PM7/15/10
to lift-announce+owners, Lift, lift-announce
Doesn't sbt use the form module_scalax.x.x-version-SNAPSHOT?

MD

unread,
Jul 16, 2010, 1:55:22 AM7/16/10
to Lift
Lift 2.1-SNAPSHOT for 2.8.0 works fine over here!

Great work!!!!

aw

unread,
Jul 16, 2010, 4:03:44 AM7/16/10
to Lift


On Jul 15, 12:01 pm, Indrajit Raychaudhuri <i...@indrajit.com> wrote:
> The Lift modules would have the artifactId suffixed with
> "_${scala.version}", where ${scala.version} resolves to the actual Scala
> version on which they are built.
>
> This means the jar files would be of the form:
> ${artifact}_${scala.version}-2.1-SNAPSHOT.jar
>
> Taking lift-mapper as an example,
>
> The jar would be of the form:
> lift-mapper_2.7.7-2.1-SNAPSHOT.jar (Scala 2.7.7)
> lift-mapper_2.8.0-2.1-SNAPSHOT.jar (Scala 2.8.0)
>
> For a Maven based project, dependency section would be:
> <dependency>
>    <groupId>net.liftweb</groupId>
>    <artifactId>lift-mapper_${scala.version}</artifactId>
>    <version>2.1-SNAPSHOT</version>
> </dependency>

Admittedly, I haven't completely thought this through, but why not use
the artifact classifier to differentiate between 2.7.7 and 2.8.0?
Isn't that what it is for? I recall it being used to differentiate
between JDK 1.4 and JDK 1.5 artifacts for things like TestNG... Isn't
this problem similar? So it would be:

<dependency>
   <groupId>net.liftweb</groupId>
   <artifactId>lift-mapper</artifactId>
   <version>2.1-SNAPSHOT</version>
   <classifier>${scala.version}</classifier>
</dependency>

BTW... Is it one source tree compiled twice, or are there two
independent trees?

Timothy Perrett

unread,
Jul 16, 2010, 6:02:31 AM7/16/10
to lif...@googlegroups.com
Im not sure classifiers work with Ivy? Fairly sure it wouldnt work with SBT though.

For example, Akka is already cross building and check their structure:
http://scalablesolutions.se/akka/repository/se/scalablesolutions/akka/

Cheers, Tim

> --
> You received this message because you are subscribed to the Google Groups "Lift" group.
> To post to this group, send email to lif...@googlegroups.com.
> To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
>
>

Kevin Wright

unread,
Jul 16, 2010, 6:23:33 AM7/16/10
to lif...@googlegroups.com
The main classifiers aren't used is that classified artefacts under the same id in Maven are all ultimately derived from the same sources.  Think about sources, javadoc, jar, war, tests, rpm, deb, dmg, etc.

This isn't necessarily the case for 2.7 and 2.8 scala builds, especially if you're using annotations or multiple package declarations.  Just consider how you'd release a "sources" or "scaladoc" jar...

--
Kevin Wright

mail/google talk: kev.lee...@gmail.com
wave: kev.lee...@googlewave.com
skype: kev.lee.wright
twitter: @thecoda

Kevin Wright

unread,
Jul 16, 2010, 6:24:13 AM7/16/10
to lif...@googlegroups.com
missed a word!
It should read "The main REASON classifiers..."

sailor...@gmail.com

unread,
Jul 16, 2010, 6:31:42 AM7/16/10
to Lift
Failed to download....how I change the build file?

LIftProject.scala

import sbt._

class LiftProject(info: ProjectInfo) extends DefaultWebProject(info) {
val scalatools_release = "Scala Tools Snapshot" at
"http://scala-tools.org/repo-releases/"

val liftVersion = "2.1-SNAPSHOT"
val dispatch = "net.liftweb" %% "lift-mapper" % "2.1-SNAPSHOT"

override def libraryDependencies = Set(
"net.liftweb" % "lift-mapper" % liftVersion % "compile->default",
"net.liftweb" % "lift-wizard" % liftVersion % "compile->default",
"org.mortbay.jetty" % "jetty" % "6.1.22" % "test->default",
"junit" % "junit" % "4.5" % "test->default",
"org.scala-tools.testing" % "specs" % "1.6.2.1" % "test->default",
"com.h2database" % "h2" % "1.2.121"
) ++ super.libraryDependencies
}

build.properties

#Project properties
#Fri Apr 23 11:24:20 PDT 2010
project.organization=Lift
project.name=Lift SBT Tempalte
sbt.version=0.7.4
project.version=0.1
def.scala.version=2.8.0
build.scala.versions=2.8.0
project.initialize=false

Timothy Perrett

unread,
Jul 16, 2010, 6:55:06 AM7/16/10
to lif...@googlegroups.com
For example:
http://scala-tools.org/repo-snapshots/net/liftweb/lift-amqp_2.8.0/2.1-SNAPSHOT/

The artifactId is wrong. You'll need to make it "lift-mapper_SCALA_VERSION"

Cheers, Tim

David Flemström

unread,
Jul 16, 2010, 7:09:31 AM7/16/10
to lif...@googlegroups.com
On Fri, Jul 16, 2010 at 12:55 PM, Timothy Perrett <tim...@getintheloop.eu> wrote:
The artifactId is wrong. You'll need to make it "lift-mapper_SCALA_VERSION"
No, he forgot a percent sign:

"net.liftweb" %% "lift-mapper" % liftVersion % "compile->default",
"net.liftweb" %% "lift-wizard" % liftVersion % "compile->default",

lester

unread,
Jul 16, 2010, 10:09:15 AM7/16/10
to Lift
Awesome! Thanks for your work! Lift 2.1 with Scala 2.8.0 is up and
running!

Rogelio

unread,
Jul 16, 2010, 2:32:26 PM7/16/10
to Lift
On Jul 16, 6:31 am, "sailormoo...@gmail.com" <sailormoo...@gmail.com>
wrote:
> Failed to download....how I change the build file?
>
> LIftProject.scala
>
> import sbt._
>
> class LiftProject(info: ProjectInfo) extends DefaultWebProject(info) {
>   val scalatools_release = "Scala Tools Snapshot" at
>   "http://scala-tools.org/repo-releases/"
>
>   val liftVersion = "2.1-SNAPSHOT"
>   val dispatch = "net.liftweb" %% "lift-mapper" % "2.1-SNAPSHOT"
>
>   override def libraryDependencies = Set(
>     "net.liftweb" % "lift-mapper" % liftVersion % "compile->default",
>     "net.liftweb" % "lift-wizard" % liftVersion % "compile->default",
>     "org.mortbay.jetty" % "jetty" % "6.1.22" % "test->default",
>     "junit" % "junit" % "4.5" % "test->default",
>     "org.scala-tools.testing" % "specs" % "1.6.2.1" % "test->default",
>     "com.h2database" % "h2" % "1.2.121"
>   ) ++ super.libraryDependencies
>
> }


In addition to the "%%" error that another poster mentions, I had to
also change the
URL from http://scala-tools.org/repo-releases" to scala-tools.org/repo-
snapshots
Oh, and you only need the "%%" on the two net.liftweb compile lines,
not the lines
with jetty, junit, etc.

Rog

ghostM

unread,
Jul 16, 2010, 2:50:33 PM7/16/10
to Lift
Forked dpp's lift_sbt_prototype to use Scala 2.8.0 and Lift 2.1
snapshot

http://github.com/ghostm/lift_sbt_prototype

-Matt

On Jul 16, 12:32 pm, Rogelio <rogbo...@gmail.com> wrote:
> On Jul 16, 6:31 am, "sailormoo...@gmail.com" <sailormoo...@gmail.com>
> wrote:
>
>
>
>
>
> > Failed to download....how I change the build file?
>
> > LIftProject.scala
>
> > import sbt._
>
> > class LiftProject(info: ProjectInfo) extends DefaultWebProject(info) {
> >   val scalatools_release = "Scala Tools Snapshot" at
> >   "http://scala-tools.org/repo-releases/"
>
> >   val liftVersion = "2.1-SNAPSHOT"
> >   val dispatch = "net.liftweb" %% "lift-mapper" % "2.1-SNAPSHOT"
>
> >   override def libraryDependencies = Set(
> >     "net.liftweb" % "lift-mapper" % liftVersion % "compile->default",
> >     "net.liftweb" % "lift-wizard" % liftVersion % "compile->default",
> >     "org.mortbay.jetty" % "jetty" % "6.1.22" % "test->default",
> >     "junit" % "junit" % "4.5" % "test->default",
> >     "org.scala-tools.testing" % "specs" % "1.6.2.1" % "test->default",
> >     "com.h2database" % "h2" % "1.2.121"
> >   ) ++ super.libraryDependencies
>
> > }
>
> In addition to the "%%" error that another poster mentions, I had to
> also change the
> URL fromhttp://scala-tools.org/repo-releases" to scala-tools.org/repo-

sailor...@gmail.com

unread,
Jul 17, 2010, 3:25:27 AM7/17/10
to Lift
Thanks.

Telling the truth, I don't understand what the % and %% means in
SBT.
But now it works.

Ross Mellgren

unread,
Jul 17, 2010, 3:30:21 AM7/17/10
to lif...@googlegroups.com
   "net.liftweb" % "lift-mapper" % liftVersion % "compile->default",

Looks for an artifact in net/liftweb/lift-mapper/<liftVersion>

   "net.liftweb" %% "lift-mapper" % liftVersion % "compile->default",

Looks for an artifact in net/liftweb/lift-mapper_<scalaVersion>/<liftVersion>.

%% is used for cross building, so that for dependent projects which have the Scala version they're built against in the name of the artifact (e.g. lift-mapper_2.8.0), SBT can automatically substitute in the version of Scala being built against.

-Ross

Meredith Gregory

unread,
Jul 19, 2010, 4:55:29 PM7/19/10
to lif...@googlegroups.com
Dear Indrajit,

Given the advice in the email below, to what should i set the archetypeVersion in the following invocation?

#! /bin/sh
mvn archetype:generate -U                                    \
 -DarchetypeGroupId=net.liftweb                              \
 -DarchetypeArtifactId=lift-archetype-basic                  \
 -DarchetypeVersion=2.8.0-2.1-SNAPSHOT                       \
 -DarchetypeRepository=http://scala-tools.org/repo-snapshots \
 -DremoteRepositories=http://scala-tools.org/repo-releases   \
 -DgroupId=$1 -DartifactId=$2

i tried the value above (and variants) to no luck. Your advice would be most welcome.

Best wishes,

--greg

--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.




--
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

Ross Mellgren

unread,
Jul 19, 2010, 4:58:16 PM7/19/10
to lif...@googlegroups.com
archetypeArtifactId needs to have the scala version added, and archetypeVersionId should be 2.1-SNAPSHOT...


#! /bin/sh
mvn archetype:generate -U                                    \
 -DarchetypeGroupId=net.liftweb                              \
 -DarchetypeArtifactId=lift-archetype-basic_2.8.0                  \
 -DarchetypeVersion=2.1-SNAPSHOT                       \
 -DarchetypeRepository=http://scala-tools.org/repo-snapshots \
 -DremoteRepositories=http://scala-tools.org/repo-releases   \
 -DgroupId=$1 -DartifactId=$2

-Ross

Elazar Leibovich

unread,
Jul 20, 2010, 12:24:47 PM7/20/10
to Lift
On Jul 17, 10:30 am, Ross Mellgren <dri...@gmail.com> wrote:
>    "net.liftweb" % "lift-mapper" % liftVersion % "compile->default",
>
> Looks for an artifact in net/liftweb/lift-mapper/<liftVersion>
>
>    "net.liftweb" %% "lift-mapper" % liftVersion % "compile->default",
>
> Looks for an artifact in net/liftweb/lift-mapper_<scalaVersion>/<liftVersion>.
>
> %% is used for cross building, so that for dependent projects which have the Scala version they're built against in the name of the artifact (e.g. lift-mapper_2.8.0), SBT can automatically substitute in the version of Scala being built against.

Wow, it's very confusing, and not very intuitive!
Isn't there alternative more readable DSL, such as

"net.liftweb" % WithScalaVersion("lift-mapper") % liftVersion %
"compile->default"

Ross Mellgren

unread,
Jul 20, 2010, 12:35:25 PM7/20/10
to lif...@googlegroups.com
I'd recommend floating this on the sbt list.

-Ross

Timothy Perrett

unread,
Jul 20, 2010, 12:48:47 PM7/20/10
to lif...@googlegroups.com
I think this is a matter of taste... I rather like the %%

Chaba

unread,
Jul 20, 2010, 12:58:15 PM7/20/10
to Lift

Indrajit Raychaudhuri

unread,
Jul 20, 2010, 2:03:57 PM7/20/10
to lif...@googlegroups.com
Indeed a matter of taste.

"net.liftweb" %% "lift-mapper" % liftVersion % "compile->default"

can be simplified as:


"net.liftweb" %% "lift-mapper" % liftVersion

or can be alternately represented as:
"net.liftweb" % ("lift-mapper_" + crossScalaVersionString) % liftVersion

or can be 'pinned' to a version as:
"net.liftweb" % "lift-mapper_2.8.0") % liftVersion

Pick your poison :)


Cheers, Indrajit
--
twitter.com/indrajitr

Indrajit Raychaudhuri

unread,
Jul 20, 2010, 2:22:27 PM7/20/10
to lif...@googlegroups.com

Chaba wrote:
> Meredith,
>
> Did you try the one on http://www.assembla.com/wiki/show/liftweb/Using_Maven
> page?

Yes, this should work. Thank you very much Chaba for updating the wiki.

- Indrajit

Reply all
Reply to author
Forward
0 new messages