Ask Your Question
0

ODL conntroller build error: Execution default-jar of goal org.apache.maven.plugins:maven-archetype-plugin:2.2:jar failed:

asked 2015-05-21 05:11:16 -0700

eya.get gravatar image

Dear all,

I am still encountering odl controller build errors. But at least I have figured out that the problem is specific to the maven-archetype-plugin. This plugin (with version 2.2) is defined on the POM file, but it is not being accessible or downloaded to local repository while building the project on CLI (with mvn clean install command). My Environment set up is as follows:

  • OS: Ubuntu 14.04
  • Java version: 1.7.0_76 (it is from oracle not openJDK)
  • Maven version: 3.3.3
  • The repo that i cloned: stable/helium

The error trace is as follows:

======================================================= [WARNING] Error initializing: org.codehaus.plexus.velocity.DefaultVelocityComponent@473147be java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils at org.apache.velocity.runtime.resource.ResourceManagerImpl.initialize(ResourceManagerImpl.java:165) 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(DefaultVelocityComponent.java:95) at org.eclipse.sisu.plexus.PlexusLifecycleManager.initialize(PlexusLifecycleManager.java:308) at org.eclipse.sisu.plexus.PlexusLifecycleManager.activate(PlexusLifecycleManager.java:207) at org.eclipse.sisu.bean.BeanScheduler$Pending.activate(BeanScheduler.java:156) at org.eclipse.sisu.bean.BeanScheduler$Activator.onProvision(BeanScheduler.java:185) at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:126) at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68) at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:68) at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:46) at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1009) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1059) at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1005) at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:36) at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:81) at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:51) at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:263) at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:255) at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:546) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:121) 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.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286) at org.apache.maven.cli.MavenCli.main(MavenCli.java:197) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl ... (more)

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
2

answered 2015-05-21 12:33:22 -0700

Bruno Lopes gravatar image

Hi folks

Today I had this problem too ! I tried the above solution and not worked. I tried the newest version of commons-lang and I compiled the controller with success.

Folow the maven dependency of the newest version of commons-lang:

<dependency>
    <groupId>commons-lang</groupId>
    <artifactId>commons-lang</artifactId>
    <version>2.6</version>
</dependency>

I added this dependecy in the ~/.m2/repository/org/apache/maven/plugins/maven-archetype-plugin/2.2/maven-archetype-plugin-2.2.pom (like the above solution).

Thanks!

edit flag offensive delete publish link more

Comments

Both versions can work :).

eya.get ( 2015-05-24 17:07:52 -0700 )edit
0

answered 2015-05-21 10:05:20 -0700

eya.get gravatar image

Adding the following dependency in file ~/.m2/repository/org/apache/maven/plugins/maven-archetype-plugin/2.2/maven-archetype-plugin-2.2.pom solves the problem for me.

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

It might not be a permanent solution though.

edit flag offensive delete publish link more
0

answered 2015-08-03 03:47:26 -0700

happysmile gravatar image

i had the same problem. i removed ~/.m2 folder then created project using archetype. it just worked.

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

Question Tools

Follow
2 followers

Stats

Asked: 2015-05-21 05:11:16 -0700

Seen: 1,385 times

Last updated: Aug 03 '15