You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Balaji K M <ba...@hexaware.com> on 2005/11/03 05:49:28 UTC
How do I make my first Maven project
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
Re: How do I make my first Maven project
Posted by Anuerin Diaz <ra...@gmail.com>.
hi,
you have to execute your maven build/deploy commands on the "my-app" folder
created when you invoke archetype:create. the reason is that your build
commands are looking for the "pom.xml" file (or project in that error).
ciao!
On 11/3/05, Balaji K M <ba...@hexaware.com> 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.
> <snip>
>
--
"Programming, an artform that fights back"
Anuerin G. Diaz
Registered Linux User #246176
Friendly Linux Board @ http://mandrivausers.org/index.php
http://capsule.ramfree17.org , when you absolutely have nothing else better
to do