Russel Winder's Website


JSR166 and the Maven repository

Anyone who programs using Java is aware of the java.util.concurrent package - if you program in Java and aren't aware of this package then stop whatever you are doing and go and read all about it now. Development of this package comes under JSR166. The observant will notice that JSR166 is complete (all the material then available made it to Java 5), but not entirely closed. Doug Lea continues to manage development of the materials (see here). JSR166x was a set of extension that made it to Java 6 along with a few updates to the old JSR166 material. JSR166y is a set of new features (the ForkJoin framework) to be added in Java 7. Extra166y is some further enhancements (ParallelArray) that will not make Java 7 but is scheduled to make Java 8. Of course, we want it all, and we want it now. And we can have it.

On the Concurrency JSR-166 Interest Site you are able to download the current version of all the jar files. This however isn't the way the Java milieu operates in terms of dependencies these days, the Maven repository is where stuff that actually gets used has to be.

So a few days ago I emailed Doug asking for his permission to create a route to get all the JSR166 work into the Maven repository, enabling everyone to use all these good things now with Java 6 via idiomatic dependency handling techniques. Obviously given this blog entry, he agreed. The splendid folk at Codehaus have allowed me to create the JSR166-Mirror project. This provides an easy route to getting JSR166 artefacts available in the Maven repository.

The JSR166-Mirror project hosts a Git repository which is a mirror of Doug's CVS repository, but with an extra branch containing the Gradle build - the JSR166 project currently uses Ant, but using Gradle makes doing things such as uploading artefacts to repositories so much easier.

I have uploaded artefacts to the Codehaus snapshot repository - note this is the snapshots repository not the main repository, if you want to make use of these artefacts you'll have to add this repository to your resolver be it using Gradle, Maven, Ivy, Gant or Ant. The artefacts have groupId org.codehaus.jsr166-mirror and version 0.4.40-SNAPSHOT there being the artefacts jsr166, jsr166tck, jsr166x, jsr166y and extra166y. The ones of interest are jsr166y and extra166y - the rest are effectively already in Java 6 anyway.

There are a number of checks that haven't yet been done:

  1. I haven't compared a CVS checkout with the Git repository to ensure the HEADS are actually the same source code. Clearly this needs to be done, I feel a Bash or Python script coming on :-)
  2. The Gradle build needs to be finished to make it not need a specific sequence of commands to avoid some dependency issues.
  3. There is a TCK test fail when testing via the Gradle build. I need to check this out to see if it is a Gradle build failure or a real error that is masked by the Ant build.
  4. There needs to be a comparison of the jars made via Ant and the jars made via Gradle to ensure that they are mutually consistent, both in terms of the class files, and the meta data. I have to admit, I am not sure of the best process to achieve this.

So currently this is a work in progress. If you are able to try things out and report back any problems, or that everything is exactly as it needs to be, feel free to contact me.

We can be fairly certain that the GPars concurrency and parallelism framework for the JVM will be harnessing jsr166y and extra166y just as soon as it can.


Copyright © 2017 Russel Winder -