so

jai-core

Volume 8, Issue 15; 09 Nov 2024

You want the one with the dash, not the one with the underscore. I think.

In order to build Apache FOP, you need the core library from the Java Advanced Imaging API.

javax.media:jai-core:1.1.3

Somewhere along the way, a long time ago, I added a dependency to my XML Calabash build for

javax.media:jai_core:1.1.3

That’s wrong, I think. That should be a dash not an underscore. Unfortunately, “you spelled it wrong” wasn’t the most obvious answer because there’s a broken deployment for the underscore version on Maven Central.

javax/media/jai_core/1.1.3:

../
jai_core-1.1.3-javadoc.jar                        2009-07-10 16:30   1951306      
jai_core-1.1.3-javadoc.jar.md5                    2009-07-10 16:30       137      
jai_core-1.1.3-javadoc.jar.sha1                   2009-07-10 16:30       145      
jai_core-1.1.3.pom                                2009-07-10 16:30      1324      
jai_core-1.1.3.pom.md5                            2009-07-10 16:30       129      
jai_core-1.1.3.pom.sha1                           2009-07-10 16:30       137      

I say broken because there’s a POM file but not a Jar file. Gradle doesn’t like this. It’s happily searching through the list of repositories you’ve configured until it gets to this one where it both stops searching and fails to find the jar.

It turns out that jai-core isn’t on Maven Central at all, but that’s okay because Gradle will keep searching. It is on JBoss.

Years ago, I scratched around and found the underscore version in a repository. So things sort of worked. Until I tried to get that working in a GitHub action for the XML Calabash 3.0 build last week.

Turns out if that repository is in the search path, when Gradle tries to find a bit of Kotlin infrastructure there, it doesn’t return 404, instead the connection times out. Which also causes the build to fail.

It’s a damned-if-you-do, damned-if-you-don’t situation. I think I could have tweaked the build so that Gradle wouldn’t look on Maven Central for the jai_core artifact.

But it’s a lot simpler to just search for the correct artifact. After, you know, you’ve worked out what that is!

#GitHub Actions #Gradle