That should work. I tried it on my machine and it works.
Hmmm.... Maybe something went wrong during installation?
Balaji K M wrote:
Hi,
After successful installation of Maven in the system.
I followed the instruction given in the “How do I make my first Maven
project”, then when I typed the following command
mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app
I am getting the following error can anyone please help me how to
solve this problem what need to be done to solve this problem. It will
be grateful If you help in solving this problem
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
-------------------------------------------------------------------------
---
[INFO] Building Maven Default Project
[INFO] task-segment: [archetype:create]
[INFO]
-------------------------------------------------------------------------
---
[INFO]
-------------------------------------------------------------------------
---
[ERROR] BUILD ERROR
[INFO]
-------------------------------------------------------------------------
---
[INFO] Cannot execute mojo: create. It requires a project, but the
build is not
using one.
[INFO]
-------------------------------------------------------------------------
---
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Cannot execute
mojo: cre
ate. It requires a project, but the build is not using one.
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:544)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
Goal(DefaultLifecycleExecutor.java:482)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:452)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:301)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:268)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:137)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
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: Cannot
execute mojo:
create. It requires a project, but the build is not using one.
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:326)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:519)
... 16 more
[INFO]
-------------------------------------------------------------------------
---
[INFO] Total time: < 1 second
[INFO] Finished at: Wed Nov 02 15:55:40 GMT+05:30 2005
[INFO] Final Memory: 1M/4M
Regards
Balaji
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]