Comments (16)
I was able to build it by adding some extra requires tech.uom.lib.common;
in the module-info
from uom-domain.
Does this need to be fixed? Do you want me to submit a PR?
from uom-domain.
Hi, this is a bug in Java 11 as well despite its LTS label it isn't as stable as sugested, especially with Jigsaw and Multi-Release-JARs.
The bug is summarized and pointed to here: https://stackoverflow.com/questions/53581799/jdeps-command-use-with-multi-release-option-failed
I cannot say for sure, what is the other issue, because it seems to fail even in Java 14 while Multi-Release-JAR problems we saw in the past no longer showed in
Please use Java 9 for now, it works perfectly fine with that.
from uom-domain.
If you found additional imports in the module-info that work above Java 11, please do, the issue you saw first ist a known problem in the JDK.
from uom-domain.
Thank you for your reply. I have created a PR to fix the build but I now have a new question. I add the uom-retail-quantity
dependency to my pom.xml and I expect to be able to use the new units box
, each
and crate
automatically. However, when I try to parse from string:
ServiceProvider.current().getFormatService().getUnitFormat().parse("box");
I get a MeasurementParseException
because the unit is not found. I see none of the modules in the uom-domain project declare a javax.measure.spi.ServiceProvider
and I was wondering if I have to declare one in my project. Or is it a missing feature? I mean I would expect each of the modules in this project to declare their own ServiceProvider to automatically register the units that it provides.
from uom-domain.
Oops - closed by mistake
from uom-domain.
But why reopen it, wasn't it fixed by your PR #18?
from uom-domain.
@keilw any chance you could do a release with that fix?
from uom-domain.
We are quite flexible here so I guess together with #16 this justifies a 2.1 release any time soon.
from uom-domain.
There is however a possible alignment with issues like unitsofmeasurement/uom-systems#177 but it could be done in a 2.1.1 release. So far this library seems independent of uom-systems, it may change in the future.
from uom-domain.
I want to test it before I close the issue. However I don't know how to use the new units. From above:
However, when I try to parse from string:
ServiceProvider.current().getFormatService().getUnitFormat().parse("box");
I get a MeasurementParseException because the unit is not found. I see none of the modules in the uom-domain project declare a javax.measure.spi.ServiceProvider and I was wondering if I have to declare one in my project. Or is it a missing feature? I mean I would expect each of the modules in this project to declare their own ServiceProvider to automatically register the units that it provides.
from uom-domain.
As of now there is no SystemOfUnits
implementation that would even know a unit BOX
.
from uom-domain.
But what would be the right approach - provide one with the module, or let the customer create his own. If you opt for the first one I can create a PR
from uom-domain.
Maybe similar to https://github.com/unitsofmeasurement/uom-domain/tree/master/health/health/src/main/java/tech/uom/domain/health/unit in "health" this might help, but note even in "health" there is no full integration with the SPI yet, but unless you go all the way of adding a custom formatter, check out https://github.com/unitsofmeasurement/uom-systems/blob/master/unicode/src/main/java/systems/uom/unicode/CLDR.java and see how SimpleUnitFormat
is configured there, that might be sufficient, but keep in mind, it only works for SimpleUnitFormat.
from uom-domain.
Needs #14
I can fix it for Health, if you would like to create a PR for the "retail" module, there should be no conflicts.
I'll work on #2 and #16 but it is not necessary to recognize those new units to integrate the system with the SPI, that is the cherry on the cake if you want.
from uom-domain.
Imaging has a dependency already, so we should not release a 2.1 of this module before systems-uom 2.1 was released first.
from uom-domain.
Related Issues (20)
- Consider Each / Box HOT 1
- Create pages
- Add SpecificCarbonEmission
- UMLS Use Cases
- Fix the stability badge
- [retail] Add EACH HOT 2
- Upgrade version to 2.1
- Add a new Music domain HOT 1
- Integrate Health with the SPI to demonstrate how to add a new system HOT 1
- Add support for NAMM UOM Codes
- Replace Bintray/JCenter in Domain build settings
- Add VO2Max to Health units
- Should weather stay a separate domain or be merged into energy?
- Add units/quantities for Climate sensitivity
- Create Cloud module
- Add unit tests for MP Metrics HOT 1
- Refactor the Indriya based MP-Metrics module to tech TLD HOT 3
- Create Imaging module
- Add Energy API
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uom-domain.