You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by shachar <sh...@gmail.com> on 2012/06/22 12:42:31 UTC
5 minutes guide - error
Hi, I"ve followed the installation guide.
mvn --version gave me this output:
Apache Maven 2.0.11 (r909250; 2010-02-12 07:55:50+0200)
Java version: 1.6.0_26
Java home: /usr/lib/jvm/java-6-sun-1.6.0.26/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "2.6.38-8-generic" arch: "i386" Family: "unix"
Then I tried the mvn /archetype:generate -DgroupId=com.mycompany.app
-DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart
-DinteractiveMode=false/ command which gave this output (added -e):
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[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]
[INFO] Generating project in Batch mode
[INFO]
----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Old (1.x)
Archetype: maven-archetype-quickstart:1.0
[INFO]
----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: com.mycompany.app
[INFO] Parameter: packageName, Value: com.mycompany.app
[INFO] Parameter: package, Value: com.mycompany.app
[INFO] Parameter: artifactId, Value: my-app
[INFO] Parameter: basedir, Value:
/usr/local/apache-maven/apache-maven-2.0.11
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] :
org.apache.maven.archetype.old.ArchetypeTemplateProcessingException: Error
merging velocity templates
Error merging velocity templates
Error merging velocity templates
[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.BuildFailureException: Error merging velocity templates
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:580)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:513)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:483)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:331)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:228)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:345)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:132)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:290)
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: Error merging
velocity templates
at
org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute(CreateProjectFromArchetypeMojo.java:211)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:454)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
... 16 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Fri Jun 22 13:33:34 IDT 2012
[INFO] Final Memory: 21M/328M
[INFO]
------------------------------------------------------------------------
Thanks in advance,
Shachar
--
View this message in context: http://maven.40175.n5.nabble.com/5-minutes-guide-error-tp5711788.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: 5 minutes guide - error
Posted by Maven User <ma...@gmail.com>.
I'd suggest also using -X -e...
Re: 5 minutes guide - error
Posted by Wayne Fay <wa...@gmail.com>.
> Hey, I"ve tried now with 2.2.1 and it still doesn't work:
>
>
> shachar@ubuntu:/usr/local/apache-maven$ mvn -e archetype:generate
> -DgroupId=com.mycompany.app -DartifactId=my-app
> -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
Try again without the -DinteractiveMode=false and just supply the
information when prompted, and see if you get any different results.
Wayne
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: 5 minutes guide - error
Posted by shachar <sh...@gmail.com>.
Hey, I"ve tried now with 2.2.1 and it still doesn't work:
shachar@ubuntu:/usr/local/apache-maven$ mvn -e archetype:generate
-DgroupId=com.mycompany.app -DartifactId=my-app
-DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[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 Batch mode
[INFO]
----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Old (1.x)
Archetype: maven-archetype-quickstart:1.0
[INFO]
----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: com.mycompany.app
[INFO] Parameter: packageName, Value: com.mycompany.app
[INFO] Parameter: package, Value: com.mycompany.app
[INFO] Parameter: artifactId, Value: my-app
[INFO] Parameter: basedir, Value: /usr/local/apache-maven
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] :
org.apache.maven.archetype.old.ArchetypeTemplateProcessingException: Error
merging velocity templates
Error merging velocity templates
[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.BuildFailureException: Error merging velocity templates
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:715)
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.MojoFailureException: Error merging
velocity templates
at
org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute(CreateProjectFromArchetypeMojo.java:211)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
... 17 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Fri Jun 22 17:22:51 IDT 2012
[INFO] Final Memory: 21M/330M
[INFO]
------------------------------------------------------------------------
--
View this message in context: http://maven.40175.n5.nabble.com/5-minutes-guide-error-tp5711788p5711810.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: 5 minutes guide - error
Posted by Joachim Van der Auwera <jo...@progs.be>.
I would suggest retrying with a more recent maven version, preferable
3.0.4 or if you need to stick to maven2 2.2.1.
Version 2.0.11 is quite ancient and later versions have many improvements.
Kind regards,
Joachim
On 22-06-12 12:42, shachar wrote:
> Hi, I"ve followed the installation guide.
> mvn --version gave me this output:
>
> Apache Maven 2.0.11 (r909250; 2010-02-12 07:55:50+0200)
> Java version: 1.6.0_26
> Java home: /usr/lib/jvm/java-6-sun-1.6.0.26/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux" version: "2.6.38-8-generic" arch: "i386" Family: "unix"
>
> Then I tried the mvn /archetype:generate -DgroupId=com.mycompany.app
> -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart
> -DinteractiveMode=false/ command which gave this output (added -e):
>
> + Error stacktraces are turned on.
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'archetype'.
> [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]
> [INFO] Generating project in Batch mode
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] Using following parameters for creating project from Old (1.x)
> Archetype: maven-archetype-quickstart:1.0
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] Parameter: groupId, Value: com.mycompany.app
> [INFO] Parameter: packageName, Value: com.mycompany.app
> [INFO] Parameter: package, Value: com.mycompany.app
> [INFO] Parameter: artifactId, Value: my-app
> [INFO] Parameter: basedir, Value:
> /usr/local/apache-maven/apache-maven-2.0.11
> [INFO] Parameter: version, Value: 1.0-SNAPSHOT
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] :
> org.apache.maven.archetype.old.ArchetypeTemplateProcessingException: Error
> merging velocity templates
> Error merging velocity templates
>
> Error merging velocity templates
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.BuildFailureException: Error merging velocity templates
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:580)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:513)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:483)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:331)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:228)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:345)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:132)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:290)
> 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: Error merging
> velocity templates
> at
> org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute(CreateProjectFromArchetypeMojo.java:211)
> at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:454)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
> ... 16 more
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 3 seconds
> [INFO] Finished at: Fri Jun 22 13:33:34 IDT 2012
> [INFO] Final Memory: 21M/328M
> [INFO]
> ------------------------------------------------------------------------
>
> Thanks in advance,
> Shachar
>
>
> --
> View this message in context: http://maven.40175.n5.nabble.com/5-minutes-guide-error-tp5711788.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: 5 minutes guide - error
Posted by shachar <sh...@gmail.com>.
Thanks for all for the help,
I"m not sure which of the following fixed it for me, but at least for future
newbie users this is what I did:
cleaned all my jre/jdk installation sun only jre and jdk.
went over the maven installation process again
this time I ran from su. (so maybe it was library writing premissions
problem).
--
View this message in context: http://maven.40175.n5.nabble.com/5-minutes-guide-error-tp5711788p5711863.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org