OpenCVライブラリを使用してビデオをレンダリングする基本的なプログラムを実行しようとしています。私が得る主な問題の1つは、依存関係を読み込もうとしている間に、それが使用するネイティブライブラリであるmavenがエラーを報告するということです。私がここでチェックしたすべての解決策は、GitHubと他の場所では実を結びませんでした。OpenCVネイティブライブラリがMavenでロードされていません
これはこれはopencvjar-3.0.0.jarとopencvjarランタイム-3.0.0-原住民-Windowsのx86_64.jar
システム・パスを作成する必要がありますのpom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<repositories>
<repository>
<id>javaopencvbook</id>
<url>https://raw.github.com/JavaOpenCVBook/code/maven2/</url>
</repository>
</repositories>
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>mavenproject1</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.javaopencvbook</groupId>
<artifactId>opencvjar</artifactId>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>org.javaopencvbook</groupId>
<artifactId>opencvjar-runtime</artifactId>
<version>3.0.0</version>
<classifier>natives-windows-x86_64</classifier>
</dependency>
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>com.mycompany.mavenproject1.App</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.googlecode.mavennatives</groupId>
<artifactId>maven-nativedependencies-plugin</artifactId>
<version>0.0.7</version>
<executions>
<execution>
<id>unpacknatives</id>
<phase>generate-resources</phase>
<goals>
<goal>copy</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
ですこれに必要な値も設定する必要があります。 %PATH%変数には、ネイティブの.jarへのパスが追加されています。私の場合は、プロジェクトが
Dに位置しています:\ AleksandarRakic \ Javaプロジェクトの\ mavenproject1
ネイティブライブラリが
にある間D:\ AleksandarRakic \ Javaプロジェクトの\ mavenproject1 \ target \ natives
私はNetBeans 8.2を使用しています。
The POM for org.javaopencvbook:opencvjar-runtime:jar:natives-windows-x86_64:3.0.0 is missing, no dependency information available
が持続上記のエラー、どんなに私が使用OpenCVののバージョン:私はそれが次のエラー/警告を表示するプロジェクトをビルドし&をきれいにするとき。私も3.1.0のバージョンを入れてみましたが、コアジャーが見つからないと言っています。
私は2日間この問題を解決しようとしましたが、どんな助けも歓迎します。
2つのプロジェクトがありますか? 1つはライブラリ用、もう1つはプロジェクト用ですか?エラーの最後の行を投稿してください。 – mebada