[Lift] LiftBook: Maven example does not work

4 views
Skip to first unread message

Hadmut

unread,
Apr 26, 2010, 1:40:20 PM4/26/10
to Lift
Hi,

I am just starting with Lift and exploring it (coming from C,C++,
Ruby, Rails,...) . I started with the first example in the LiftBook
and ran into an error message:

% mvn archetype:generate -U -DarchetypeGroupId=net.liftweb -
DarchetypeArtifactId=lift-archetype-blank -DarchetypeVersion=1.0 -
DremoteRepositories=http://scala-tools.org/repo-releases -
DgroupId=demo.helloworld -DartifactId=helloworld -Dversion=1.0-
SNAPSHOT
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] org.apache.maven.plugins: checking for updates from central
[INFO] org.codehaus.mojo: checking for updates from central
[INFO] artifact org.apache.maven.plugins:maven-archetype-plugin:
checking for updates from central
[INFO]
------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [archetype:generate] (aggregator-style)
[INFO]
------------------------------------------------------------------------
[INFO] Preparing archetype:generate
[INFO] No goals needed for project - skipping
[INFO] [archetype:generate {execution: default-cli}]
[INFO] Generating project in Interactive mode
[WARNING] No archetype found in Remote catalog. Defaulting to internal
Catalog
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 8 seconds
[INFO] Finished at: Mon Apr 26 19:33:37 CEST 2010
[INFO] Final Memory: 12M/76M
[INFO]
------------------------------------------------------------------------


(the -e switch gives me a backtrace, but is not helpful at all)


How could I find what's the problem? Is there any strategy to debug?

I was surprised how many files maven needs to download from Internet
when started for the first time. I don't think that it is a good idea
to use a tool of this complexity that needs to download that many
different parts from internet. I do not consider using such tools as a
good idea.

Isn't that a no-go for offline development?

regards
Hadmut

--
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.

David Pollak

unread,
Apr 26, 2010, 1:59:31 PM4/26/10
to lif...@googlegroups.com
Yeah... something broke in Maven-land.  The example worked and stopped working over the weekend (there was another post about this).

Indrajit or DavidB or some other Maven guru... what happened?
--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

Hadmut

unread,
Apr 26, 2010, 2:05:40 PM4/26/10
to Lift


On Apr 26, 7:59 pm, David Pollak <feeder.of.the.be...@gmail.com>
wrote:
> Yeah... something broke in Maven-land.  The example worked and stopped
> working over the weekend (there was another post about this).



How can you choose such an unreliable tool for something like Lift?

It should be restricted to tools that can be completely packaged and
put into software archives.

Such problems do disqualify Lift completely for any use in production
environments.

Ross Mellgren

unread,
Apr 26, 2010, 2:13:49 PM4/26/10
to lif...@googlegroups.com, lif...@googlegroups.com
-DremoteRepository=... should be -DarchetypeRepository=... I think

-Ross


David Pollak

unread,
Apr 26, 2010, 2:17:31 PM4/26/10
to lif...@googlegroups.com
On Mon, Apr 26, 2010 at 11:13 AM, Ross Mellgren <dri...@gmail.com> wrote:
-DremoteRepository=... should be -DarchetypeRepository=... I think

Yes, but why did the particular invocation that's been working for more than a year suddenly stop working.  This is problematic.
 

David Pollak

unread,
Apr 26, 2010, 2:20:33 PM4/26/10
to lif...@googlegroups.com
On Mon, Apr 26, 2010 at 11:05 AM, Hadmut <had...@googlemail.com> wrote:


On Apr 26, 7:59 pm, David Pollak <feeder.of.the.be...@gmail.com>
wrote:
> Yeah... something broke in Maven-land.  The example worked and stopped
> working over the weekend (there was another post about this).



How can you choose such an unreliable tool for something like Lift?

Um... what unreliable tool are you talking about?  If you're going to complain about Maven, don't.  The discussion comes up from time to time and you know, we're not having it again.  There are other options if you don't like Maven.
 

It should be restricted to tools that can be completely packaged and
put into software archives.

What are you proposing?
 

Such problems do disqualify Lift completely for any use in production
environments.

Lift has been successfully using Maven and Maven repositories very successfully for more than 3 years.

If you want to use sbt with Lift, you can clone the repository at http://github.com/dpp/lift_sbt_prototype

There are also Ant/Ivy, Buildr, and even Graddle build formulas.  http://jeppenejsum.wordpress.com/2010/04/16/lift-quick-start-look-ma-no-maven/


 

--
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.


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

Mads Hartmann Jensen

