Hi,
LAB 5072 : Create a simple Maven project at the command line
When i am trying to create a maven project from command line, i was
geeting the below error message:
Can you please help to resolve thsis issue? No proxy seetings has
configured on my machine.
***********************************************************************
C:\KM\my_maven_projects>mvn -X -e archetype:generate
Choose a number or apply filter (format: [groupId:]artifactId, case
sensitive contains): 124: 124
Choose version:
1: 1.0-alpha-1
2: 1.0-alpha-2
3: 1.0-alpha-3
4: 1.0-alpha-4
5: 1.0
6: 1.1
Choose a number: 6: 1
Define value for property 'groupId': : com.km.examples
Define value for property 'artifactId': : helloworld
Define value for property 'version': 1.0-SNAPSHOT: :
Define value for property 'package': com.km.examples: :
Confirm properties configuration:
groupId: com.km.examples
artifactId: helloworld
version: 1.0-SNAPSHOT
package: com.km.examples
Y: : y
[DEBUG] Archetype generation configuration confirmed
[INFO]
----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Old (1.x)
Archetype: maven-archetype-quickstart:1.0-alpha-1
[INFO]
----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: com.km.examples
[INFO] Parameter: packageName, Value: com.km.examples
[INFO] Parameter: package, Value: com.km.examples
[INFO] Parameter: artifactId, Value: helloworld
[INFO] Parameter: basedir, Value: C:\KM\my_maven_projects
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 31.324s
[INFO] Finished at: Sun Sep 11 00:44:24 EST 2011
[INFO] Final Memory: 7M/61M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-
archetype-plugin:2.1:generate (default-cli) on project standalone-pom:
Error reading POM -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
execute goal org.apache.maven.plugins:maven-archetype-plugin:
2.1:generate (default-cli) on project standalone-pom: Error reading
POM
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:
213)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:
153)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:
145)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:
84)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:
59)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:
183)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:
161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:
319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:
156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
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.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:
290)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:
230)
at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:
409)
at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
Caused by: org.apache.maven.plugin.MojoFailureException: Error reading
POM
at
org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute(CreateProjectFromArchetypeMojo.java:
211)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:
101)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:
209)
... 19 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
***********************************************************************
Thank you
Krishna Mohan