Problem with creating new project

58 views
Skip to first unread message

Jaroslaw Zabiello

unread,
Jan 2, 2010, 11:15:54 PM1/2/10
to Lift
I cannot create a new project because of "Embedded error: The META-
INF/maven/archetype.xml descriptor cannot be found.

I use Mac OS-X 10.6.2, MacPorts and Scala 2.7.7 final.

$ scala -version
Scala code runner version 2.7.7.final -- Copyright 2002-2009, LAMP/
EPFL

$ mvn -version
Apache Maven 2.2.1 (r801777; 2009-08-06 20:16:01+0100)
Java version: 1.6.0_17
Java home: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/
Home
Default locale: pl_PL, platform encoding: MacCentralEurope
OS name: "mac os x" version: "10.6.2" arch: "x86_64" Family: "mac"

$ mvn archetype:create -U \
> -DarchetypeGroupId=net.liftweb \
> -DarchetypeArtifactId=lift-archetype-blank \
> -DarchetypeVersion=1.1-SNAPSHOT \
> -DremoteRepositories=http://scala-tools.org/repo-snapshots \
> -DgroupId=com.mapp -DartifactId=mapp -e


+ Error stacktraces are turned on.
[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:create] (aggregator-style)
[INFO]
------------------------------------------------------------------------
[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] [archetype:create {execution: default-cli}]
[WARNING] This goal is deprecated. Please use mvn archetype:generate
instead
[INFO] Defaulting package to group ID: com.mapp
[INFO] We are using command line specified remote repositories:
http://scala-tools.org/repo-snapshots
[INFO] snapshot net.liftweb:lift-archetype-blank:1.1-SNAPSHOT:
checking for updates from id0
Downloading:
http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-blank/1.1-SNAPSHOT/lift-archetype-blank-1.1-SNAPSHOT.jar
[INFO]
----------------------------------------------------------------------------
[INFO] Using following parameters for creating OldArchetype: lift-
archetype-blank:1.1-SNAPSHOT
[INFO]
----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: com.mapp
[INFO] Parameter: packageName, Value: com.mapp
[INFO] Parameter: package, Value: com.mapp
[INFO] Parameter: artifactId, Value: mapp
[INFO] Parameter: basedir, Value: /Users/zbiru
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error creating from archetype

Embedded error: The META-INF/maven/archetype.xml descriptor cannot be
found.
[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error creating
from archetype
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
(DefaultLifecycleExecutor.java:719)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal
(DefaultLifecycleExecutor.java:569)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal
(DefaultLifecycleExecutor.java:539)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
(DefaultLifecycleExecutor.java:387)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments
(DefaultLifecycleExecutor.java:284)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main
(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:
315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:
430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error
creating from archetype
at org.apache.maven.archetype.mojos.MavenArchetypeMojo.execute
(MavenArchetypeMojo.java:249)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo
(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
(DefaultLifecycleExecutor.java:694)
... 17 more
Caused by:
org.apache.maven.archetype.old.ArchetypeDescriptorException: The META-
INF/maven/archetype.xml descriptor cannot be found.
at org.apache.maven.archetype.old.DefaultOldArchetype.createArchetype
(DefaultOldArchetype.java:187)
at org.apache.maven.archetype.mojos.MavenArchetypeMojo.execute
(MavenArchetypeMojo.java:230)
... 19 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 7 seconds
[INFO] Finished at: Sun Jan 03 04:13:17 GMT 2010
[INFO] Final Memory: 13M/79M
[INFO]
------------------------------------------------------------------------


The same error is for lift-archetype-basic.


Tim Nelson

unread,
Jan 3, 2010, 9:53:55 AM1/3/10
to lif...@googlegroups.com
I'm no maven expert, but I think you need to use generate instead of
create. See the warning halfway down, before the stack trace.

[INFO] [archetype:create {execution: default-cli}]
[WARNING] This goal is deprecated. Please use mvn archetype:generate
instead

Try:

$ mvn archetype:generate -U \
...

That may not solve your problem, but it's a place to start.

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

Indrajit Raychaudhuri

unread,
Jan 4, 2010, 4:30:43 AM1/4/10
to lif...@googlegroups.com
Quite right, "mvn archetype:generate" should be used instead of "mvn
archetype:create". "mvn acrhetype:create" would not work to give
expected result [1].

[1] http://groups.google.com/group/liftweb/msg/ae637c021b1f114e

Cheers, Indrajit

David Pollak

unread,
Jan 4, 2010, 11:19:59 AM1/4/10
to lif...@googlegroups.com
Can you point us to where you found the instructions to use archetype:create so we can correct the source?

--

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
Reply all
Reply to author
Forward
0 new messages