unread,
Apr 26, 2010, 2:30:25 PM4/26/10
to lif...@googlegroups.com
The (new) wiki has articles about how to use 4 different build systems with Lift: https://www.assembla.com/wiki/show/liftweb/Getting_Started :)

Mads Hartmann Jensen

unread,
Apr 26, 2010, 2:31:50 PM4/26/10
to lif...@googlegroups.com
Of course 1 of them haven't been written yet and two of them rely on the maven generate command. My bad ;)

On 26/04/2010, at 20.20, David Pollak wrote:

Ross Mellgren

unread,
Apr 26, 2010, 2:37:02 PM4/26/10
to lif...@googlegroups.com
Good question, perhaps a new maven-archetype-plugin upstream. That is beyond my maven-fu, but I can pick out arguments that differ from the formula I know works ;-)

-Ross

David Bernard

unread,
Apr 26, 2010, 3:09:01 PM4/26/10
to lif...@googlegroups.com
Like Ross suggest I suppose it's a change in the since the version 2.0-alpha-5 of the maven-archetype-plugin.
remoteRepository is replaced by archetypeRepository

mvn archetype:generate -U -DarchetypeGroupId=net.liftweb -DarchetypeArtifactId=lift-archetype-blank -DarchetypeVersion=1.0 -DremoteRepositories=http://scala-tools.org/repo-releases -DgroupId=demo.helloworld -DartifactId=helloworld -Dversion=1.0-SNAPSHOT

or  more reliable in the future using the fullname of the goal

mvn org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-5:generate -U -DarchetypeGroupId=net.liftweb -DarchetypeArtifactId=lift-archetype-blank -DarchetypeVersion=1.0 -DremoteRepositories=http://scala-tools.org/repo-releases -DgroupId=demo.helloworld -DartifactId=helloworld -Dversion=1.0-SNAPSHOT

