Hi Samuel I have builld all the javacv ,javacpp-presets and javacpp libraries myself. Im using Ubuntu and gradle.
I have those entries in my build.gradle:
repositories{
mavenCentral()
mavenLocal()
}
dependencies {
compile 'org.bytedeco:javacv:1.2-SNAPSHOT'
compile("org.bytedeco.javacpp-presets:opencv:3.1.0-1.2-SNAPSHOT:linux-x86_64")
compile("org.bytedeco.javacpp-presets:ffmpeg:3.0.1-1.2-SNAPSHOT:linux-x86_64")
}
However the javacv dependency causes this error:
Could not resolve all dependencies for configuration ':compile'.
Could not find javacpp-presets-${os.name}-${os.arch}.jar (org.bytedeco:javacpp-presets:1.2-SNAPSHOT).
Searched in the following locations:
file:/home/user/.m2/repository/org/bytedeco/javacpp-presets/1.2-SNAPSHOT/javacpp-presets-1.2-SNAPSHOT-${os.name}-${os.arch}.jar
Any idea what might cause this?
I have build javacpp-presets with these commands:
bash cppbuild.sh -platform linux-x86_64 install
mvn clean install -Djavacpp.platform=linux-x86_64 -Djavacpp.platform.dependency=false
I have build javacv like this:
mvn clean install -Pffmpeg.
It looks like Gradle doesn't resolve the os.name and os.arch properties like Maven does. AFAIK, to get Gradle working perfectly, we would need to create a small special project for that. @lloydmeta has created sbt-javacv and sbt-javacpp to resolve these issues with sbt. Would you be interested in making the same thing for Gradle?
Sure. Id love to do that. Just give me some time.
Great! Keep me updated on your progress
I guess we shouldn't break things that used to work, even if it's caused by a bug in Gradle, so marking this as a bug. The workaround is to include this in the build.gradle file:
configurations {
all*.exclude group: 'org.bytedeco', module: 'javacpp-presets'
}
The JavaCPP Presets and JavaCV 1.3 now rely on "platform artifacts", so we won't be having issues like this anymore with either Gradle or sbt! Thanks for reporting
Most helpful comment
I guess we shouldn't break things that used to work, even if it's caused by a bug in Gradle, so marking this as a bug. The workaround is to include this in the
build.gradlefile: