JAVACV with Ma Ven?

Asked

Viewed 163 times

2

I made the JAVACV clone https://github.com/bytedeco/javacv

I’m trying to run the project build:

clean install

But when I run I find the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/base/Strings
    at org.sonatype.nexus.maven.staging.deploy.DeployLifecycleParticipant.getPluginByGAFromContainer(DeployLifecycleParticipant.java:238)
    at org.sonatype.nexus.maven.staging.deploy.DeployLifecycleParticipant.getNexusMavenPluginFromContainer(DeployLifecycleParticipant.java:182)
    at org.sonatype.nexus.maven.staging.deploy.DeployLifecycleParticipant.getBuildPluginsNexusMavenPlugin(DeployLifecycleParticipant.java:163)
    at org.sonatype.nexus.maven.staging.deploy.DeployLifecycleParticipant.afterProjectsRead(DeployLifecycleParticipant.java:95)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:266)
    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:863)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Strings
    at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
    ... 18 more

I found some solutions researching but so far none solved:

https://github.com/bytedeco/javacv/issues/49

https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=java.lang.Classnotfoundexception:+com.google.common.base.Strings+%2Bjavacv

I tried to add the version of Guava, but also did not solve the problem.

Thanks in advance !

1 answer

1

See that to build the project you need to download the files mentioned in the project read me. In page Github’s project is explained this.

You should compile the projects separately. But note that this is not always necessary, you can download the Jars or use Maven to use the project without compiling.

To use Maven simply add dependency to your project:

 <dependency>
    <groupId>org.bytedeco</groupId>
    <artifactId>javacv</artifactId>
    <version>1.2</version>
  </dependency>
  • I added the dependencies and still the error occurs

Browser other questions tagged

You are not signed in. Login or sign up in order to post.