Re: Java Money Library update does not build successfully when building Fineract CN
I’ve taken a close look at our dependency to the java money library; it
turns out we are using the following from it:
* Some types (in portfolio and in deposit-account-management)
* an annual interest calculation (in deposit-account-management)
* a piece of code which we wrote in portfolio with the intention of
contributing it back to java money.
The types are for money amounts, interest rates and currencies. The
currencies weren't actually used, and the interest rates and amounts could
be replaced with BigDecimals. The annual interest calculation was a full
three lines of ALV2-licensed code. I’ve copied them.
We may eventually want to re-introduce the java money library , if it gets
a little further along, and after we get our code running on Java 9. But
right now it's an obstacle, so I've removed it.
Code review welcome. And patches welcome.
Thank you Awasum for finding this and reporting it.
On Sat 14. Apr 2018 at 22:37 Awasum Yannick <awasum@xxxxxxxxxx> wrote:
> Hello Everyone,
> Its seems the Java Money issue has been fixed but unfortunately it requires
> Java 9 for a build to be successful. For the moment we might have to stick
> to the 0.9 version which uses Java 8 so we dont begin switching Java
> Follow the thread here:
> On Thu, Apr 12, 2018 at 7:37 PM, Awasum Yannick <awasum@xxxxxxxxxx> wrote:
> > Hey Myrle,
> > For the short term, I have an older version (snapshot of Java Money)
> > builds successfully and solves the problem for now. For anyone who has
> > problem building Java Money, clone this version: https://github.com/
> > awasum/javamoney-lib
> > Issues have been raised on the Java Money Github Repos, See:
> > https://github.com/JavaMoney/javamoney-lib/issues/44 and
> > https://github.com/JavaMoney/jsr354-ri/issues/186
> > I have commented on the issues so as to keep track of the conversation.
> > seems they need to release to more Java Money dependencies to
> > before the problem can be fixed.
> > Thanks.
> > On Thu, Apr 12, 2018 at 7:17 PM, Myrle Krantz <myrle@xxxxxxxxxx> wrote:
> >> Hey Awasum,
> >> I was not aware of the changes. I can't work on a solution right now
> >> because i"m in the middle of renaming all of the packages from
> >> io.mifos to org.apache.fineract.cn, and it's a multi-repository
> >> change.
> >> Maybe you'll already have a solution by the time I'm done. If not, we
> >> can have a think on it together.
> >> Best Regards,
> >> Myrle
> >> On Thu, Apr 12, 2018 at 6:15 PM, Awasum Yannick <awasum@xxxxxxxxxx>
> >> wrote:
> >> > Hello Everyone,
> >> >
> >> > While building Fineract CN on a fresh machine, I realized that the
> >> > Money Library is not building successfully and as a result of that
> >> services
> >> > which depends on Java Money are failing.
> >> >
> >> > It seems the Java Money library here
> >> > <https://github.com/JavaMoney/javamoney-lib/> has been updated and
> >> > build process has changed or there is a breaking change. I had to
> >> revert to
> >> > cloning the old repo I had forked few months ago:
> >> > https://github.com/awasum/javamoney-lib
> >> >
> >> > Please try to build the new Java Money code and let me know so I can
> >> update
> >> > the build script and also the Build guide on Confluence.
> >> >
> >> >
> >> >
> >> > Thanks.
> >> > Awasum