0

JSR-275 has been discontinued and will soon be removed from the javax namespace as far as I can tell from googling around. Supposedly there is a replacement at org.unitsofmeasurement but the API seems to be quite different from JSR-275. Supposedly jscience is a replacement but there doesn't seem to be a maven repository with artefacts (like a JAR) that can be relied upon.

Am I missing something or is this just one of those things where I need to download source, build my own JAR, and ignore the chaos out on the Internet?

And if I do that, what are the options? Is there a good option for source download or to I need to just grab a copy of the something like jsr-275 1.0-beta-2 jar and stash it away in my own repo? This seems a bit risky since a future Java upgrade (Java 9?) could potentially break compatibility with some old jars.

How are you handling this issue?

Edwin Dalorzo
  • 76,803
  • 25
  • 144
  • 205
Michael Dillon
  • 31,973
  • 6
  • 70
  • 106
  • Have you looked at: http://stackoverflow.com/questions/4224122/which-jsr-275-units-implementation-should-be-used – pat34515 Jul 23 '12 at 06:02
  • Indeed I have and that info is out of date. Since that time not much has happened with the JSR-275 implementations as far as I can see. But I am hoping that other users of these classes would explain how they are dealing with the problem today. – Michael Dillon Jul 23 '12 at 06:26

2 Answers2

1

While looking for a JSR-275 replacement, I found Eclipse UOMo http://www.eclipse.org/uomo/.

It is still at the incubation stage, but it seems very promising.

Don't know if they have a Maven repository, but it is fully OSGi compatible, which is very interesting.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Ben
  • 6,321
  • 9
  • 40
  • 76
0

The official replacement of JSR-275 is JSR-363 Units of Measurement API. There are different implementations (see also JSR 363 Implementation and Adoption), I would recommend the reference implementation Indriya as it seems a stable Java 8 (2.0) or even Java 9/12/14 implementation (2.1) available from Maven Central.

More details can be found on the official Units of Measurement project site.

Arne Burmeister
  • 20,046
  • 8
  • 53
  • 94