Ask is moving to Stack Overflow and Serverfault.com! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode

0

maven-archetype-plugin:2.3:generate failed:A required class was missing while executing org.apache.maven.plugins:maven-archetype-plugin:2.3:generate: org/apache/commons/lang/StringUtils

asked 2015-06-17 00:31:41 -0800

anonymous user

Anonymous

updated 2015-06-17 00:36:11 -0800

I wanted to create a new project by running maven-architype command.I face following error :


Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.3:generate (default-cli) on project standalone-pom: Execution default-cli of goal org.apache.maven.plugins:maven-archetype-plugin:2.3:generate failed: A required class was missing while executing org.apache.maven.plugins:maven-archetype-plugin:2.3:generate: org/apache/commons/lang/StringUtils


[ERROR] ----------------------------------------------------- [ERROR] realm = plugin>org.apache.maven.plugins:maven-archetype-plugin:2.3 [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy [ERROR] urls[0] = file:/home/opendaylight/.m2/repository/org/apache/maven/plugins/maven-archetype-plugin/2.3/maven-archetype-plugin-2.3.jar [ERROR] urls[1] = file:/home/opendaylight/.m2/repository/org/apache/maven/archetype/archetype-catalog/2.3/archetype-catalog-2.3.jar [ERROR] urls[2] = file:/home/opendaylight/.m2/repository/org/apache/maven/archetype/archetype-descriptor/2.3/archetype-descriptor-2.3.jar [ERROR] urls[3] = file:/home/opendaylight/.m2/repository/org/apache/maven/archetype/archetype-registry/2.3/archetype-registry-2.3.jar [ERROR] urls[4] = file:/home/opendaylight/.m2/repository/org/apache/maven/archetype/archetype-common/2.3/archetype-common-2.3.jar [ERROR] urls[5] = file:/home/opendaylight/.m2/repository/net/sourceforge/jchardet/jchardet/1.0/jchardet-1.0.jar [ERROR] urls[6] = file:/home/opendaylight/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar [ERROR] urls[7] = file:/home/opendaylight/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar [ERROR] urls[8] = file:/home/opendaylight/.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar [ERROR] urls[9] = file:/home/opendaylight/.m2/repository/jdom/jdom/1.0/jdom-1.0.jar [ERROR] urls[10] = file:/home/opendaylight/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.11/plexus-interpolation-1.11.jar [ERROR] urls[11] = file:/home/opendaylight/.m2/repository/org/codehaus/plexus/plexus-velocity/1.1.8/plexus-velocity-1.1.8.jar [ERROR] urls[12] = file:/home/opendaylight/.m2/repository/org/apache/velocity/velocity/1.5/velocity-1.5.jar [ERROR] urls[13] = file:/home/opendaylight/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.21/plexus-utils-3.0.21.jar [ERROR] urls[14] = file:/home/opendaylight/.m2/repository/commons-io/commons-io/2.2/commons-io-2.2.jar [ERROR] urls[15] = file:/home/opendaylight/.m2/repository/org/slf4j/slf4j-jdk14/1.5.6/slf4j-jdk14-1.5.6.jar [ERROR] urls[16] = file:/home/opendaylight/.m2/repository/org/slf4j/jcl-over-slf4j/1.5.6/jcl-over-slf4j-1.5.6.jar [ERROR] urls[17] = file:/home/opendaylight/.m2/repository/org/apache/maven/reporting/maven-reporting-api/2.2.1/maven-reporting-api-2.2.1.jar [ERROR] urls[18] = file:/home/opendaylight/.m2/repository/org/apache/maven/doxia/doxia-sink-api/1.1/doxia-sink-api-1.1.jar [ERROR] urls[19] = file:/home/opendaylight/.m2/repository/org/apache/maven/doxia/doxia-logging-api/1.1/doxia-logging-api-1.1.jar [ERROR] urls[20] = file:/home/opendaylight/.m2/repository/commons-cli/commons-cli/1.2/commons-cli-1.2.jar [ERROR] urls[21] = file:/home/opendaylight/.m2/repository/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-6/plexus-interactivity-api-1.0-alpha-6.jar [ERROR] urls[22] = file:/home/opendaylight/.m2/repository/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar [ERROR] urls[23] = file:/home/opendaylight/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3 ... (more)

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2015-06-17 02:32:40 -0800

updated 2015-06-17 02:34:25 -0800

You can resolve this issue in two ways :

  1. Delete your ~/.m2/repository folder and again generate the project.

  2. Add the dependency in file ~/.m2/repository/org/apache/maven/plugins/maven-archetype-plugin/x.x/maven-archetype-plugin-x.x.pom

    <dependency> <groupid>commons-lang</groupid> <artifactid>commons-lang</artifactid> <version>2.3</version> </dependency>

edit flag offensive delete publish link more

Comments

Thanks a lot it worked.

skrasheed.blr ( 2015-06-17 03:35:46 -0800 )edit

Please accept the answer, if the answer is helpful !!

subhash ( 2015-06-17 03:46:22 -0800 )edit
0

answered 2015-07-26 23:08:23 -0800

AntonySilvester gravatar image

thanks, it worked -antony

edit flag offensive delete publish link more
Login/Signup to Answer

Stats

Asked: 2015-06-17 00:31:41 -0800

Seen: 2,494 times

Last updated: Jul 26 '15