-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
I just had cause to add systems-ucum (to access the troy-ounces constant) to an existing project that had only been using Indriya only, using the following:
<dependency>
<groupId>systems.uom</groupId>
<artifactId>systems-ucum</artifactId>
<version>2.2</version>
<scope>compile</scope>
</dependency>
And received the following stack as a result:
Caused by: java.lang.ClassNotFoundException: systems.uom.quantity.Drag
at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at systems.uom.ucum.UCUM.<clinit>(UCUM.java:710)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at tech.units.indriya.format.SymbolMap.<init>(SymbolMap.java:116)
at tech.units.indriya.format.SymbolMap.of(SymbolMap.java:143)
at systems.uom.ucum.format.UCUMFormat$Parsing.<clinit>(UCUMFormat.java:432)
at systems.uom.ucum.format.UCUMFormat.getInstance(UCUMFormat.java:110)
at systems.uom.ucum.spi.UCUMFormatService.<init>(UCUMFormatService.java:82)
at systems.uom.ucum.spi.UCUMServiceProvider.getFormatService(UCUMServiceProvider.java:61)
[snip]
To resolve this, I also had to add the following:
<dependency>
<groupId>systems.uom</groupId>
<artifactId>systems-quantity</artifactId>
<version>2.2</version>
<scope>runtime</scope>
</dependency>
I would expect that if systems-ucum has a hard dependency on systems-quantity, then it should depend on it.