I get an error downloading javax.media.jai_core:1.1.3 from maven central.
The error is:
download failed: javax.media#jai_core;1.1.3!jai_core.jar
using play compiler.
I get an error downloading javax.media.jai_core:1.1.3 from maven central.
The error is:
download failed: javax.media#jai_core;1.1.3!jai_core.jar
using play compiler.
Solution for gradle with kotlin dsl (8.4)
Below changes in file build.gradle.kts
Add jboss repository in repository section
maven {
url = uri("https://repository.jboss.org")
}
Exclude from dependencies using jai_core
implementation("org.geotools:gt-shapefile:30.0") {
exclude("javax.media", "jai_core")
}
implementation("org.geotools:gt-swing:30.0") {
exclude("javax.media", "jai_core")
}
Add dependency on jai.core that exists in jboss maven repository
implementation("javax.media:jai-core:1.1.3")
I was having a similar problem, trying to add icepdf to my pom for a project. What worked for me was adding this exclusion inside de dependency tag:
<exclusions>
<exclusion>
<groupId>javax.media</groupId>
<artifactId>jai-core</artifactId>
</exclusion>
</exclusions>
Here is the link to the answer that helped me, hoping it helps some other people having this same issue:
And move the http://download.osgeo.org/webdav/geotools repo to the first position in your repo list. Otherwise it will probably still give you that error.
The problem at this moment is that maven-central doesn't have the .jar, which is a dependency from geotoolkit
If you need it, you could use the next public repositories:
https://maven.geotoolkit.org (jai-core is here)
https://repo.osgeo.org/repository/release/
Make sure geotoolkit-repo is before Maven Central, so that it resolves before Central which misses the jar.