RE: Build failure when running from command promt to create a maven project in interactive mode

Answered

Hi All,

please let me know……getting following error when typing the command mvn archetype:generate

at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(Cl
assRealm.java:389)
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(
SelfFirstStrategy.java:42)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadCl
ass(ClassRealm.java:259)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm
.java:235)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm
.java:227)
at org.apache.velocity.runtime.resource.ResourceCacheImpl.initialize(Res
ourceCacheImpl.java:71)
at org.apache.velocity.runtime.resource.ResourceManagerImpl.initialize(R
esourceManagerImpl.java:198)
at org.apache.velocity.runtime.RuntimeInstance.initializeResourceManager
(RuntimeInstance.java:594)
at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java
:241)
at org.apache.velocity.app.VelocityEngine.init(VelocityEngine.java:116)
at org.codehaus.plexus.velocity.DefaultVelocityComponent.initialize(Defa
ultVelocityComponent.java:95)
at org.eclipse.sisu.plexus.PlexusLifecycleManager.initialize(PlexusLifec
ycleManager.java:343)
at org.eclipse.sisu.plexus.PlexusLifecycleManager.manageLifecycle(Plexus
LifecycleManager.java:301)
at org.eclipse.sisu.plexus.PlexusLifecycleManager.onProvision(PlexusLife
cycleManager.java:143)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.p
rovision(ProvisionListenerStackCallback.java:109)
at com.google.inject.internal.ProvisionListenerStackCallback.provision(P
rovisionListenerStackCallback.java:55)
at com.google.inject.internal.ProviderInternalFactory.circularGet(Provid
erInternalFactory.java:68)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(
InternalFactoryToInitializableAdapter.java:47)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:99
7)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.ja
va:1047)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:993)
at com.google.inject.Scopes$1$1.get(Scopes.java:59)
at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:82)

at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:5
1)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContai
ner.java:260)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContai
ner.java:252)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfigu
redMojo(DefaultMavenPluginManager.java:462)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:119)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:208)
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.buildProje
ct(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThre
adedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
356)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.collections.Boun
dedMap
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(
SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadCl
ass(ClassRealm.java:259)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm
.java:235)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm
.java:227)
… 57 more
[INFO] ————————————————————————
[INFO] BUILD FAILURE
[INFO] ————————————————————————
[INFO] Total time: 1.300 s
[INFO] Finished at: 2014-10-25T14:06:25+05:30
[INFO] Final Memory: 7M/16M
[INFO] ————————————————————————
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2
.2:generate (default-cli) on project standalone-pom: Execution default-cli of go
al org.apache.maven.plugins:maven-archetype-plugin:2.2:generate failed: A requir
ed class was missing while executing org.apache.maven.plugins:maven-archetype-pl
ugin:2.2:generate: org/apache/commons/collections/BoundedMap
[ERROR] —————————————————–
[ERROR] realm = plugin>org.apache.maven.plugins:maven-archetype-plugin:2.2
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/Satya/.m2/repository/org/apache/maven/plugins/m
aven-archetype-plugin/2.2/maven-archetype-plugin-2.2.jar
[ERROR] urls[1] = file:/C:/Users/Satya/.m2/repository/org/apache/maven/archetype
/archetype-catalog/2.2/archetype-catalog-2.2.jar
[ERROR] urls[2] = file:/C:/Users/Satya/.m2/repository/org/apache/maven/archetype
/archetype-descriptor/2.2/archetype-descriptor-2.2.jar
[ERROR] urls[3] = file:/C:/Users/Satya/.m2/repository/org/apache/maven/archetype
/archetype-registry/2.2/archetype-registry-2.2.jar
[ERROR] urls[4] = file:/C:/Users/Satya/.m2/repository/org/apache/maven/archetype
/archetype-common/2.2/archetype-common-2.2.jar
[ERROR] urls[5] = file:/C:/Users/Satya/.m2/repository/net/sourceforge/jchardet/j
chardet/1.0/jchardet-1.0.jar
[ERROR] urls[6] = file:/C:/Users/Satya/.m2/repository/org/codehaus/plexus/plexus
-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR] urls[7] = file:/C:/Users/Satya/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.
6.1.jar
[ERROR] urls[8] = file:/C:/Users/Satya/.m2/repository/xml-apis/xml-apis/1.0.b2/x
ml-apis-1.0.b2.jar
[ERROR] urls[9] = file:/C:/Users/Satya/.m2/repository/jdom/jdom/1.0/jdom-1.0.jar

[ERROR] urls[10] = file:/C:/Users/Satya/.m2/repository/commons-io/commons-io/1.4
/commons-io-1.4.jar
[ERROR] urls[11] = file:/C:/Users/Satya/.m2/repository/org/codehaus/plexus/plexu
s-velocity/1.1.8/plexus-velocity-1.1.8.jar
[ERROR] urls[12] = file:/C:/Users/Satya/.m2/repository/org/apache/velocity/veloc
ity/1.5/velocity-1.5.jar
[ERROR] urls[13] = file:/C:/Users/Satya/.m2/repository/commons-lang/commons-lang
/2.1/commons-lang-2.1.jar
[ERROR] urls[14] = file:/C:/Users/Satya/.m2/repository/oro/oro/2.0.8/oro-2.0.8.j
ar
[ERROR] urls[15] = file:/C:/Users/Satya/.m2/repository/org/codehaus/plexus/plexu
s-utils/1.5.8/plexus-utils-1.5.8.jar
[ERROR] urls[16] = file:/C:/Users/Satya/.m2/repository/org/apache/maven/reportin
g/maven-reporting-api/2.0.8/maven-reporting-api-2.0.8.jar
[ERROR] urls[17] = file:/C:/Users/Satya/.m2/repository/org/apache/maven/doxia/do
xia-sink-api/1.0-alpha-9/doxia-sink-api-1.0-alpha-9.jar
[ERROR] urls[18] = file:/C:/Users/Satya/.m2/repository/commons-cli/commons-cli/1
.0/commons-cli-1.0.jar
[ERROR] urls[19] = file:/C:/Users/Satya/.m2/repository/org/codehaus/plexus/plexu
s-interactivity-api/1.0-alpha-5/plexus-interactivity-api-1.0-alpha-5.jar
[ERROR] urls[20] = file:/C:/Users/Satya/.m2/repository/org/apache/maven/shared/m
aven-invoker/2.0.11/maven-invoker-2.0.11.jar
[ERROR] urls[21] = file:/C:/Users/Satya/.m2/repository/commons-collections/commo
ns-collections/3.2.1/commons-collections-3.2.1.jar
[ERROR] urls[22] = file:/C:/Users/Satya/.m2/repository/org/codehaus/groovy/groov
y/1.8.3/groovy-1.8.3.jar
[ERROR] urls[23] = file:/C:/Users/Satya/.m2/repository/antlr/antlr/2.7.7/antlr-2
.7.7.jar
[ERROR] urls[24] = file:/C:/Users/Satya/.m2/repository/asm/asm/3.2/asm-3.2.jar
[ERROR] urls[25] = file:/C:/Users/Satya/.m2/repository/asm/asm-commons/3.2/asm-c
ommons-3.2.jar
[ERROR] urls[26] = file:/C:/Users/Satya/.m2/repository/asm/asm-util/3.2/asm-util
-3.2.jar
[ERROR] urls[27] = file:/C:/Users/Satya/.m2/repository/asm/asm-analysis/3.2/asm-
analysis-3.2.jar
[ERROR] urls[28] = file:/C:/Users/Satya/.m2/repository/asm/asm-tree/3.2/asm-tree
-3.2.jar
[ERROR] urls[29] = file:/C:/Users/Satya/.m2/repository/org/beanshell/bsh/2.0b4/b
sh-2.0b4.jar
[ERROR] urls[30] = file:/C:/Users/Satya/.m2/repository/org/apache/maven/shared/m
aven-script-interpreter/1.0/maven-script-interpreter-1.0.jar
[ERROR] urls[31] = file:/C:/Users/Satya/.m2/repository/org/apache/ant/ant/1.8.1/
ant-1.8.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] —————————————————–: org.apache.common
s.collections.BoundedMap
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContaine
rException
[WARNING] Problem disposing: org.codehaus.plexus.components.interactivity.Defaul
tInputHandler@1fd9e4b
java.lang.NullPointerException
at org.codehaus.plexus.components.interactivity.DefaultInputHandler.disp
ose(DefaultInputHandler.java:70)
at org.eclipse.sisu.plexus.PlexusLifecycleManager.dispose(PlexusLifecycl
eManager.java:408)
at org.eclipse.sisu.plexus.PlexusLifecycleManager.unmanage(PlexusLifecyc
leManager.java:193)
at org.codehaus.plexus.DefaultPlexusContainer.dispose(DefaultPlexusConta
iner.java:586)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:241)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
356)
[WARNING] Problem disposing: org.codehaus.plexus.components.interactivity.Defaul
tOutputHandler@a10882
java.lang.NullPointerException
at org.codehaus.plexus.components.interactivity.DefaultOutputHandler.dis
pose(DefaultOutputHandler.java:53)
at org.eclipse.sisu.plexus.PlexusLifecycleManager.dispose(PlexusLifecycl
eManager.java:408)
at org.eclipse.sisu.plexus.PlexusLifecycleManager.unmanage(PlexusLifecyc
leManager.java:193)
at org.codehaus.plexus.DefaultPlexusContainer.dispose(DefaultPlexusConta
iner.java:586)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:241)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
356)
[WARNING] Problem disposing: org.codehaus.plexus.components.interactivity.Defaul
tInputHandler@114939
java.lang.NullPointerException
at org.codehaus.plexus.components.interactivity.DefaultInputHandler.disp
ose(DefaultInputHandler.java:70)
at org.eclipse.sisu.plexus.PlexusLifecycleManager.dispose(PlexusLifecycl
eManager.java:408)
at org.eclipse.sisu.plexus.PlexusLifecycleManager.unmanage(PlexusLifecyc
leManager.java:193)
at org.codehaus.plexus.DefaultPlexusContainer.dispose(DefaultPlexusConta
iner.java:586)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:241)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
356)
[WARNING] Problem disposing: org.codehaus.plexus.components.interactivity.Defaul
tOutputHandler@1339522
java.lang.NullPointerException
at org.codehaus.plexus.components.interactivity.DefaultOutputHandler.dis
pose(DefaultOutputHandler.java:53)
at org.eclipse.sisu.plexus.PlexusLifecycleManager.dispose(PlexusLifecycl
eManager.java:408)
at org.eclipse.sisu.plexus.PlexusLifecycleManager.unmanage(PlexusLifecyc
leManager.java:193)
at org.codehaus.plexus.DefaultPlexusContainer.dispose(DefaultPlexusConta
iner.java:586)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:241)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
356)
D:\Selenium_project>

Add Comment
1 Answers
Best answer

Hi,

I suggest you to create a Maven Project from Eclipse, it is much easy than creating it from Command line. Please follow the link:

http://www.toolsqa.com/java/maven/create-new-maven-project-eclipse/

Regards,
Lakshay Sharma

Professor Answered on October 25, 2014.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.