(Sorry I don't have permission to update wiki).

/davidB

David Pollak

unread,
Apr 26, 2010, 4:13:38 PM4/26/10
to lif...@googlegroups.com
On Mon, Apr 26, 2010 at 12:09 PM, David Bernard <david.be...@gmail.com> wrote:
Like Ross suggest I suppose it's a change in the since the version 2.0-alpha-5 of the maven-archetype-plugin.
remoteRepository is replaced by archetypeRepository

mvn archetype:generate -U -DarchetypeGroupId=net.liftweb -DarchetypeArtifactId=lift-archetype-blank -DarchetypeVersion=1.0 -DremoteRepositories=http://scala-tools.org/repo-releases -DgroupId=demo.helloworld -DartifactId=helloworld -Dversion=1.0-SNAPSHOT

or  more reliable in the future using the fullname of the goal

mvn org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-5:generate -U -DarchetypeGroupId=net.liftweb -DarchetypeArtifactId=lift-archetype-blank -DarchetypeVersion=1.0 -DremoteRepositories=http://scala-tools.org/repo-releases -DgroupId=demo.helloworld -DartifactId=helloworld -Dversion=1.0-SNAPSHOT

(Sorry I don't have permission to update wiki).

Who do I have to talk to to get them Maven Archetype people not to screw up piles and piles of command lines? 
 

David Bernard

unread,
Apr 26, 2010, 4:24:17 PM4/26/10
to lif...@googlegroups.com
On Mon, Apr 26, 2010 at 22:13, David Pollak
<feeder.of...@gmail.com> wrote:
>
>
> On Mon, Apr 26, 2010 at 12:09 PM, David Bernard <david.be...@gmail.com>
> wrote:
>>
>> Like Ross suggest I suppose it's a change in the since the
>> version 2.0-alpha-5 of the maven-archetype-plugin.
>> remoteRepository is replaced by archetypeRepository
>> mvn archetype:generate -U -DarchetypeGroupId=net.liftweb
>> -DarchetypeArtifactId=lift-archetype-blank -DarchetypeVersion=1.0
>> -DremoteRepositories=http://scala-tools.org/repo-releases
>> -DgroupId=demo.helloworld -DartifactId=helloworld -Dversion=1.0-SNAPSHOT
>> or  more reliable in the future using the fullname of the goal
>> mvn org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-5:generate
>> -U -DarchetypeGroupId=net.liftweb -DarchetypeArtifactId=lift-archetype-blank
>> -DarchetypeVersion=1.0
>> -DremoteRepositories=http://scala-tools.org/repo-releases
>> -DgroupId=demo.helloworld -DartifactId=helloworld -Dversion=1.0-SNAPSHOT
>>
>> (Sorry I don't have permission to update wiki).
>
> Who do I have to talk to to get them Maven Archetype people not to screw up
> piles and piles of command lines?

http://jira.codehaus.org/browse/ARCHETYPE
2.0-alpha-5 was released 2010/04/23
2.0-alpha-4 was released 2008/09/28

David Pollak

unread,
Apr 26, 2010, 5:12:36 PM4/26/10
to lif...@googlegroups.com
David,

Thanks.  I've sent email off to Jason (the owner of the project) asking him to reverse the breaking changes.  Anybody else who has influence over Jason or the Maven community... please let everyone know that this is a significant issue.

We'll do our best to update the various documents we've got floating around about Lift, but it's something that's going to take more than a week and we've got a DZone article about Lift coming out this week (aka it's a seriously suboptimal situation.)

Thanks,

David

kikudjiro

unread,
Apr 27, 2010, 6:31:48 AM4/27/10
to lif...@googlegroups.com
mvn org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:create -U \
-DarchetypeGroupId=net.liftweb \
-DarchetypeArtifactId=lift-archetype-blank \
-DarchetypeVersion=2.0-SNAPSHOT \
-DremoteRepositories=http://scala-tools.org/repo-snapshots \
-DgroupId=demo.lifty \
-DartifactId=lifty-test

Imtiaz Ahmed H E

unread,
Apr 27, 2010, 8:14:59 AM4/27/10
to kiku...@gmail.com, lif...@googlegroups.com
Hi !

That worked.

Output follows:

Imtiaz, Imtiaz Ahmed H E, Bangalore, India

d:\LiftWorkspace>mvn
org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7
:create -U -DarchetypeGroupId=net.liftweb -DarchetypeArtifactId=lift-archetype
-blank -DarchetypeVersion=2.0-SNAPSHOT -DremoteRepositories=http://scala-tools.o
rg/repo-snapshots -DgroupId=demo.lifty -DartifactId=lifty-test
[INFO] Scanning for projects...
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-archet
ype-plugin/1.0-alpha-7/maven-archetype-plugin-1.0-alpha-7.pom

Downloading:
http://repo1.maven.org/maven2/org/apache/maven/archetype/maven-arch
etype/1.0-alpha-7/maven-archetype-1.0-alpha-7.pom

Downloading:
http://repo1.maven.org/maven2/org/apache/maven/archetype/maven-arch
etype-parent/2/maven-archetype-parent-2.pom

Downloading:
http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-archet
ype-plugin/1.0-alpha-7/maven-archetype-plugin-1.0-alpha-7.jar

[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment:
[org.apache.maven.plugins:maven-archetype-plugin:1.0-alp
ha-7:create] (aggregator-style)
[INFO] ------------------------------------------------------------------------
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/archetype/maven-arch
etype-core/1.0-alpha-7/maven-archetype-core-1.0-alpha-7.pom

Downloading:
http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-velocity/1
.1.2/plexus-velocity-1.1.2.pom

Downloading:
http://repo1.maven.org/maven2/commons-collections/commons-collectio
ns/2.0/commons-collections-2.0.pom

Downloading:
http://repo1.maven.org/maven2/commons-logging/commons-logging-api/1
.0.4/commons-logging-api-1.0.4.pom

Downloading:
http://repo1.maven.org/maven2/velocity/velocity/1.4/velocity-1.4.po
m

Downloading:
http://repo1.maven.org/maven2/velocity/velocity-dep/1.4/velocity-de
p-1.4.pom

Downloading:
http://repo1.maven.org/maven2/org/apache/maven/shared/maven-downloa
der/1.0/maven-downloader-1.0.pom

Downloading:
http://repo1.maven.org/maven2/org/apache/maven/archetype/maven-arch
etype-creator/1.0-alpha-7/maven-archetype-creator-1.0-alpha-7.pom

Downloading:
http://repo1.maven.org/maven2/org/apache/maven/archetype/maven-arch
etype-model/1.0-alpha-7/maven-archetype-model-1.0-alpha-7.pom

Downloading:
http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-archiver/1
.0-alpha-5/plexus-archiver-1.0-alpha-5.pom

Downloading:
http://repo1.maven.org/maven2/plexus/plexus-utils/1.0.2/plexus-util
s-1.0.2.jar
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/shared/maven-downloa
der/1.0/maven-downloader-1.0.jar
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/archetype/maven-arch
etype-core/1.0-alpha-7/maven-archetype-core-1.0-alpha-7.jar
Downloading:
http://repo1.maven.org/maven2/velocity/velocity/1.4/velocity-1.4.ja
r
Downloading:
http://repo1.maven.org/maven2/commons-logging/commons-logging-api/1
.0.4/commons-logging-api-1.0.4.jar


Downloading:
http://repo1.maven.org/maven2/commons-collections/commons-collectio
ns/2.0/commons-collections-2.0.jar
Downloading:
http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-velocity/1
.1.2/plexus-velocity-1.1.2.jar


Downloading:
http://repo1.maven.org/maven2/org/apache/maven/archetype/maven-arch
etype-creator/1.0-alpha-7/maven-archetype-creator-1.0-alpha-7.jar

Downloading:
http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-archiver/1
.0-alpha-5/plexus-archiver-1.0-alpha-5.jar



Downloading:
http://repo1.maven.org/maven2/velocity/velocity-dep/1.4/velocity-de
p-1.4.jar
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/archetype/maven-arch
etype-model/1.0-alpha-7/maven-archetype-model-1.0-alpha-7.jar



[INFO] Setting property: classpath.resource.loader.class =>
'org.codehaus.plexus
.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] **************************************************************
[INFO] Starting Jakarta Velocity v1.4
[INFO] RuntimeInstance initializing.
[INFO] Default Properties File:
org\apache\velocity\runtime\defaults\velocity.pr
operties
[INFO] Default ResourceManager initializing. (class
org.apache.velocity.runtime.
resource.ResourceManagerImpl)
[INFO] Resource Loader Instantiated:
org.codehaus.plexus.velocity.ContextClassLo
aderResourceLoader
[INFO] ClasspathResourceLoader : initialization starting.
[INFO] ClasspathResourceLoader : initialization complete.
[INFO] ResourceCache : initialized. (class
org.apache.velocity.runtime.resource.
ResourceCacheImpl)
[INFO] Default ResourceManager initialization complete.
[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Literal
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Macro
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Parse
[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Include
[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Foreach
[INFO] Created: 20 parsers.
[INFO] Velocimacro : initialization starting.
[INFO] Velocimacro : adding VMs from VM library template :
VM_global_library.vm
[ERROR] ResourceManager : unable to find resource 'VM_global_library.vm' in
any
resource loader.
[INFO] Velocimacro : error using VM library template VM_global_library.vm :
org
.apache.velocity.exception.ResourceNotFoundException: Unable to find
resource 'V
M_global_library.vm'
[INFO] Velocimacro : VM library template macro registration complete.
[INFO] Velocimacro : allowInline = true : VMs can be defined inline in
templates

[INFO] Velocimacro : allowInlineToOverride = false : VMs defined inline may
NOT
replace previous VM definitions
[INFO] Velocimacro : allowInlineLocal = false : VMs defined inline will be
glob
al in scope if allowed.
[INFO] Velocimacro : initialization complete.
[INFO] Velocity successfully started.
[INFO] [archetype:create {execution: default-cli}]
[INFO] Defaulting package to group ID: demo.lifty
[INFO] We are using command line specified remote repositories:
http://scala-too
ls.org/repo-snapshots
[INFO] snapshot net.liftweb:lift-archetype-blank:2.0-SNAPSHOT: checking for
upda
tes from id0
Downloading:
http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-bl
ank/2.0-SNAPSHOT/lift-archetype-blank-2.0-SNAPSHOT.jar
7K downloaded (lift-archetype-blank-2.0-SNAPSHOT.jar)
[INFO] -------------------------------------------------------------------------
---
[INFO] Using following parameters for creating Archetype:
lift-archetype-blank:2
.0-SNAPSHOT
[INFO] -------------------------------------------------------------------------
---
[INFO] Parameter: groupId, Value: demo.lifty
[INFO] Parameter: packageName, Value: demo.lifty
[INFO] Parameter: package, Value: demo.lifty
[INFO] Parameter: artifactId, Value: lifty-test
[INFO] Parameter: basedir, Value: d:\LiftWorkspace
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[WARNING] org.apache.velocity.runtime.exception.ReferenceException:
reference :
template = archetype-resources/pom.xml [line 16,column 20] : $scalaVersion
is no
t a valid reference.
[WARNING] org.apache.velocity.runtime.exception.ReferenceException:
reference :
template = archetype-resources/pom.xml [line 47,column 16] : $liftVersion is
not
a valid reference.
[INFO] ********************* End of debug info from resources from generated
POM
***********************
[INFO] Archetype created in dir: d:\LiftWorkspace\lifty-test
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 42 seconds
[INFO] Finished at: Tue Apr 27 17:41:42 IST 2010
[INFO] Final Memory: 5M/15M
[INFO] ------------------------------------------------------------------------
d:\LiftWorkspace>
Reply all
Reply to author
Forward
0 new messages