[groovy-user] [GMaven] [ERROR] Failed to generate project from the old archetype

6 views
Skip to first unread message

Tom Purl

unread,
Jul 29, 2008, 11:01:07 PM7/29/08
to us...@groovy.codehaus.org
I am trying to use GMaven for the first time to create a simple Groovy
project, and am getting the following error:

C:\Dev\second-maven-test>mvn -e archetype:generate
-DarchetypeGroupId=org.codehaus.groovy.maven.archetypes
-DarchetypeArtifactId=gmaven-archetype-basic
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] ------------------------------------------------------------------------
[INFO] Building second-maven-test
[INFO] task-segment: [archetype:generate] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] Preparing archetype:generate
[INFO] No goals needed for project - skipping
[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:generate]
[INFO] Generating project in Interactive mode
[WARNING] Specified archetype not found.
[INFO] No archetype defined. Using maven-archetype-quickstart
(org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
Choose archetype:
1: internal -> appfuse-basic-jsf (AppFuse archetype for creating a
web application with Hibernate, Spring and JSF)
2: internal -> appfuse-basic-spring (AppFuse archetype for
creating a web application with Hibernate, Spring and Spring MVC)
3: internal -> appfuse-basic-struts (AppFuse archetype for
creating a web application with Hibernate, Spring and Struts 2)
4: internal -> appfuse-basic-tapestry (AppFuse archetype for
creating a web application with Hibernate, Spring and Tapestry 4)

5: internal -> appfuse-core (AppFuse archetype for creating a jar
application with Hibernate and Spring and XFire)
6: internal -> appfuse-modular-jsf (AppFuse archetype for creating
a modular application with Hibernate, Spring and JSF)
7: internal -> appfuse-modular-spring (AppFuse archetype for
creating a modular application with Hibernate, Spring and Spring
MVC)
8: internal -> appfuse-modular-struts (AppFuse archetype for
creating a modular application with Hibernate, Spring and Struts
2)
9: internal -> appfuse-modular-tapestry (AppFuse archetype for
creating a modular application with Hibernate, Spring and Tapes
try 4)
10: internal -> maven-archetype-j2ee-simple (A simple J2EE Java application)
11: internal -> maven-archetype-marmalade-mojo (A Maven plugin
development project using marmalade)
12: internal -> maven-archetype-mojo (A Maven Java plugin
development project)
13: internal -> maven-archetype-portlet (A simple portlet application)
14: internal -> maven-archetype-profiles ()
15: internal -> maven-archetype-quickstart ()
16: internal -> maven-archetype-site-simple (A simple site
generation project)
17: internal -> maven-archetype-site (A more complex site project)
18: internal -> maven-archetype-webapp (A simple Java web application)
19: internal -> struts2-archetype-starter (A starter Struts 2
application with Sitemesh, DWR, and Spring)
20: internal -> struts2-archetype-blank (A minimal Struts 2 application)
21: internal -> struts2-archetype-portlet (A minimal Struts 2
application that can be deployed as a portlet)
22: internal -> struts2-archetype-dbportlet (A starter Struts 2
portlet that demonstrates a simple CRUD interface with db back
ing)
23: internal -> struts2-archetype-plugin (A Struts 2 plugin)
24: internal -> shale-archetype-blank (A blank Shale web
application with JSF)
25: internal -> maven-adf-archetype (Archetype to ease the burden
of creating a new application based with ADF)
26: internal -> data-app (A new Databinder application with
sources and resources.)
27: internal -> jini-service-archetype (Archetype for Jini service
project creation)
28: internal -> softeu-archetype-seam (JSF+Facelets+Seam Archetype)
29: internal -> softeu-archetype-seam-simple (JSF+Facelets+Seam
(no persistence) Archetype)
30: internal -> softeu-archetype-jsf (JSF+Facelets Archetype)
31: internal -> jpa-maven-archetype (JPA application)
32: internal -> spring-osgi-bundle-archetype (Spring-OSGi archetype)
33: internal -> confluence-plugin-archetype (Atlassian Confluence
plugin archetype)
34: internal -> jira-plugin-archetype (Atlassian JIRA plugin archetype)
35: internal -> maven-archetype-har (Hibernate Archive)
36: internal -> maven-archetype-sar (JBoss Service Archive)
37: internal -> wicket-archetype-quickstart (A simple Apache Wicket project)
38: internal -> quickstart (A simple Apache Tapestry 5 Project)
39: internal -> scala-archetype-simple (A simple scala project)
40: internal -> lift-archetype-blank (A blank/empty liftweb project)
41: internal -> lift-archetype-basic (The basic (liftweb) project)
42: internal -> cocoon-22-archetype-block-plain
([http://cocoon.apache.org/2.2/maven-plugins/])
43: internal -> cocoon-22-archetype-block
([http://cocoon.apache.org/2.2/maven-plugins/])
44: internal -> cocoon-22-archetype-webapp
([http://cocoon.apache.org/2.2/maven-plugins/])
Choose a number:
(1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39
/40/41/42/43/44) 15: : 15
[INFO] artifact
org.apache.maven.archetypes:maven-archetype-quickstart: checking for
updates from maven-archetype-quickstart-r
epo
Define value for groupId: : org.mycompany.myproject
Define value for artifactId: : example-project
Define value for version: 1.0-SNAPSHOT: :
Define value for package: : org.mycompany.myproject.example
Confirm properties configuration:
groupId: org.mycompany.myproject
artifactId: example-project
version: 1.0-SNAPSHOT
package: org.mycompany.myproject.example
Y: :
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating OldArchetype:
maven-archetype-quickstart:RELEASE
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: org.mycompany.myproject
[INFO] Parameter: packageName, Value: org.mycompany.myproject.example
[INFO] Parameter: package, Value: org.mycompany.myproject.example
[INFO] Parameter: artifactId, Value: example-project
[INFO] Parameter: basedir, Value: C:\Dev\second-maven-test
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[ERROR] Failed to generate project from the old archetype
org.apache.maven.archetype.exception.ArchetypeGenerationFailure:
Failed to generate project from the old archetype
at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.processOldArchetype(DefaultArchetypeGenerator.java:2
72)
at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype(DefaultArchetypeGenerator.java:145
)
at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype(DefaultArchetypeGenerator.java:290
)
at org.apache.maven.archetype.DefaultArchetype.generateProjectFromArchetype(DefaultArchetype.java:75)
at org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute(CreateProjectFromArchetypeMojo.java:185)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:227)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
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.archetype.old.ArchetypeTemplateProcessingException:
Unable to add module to the current project as
it is not of packaging type 'pom'
at org.apache.maven.archetype.old.DefaultOldArchetype.createArchetype(DefaultOldArchetype.java:314)
at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.processOldArchetype(DefaultArchetypeGenerator.java:2
55)
... 22 more
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] : org.apache.maven.archetype.exception.ArchetypeGenerationFailure:
Failed to generate project from the old archetype
Failed to generate project from the old archetype

Failed to generate project from the old archetype
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.BuildFailureException: Failed to generate project
from the old archetype
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:579)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:227)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
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.MojoFailureException: Failed to
generate project from the old archetype
at org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute(CreateProjectFromArchetypeMojo.java:189)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
... 16 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 59 seconds
[INFO] Finished at: Tue Jul 29 21:57:41 CDT 2008
[INFO] Final Memory: 8M/14M
[INFO] ------------------------------------------------------------------------

This is my first time using GMaven, so I'm a bit confused. Does
anyone have any idea why I am getting this error message?

Thanks in advance!

Tom Purl

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


Raphaël Piéroni

unread,
Jul 30, 2008, 5:30:23 PM7/30/08
to us...@groovy.codehaus.org
hi Tom,

What happened is:
- you specified the use of the gmaven archetype not fully qualified
(see the gmaven doco)
- the gmaven archetype is not referenced in the internal catalog of
the archetype plugin, therefore, the archetype plugin let you select
from its internal catalog
- you selected the default maven quickstart archetype which is an old
kind of archetype
- you also tried to run the archetype plugin in a directory containing
an existing project and that project is not of packaging pom (the only
kind of maven project which accept sub-modules) and by default the
archetype plugin tries to add a sub-module when called from a
project's directory.

Can you please raise a jira against the archetype plugin to add the
gmaven archetype in its internal catalog.
http://jira.codehaus.org/secure/BrowseProject.jspa?id=11095

Regards,

Raphaël

2008/7/30, Tom Purl <t...@tompurl.com>:

Tom Purl

unread,
Jul 30, 2008, 9:01:54 PM7/30/08
to us...@groovy.codehaus.org
On Wed, Jul 30, 2008 at 4:30 PM, Raphaël Piéroni
<raphael...@gmail.com> wrote:
> hi Tom,
>
> What happened is:

> - you specified the use of the gmaven archetype not fully qualified
> (see the gmaven doco)

What is the fully-qualified name of the gmaven archetype? I passed the
following command-line options to Maven:

-DarchetypeGroupId=org.codehaus.groovy.maven.archetypes
-DarchetypeArtifactId=gmaven-archetype-basic

Is there something else that I am supposed to pass?

> - you also tried to run the archetype plugin in a directory containing
> an existing project and that project is not of packaging pom (the only
> kind of maven project which accept sub-modules) and by default the
> archetype plugin tries to add a sub-module when called from a
> project's directory.

Oh duh. Thanks for pointing out that mistake.

> - the gmaven archetype is not referenced in the internal catalog of
> the archetype plugin, therefore, the archetype plugin let you select
> from its internal catalog
>
> - you selected the default maven quickstart archetype which is an old
> kind of archetype

Oh, ok.

> Can you please raise a jira against the archetype plugin to add the
> gmaven archetype in its internal catalog.
> http://jira.codehaus.org/secure/BrowseProject.jspa?id=11095

I'll try. I hope I get the terminology right :)

Do you know what I can do in the mean time to start using Maven with
Groovy?

Thanks Raphaël!

Raphaël Piéroni

unread,
Jul 31, 2008, 11:34:21 AM7/31/08
to us...@groovy.codehaus.org
Hi Tom,

2008/7/31, Tom Purl <t...@tompurl.com>:


> On Wed, Jul 30, 2008 at 4:30 PM, Raphaël Piéroni
> <raphael...@gmail.com> wrote:
> > hi Tom,
> >
> > What happened is:
>
> > - you specified the use of the gmaven archetype not fully qualified
> > (see the gmaven doco)
>
>
> What is the fully-qualified name of the gmaven archetype? I passed the
> following command-line options to Maven:
>
>
> -DarchetypeGroupId=org.codehaus.groovy.maven.archetypes
> -DarchetypeArtifactId=gmaven-archetype-basic

It miss the -DarchetypeVersion
There is a jira against the archetype plugin to lower this constraint

>
>
> Is there something else that I am supposed to pass?
>
>
> > - you also tried to run the archetype plugin in a directory containing
> > an existing project and that project is not of packaging pom (the only
> > kind of maven project which accept sub-modules) and by default the
> > archetype plugin tries to add a sub-module when called from a
> > project's directory.
>
>
> Oh duh. Thanks for pointing out that mistake.
>
>
> > - the gmaven archetype is not referenced in the internal catalog of
> > the archetype plugin, therefore, the archetype plugin let you select
> > from its internal catalog
> >
> > - you selected the default maven quickstart archetype which is an old
> > kind of archetype
>
>
> Oh, ok.
>
>
> > Can you please raise a jira against the archetype plugin to add the
> > gmaven archetype in its internal catalog.
> > http://jira.codehaus.org/secure/BrowseProject.jspa?id=11095
>
>
> I'll try. I hope I get the terminology right :)
>
> Do you know what I can do in the mean time to start using Maven with
> Groovy?

Chek the groovy contribs
the same sv as groovy and append '-contrib'
i know proxyomatic and graphics bulder use groovy.

Raphaël

Reply all
Reply to author
Forward
0 new messages