Strange behavior with JavaCV added as dependency

Hi Team,

A Strange problem found when adding JavaCV dependencies:

  1. if only add
        compile 'org.bytedeco:javacv:1.5.4'
        compile 'org.bytedeco:javacpp:1.5.4'

both jar will be copied to shared/lib in tomcat after deployment from Studio.

But if add below:

        compile 'org.bytedeco:javacv:1.5.4'
        compile 'org.bytedeco:javacpp:1.5.4'
        compile 'org.bytedeco:ffmpeg-platform:4.3.1-1.5.4'
        compile 'org.bytedeco:opencv-platform:4.4.0-1.5.4'

javacpp-1.5.4.jar will be copied and suddenly deleted, which will cause runtime issue working with API in javacpp.

Could you please help check if this is CUBA gradle plugin issue or something else?

Thank you for reporting the problem. We have created a GitHub issue.


1 Like

CUBA uses its own dependency resolution process for shared libs folder. OpenCV library names are differ from standard library names and CUBA tries to remove libraries.

We have fix the problem in one case, but there are still cases that remove OpenCV libraries.

Could you provide a sample project with opencv library usage or a full list of dependencies with OpenCV?

Hi Andrey,
This issue was reported in China forum, and the developer is @4714407. He also reported in this post:

@4714407 could you share your sample project here?

Adding below to build.gradle:

  compile 'org.bytedeco:javacpp:1.5.5'
  compile 'org.bytedeco:ffmpeg-platform:4.3.2-1.5.5'
  compile 'org.bytedeco:opencv:4.5.1-1.5.5'
  compile 'org.bytedeco:opencv-platform:4.5.1-1.5.5'
  compile 'org.bytedeco:cuda-platform:11.2-8.1-1.5.5'
  compile 'org.bytedeco:opencv-platform-gpu:4.5.1-1.5.5'

missing jar is: