Skip to content

Commit f7f9b4f

Browse files
committed
Updated release notes. Simplified artifact ids.
1 parent f8d3400 commit f7f9b4f

File tree

7 files changed

+51
-28
lines changed

7 files changed

+51
-28
lines changed

Diff for: README.md

+16-6
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,20 @@ Java Money and Currency - Libraries extending JSR 354
44
JavaMoney-lib provides extensions and libraries built upon JSR 354 (compatible implementations).
55
Whereas the JSR 354 API and reference implementation provides the fundamentals like monetary amounts,
66
customizable currencies and interfaces for interoperation this library adds additional powerful
7-
APIs and SPIs that were implemented during JSR development as a proof of concept:
7+
APIs and SPIs that were implemented during JSR development as a proof of concept (artifactIds in brackets):
88

9-
* [**Calculation**](calc) provides a set of monetary calculations and formulas. The idea here is to provide a comprehensive set of algorithms and tools to perform complex financial mathematics.
10-
* [**Exchange**](exchange) provides further conversion exchange resources such as FRD and Yahoo.
11-
* [**javamoney-cdi**](integration/javamoney-cdi) Integrates JavaMoney with CDI, so SPIs can as well be loaded from CDI.
9+
* **Calculation** (javamoney-calc) provides a set of monetary calculations and formulas. The idea here is to provide a comprehensive set of algorithms and tools to perform complex financial mathematics.
10+
* **Exchange** (javamoney-exchange) provides further conversion exchange resources such as FRD and Yahoo.
11+
* **FRB** (javamoney-exchange-frb) provides conversion exchange for US Federal Reserve Department FRD.
12+
* **Yahoo** (javamoney-exchange-yahoo) provides conversion exchange using Yahoo financial APIs.
13+
* **javamoney-cdi** (integration/javamoney-cdi) Integrates JavaMoney with CDI.
1214

1315
To use the library you simply have to add the Maven dependency to your project:
1416

1517
```xml
1618
<dependency>
17-
<groupId>org.javamoney</groupId>
18-
<artifactId>javamoney-${module}</artifactId>
19+
<groupId>org.javamoney.lib</groupId>
20+
<artifactId>${artifactId}</artifactId>
1921
<versionId>the current library version</version>
2022
</dependency>
2123
```
@@ -26,6 +28,14 @@ Different people have contributed to this project. During the development of JSR
2628
founded this project and were also the main contributors. Nevertheless everybody is really welcome to help
2729
us, to make this library more feasible and add features.
2830

31+
Special thanks go to @manuela-grindei for her awsome help implementing financial formulas.
32+
33+
Release Notes
34+
-------------
35+
36+
* **1.0** First release of the libraries.
37+
38+
2939
javamoney-shelter
3040
-----------------
3141
The javamoney [shelter module](http://javamoney.github.io/shelter.html) is for testing out new features or

Diff for: calc/pom.xml

+5-4
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,14 @@
9191
<groupId>javax.money</groupId>
9292
<artifactId>money-api</artifactId>
9393
</dependency>
94-
<!--<dependency>-->
95-
<!--<groupId>org.javamoney.moneta</groupId>-->
96-
<!--<artifactId>moneta-core</artifactId>-->
97-
<!--</dependency>-->
9894
<dependency>
9995
<groupId>javax.annotation</groupId>
10096
<artifactId>javax.annotation-api</artifactId>
10197
</dependency>
98+
<dependency>
99+
<groupId>org.javamoney.moneta</groupId>
100+
<artifactId>moneta-core</artifactId>
101+
<scope>test</scope>
102+
</dependency>
102103
</dependencies>
103104
</project>

Diff for: calc/src/test/java/org/javamoney/calc/common/PresentValueTest.java

+15-14
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import java.math.RoundingMode;
2424
import javax.money.*;
2525

26-
import org.javamoney.moneta.Money;
2726
import org.junit.Test;
2827

2928
/**
@@ -40,19 +39,20 @@ public class PresentValueTest{
4039
*/
4140
@Test
4241
public void testOfAndApply() throws Exception {
43-
Money money = Money.of(100, "CHF");
42+
MonetaryAmountFactory fact = Monetary.getDefaultAmountFactory();
43+
MonetaryAmount money = fact.setCurrency("CHF").setNumber(100).create();
4444
MonetaryOperator rounding = Monetary.getRounding(RoundingQueryBuilder.of().setScale(2).set(RoundingMode.HALF_EVEN)
4545
.build());
46-
assertEquals(Money.of(BigDecimal.valueOf(95.24), "CHF"), money.with(PresentValue.of(RateAndPeriods.of(0.05, 1))).with(rounding));
47-
assertEquals(Money.of(BigDecimal.valueOf(90.70), "CHF"), money.with(PresentValue.of(RateAndPeriods.of(0.05, 2))).with(rounding));
48-
assertEquals(Money.of(BigDecimal.valueOf(47.51), "CHF"), money.with(PresentValue.of(RateAndPeriods.of(0.07, 11))).with(rounding));
46+
assertEquals(fact.setNumber(95.24).create(), money.with(PresentValue.of(RateAndPeriods.of(0.05, 1))).with(rounding));
47+
assertEquals(fact.setNumber(90.70).create(), money.with(PresentValue.of(RateAndPeriods.of(0.05, 2))).with(rounding));
48+
assertEquals(fact.setNumber(47.51).create(), money.with(PresentValue.of(RateAndPeriods.of(0.07, 11))).with(rounding));
4949

50-
assertEquals(Money.of(BigDecimal.valueOf(100.00), "CHF"), money.with(PresentValue.of(RateAndPeriods.of(0.05, 0))).with(rounding));
51-
assertEquals(Money.of(BigDecimal.valueOf(100.00), "CHF"), money.with(PresentValue.of(RateAndPeriods.of(-0.05, 0))).with(rounding));
50+
assertEquals(fact.setNumber(100.00).create(), money.with(PresentValue.of(RateAndPeriods.of(0.05, 0))).with(rounding));
51+
assertEquals(fact.setNumber(100.00).create(), money.with(PresentValue.of(RateAndPeriods.of(-0.05, 0))).with(rounding));
5252

53-
assertEquals(Money.of(BigDecimal.valueOf(105.26), "CHF"), money.with(PresentValue.of(RateAndPeriods.of(-0.05, 1))).with(rounding));
54-
assertEquals(Money.of(BigDecimal.valueOf(110.80), "CHF"), money.with(PresentValue.of(RateAndPeriods.of(-0.05, 2))).with(rounding));
55-
assertEquals(Money.of(BigDecimal.valueOf(222.17), "CHF"), money.with(PresentValue.of(RateAndPeriods.of(-0.07, 11))).with(rounding));
53+
assertEquals(fact.setNumber(105.26).create(), money.with(PresentValue.of(RateAndPeriods.of(-0.05, 1))).with(rounding));
54+
assertEquals(fact.setNumber(110.80).create(), money.with(PresentValue.of(RateAndPeriods.of(-0.05, 2))).with(rounding));
55+
assertEquals(fact.setNumber(222.17).create(), money.with(PresentValue.of(RateAndPeriods.of(-0.07, 11))).with(rounding));
5656
}
5757

5858
/**
@@ -62,12 +62,13 @@ public void testOfAndApply() throws Exception {
6262
*/
6363
@Test
6464
public void testCalculate() throws Exception {
65-
Money money = Money.of(100, "CHF");
65+
MonetaryAmountFactory fact = Monetary.getDefaultAmountFactory();
66+
MonetaryAmount money = fact.setNumber(100).setCurrency("CHF").create();
6667
MonetaryOperator rounding = Monetary.getRounding(RoundingQueryBuilder.of().setScale(2).set(RoundingMode.HALF_EVEN)
6768
.build());
68-
assertEquals(Money.of(BigDecimal.valueOf(95.24), "CHF"), PresentValue.calculate(money, RateAndPeriods.of(0.05, 1)).with(rounding));
69-
assertEquals(Money.of(BigDecimal.valueOf(90.70), "CHF"), PresentValue.calculate(money, RateAndPeriods.of(0.05, 2)).with(rounding));
70-
assertEquals(Money.of(BigDecimal.valueOf(47.51), "CHF"), PresentValue.calculate(money, RateAndPeriods.of(0.07, 11)).with(rounding));
69+
assertEquals(fact.setNumber(95.24).create(), PresentValue.calculate(money, RateAndPeriods.of(0.05, 1)).with(rounding));
70+
assertEquals(fact.setNumber(90.70).create(), PresentValue.calculate(money, RateAndPeriods.of(0.05, 2)).with(rounding));
71+
assertEquals(fact.setNumber(47.51).create(), PresentValue.calculate(money, RateAndPeriods.of(0.07, 11)).with(rounding));
7172
}
7273

7374
/**

Diff for: calc/src/test/java/org/javamoney/calc/securities/CapitalGainsYieldTest.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
import org.javamoney.moneta.Money;
2222
import org.junit.Test;
2323

24+
import javax.money.MonetaryAmount;
25+
2426
import static org.junit.Assert.assertEquals;
2527

2628
/**
@@ -30,8 +32,8 @@
3032
*/
3133
public class CapitalGainsYieldTest {
3234

33-
private static final Money INITIAL_STOCK_PRICE = Money.of(123, "GBP");
34-
private static final Money STOCK_PRICE_AFTER_FIRST_PERIOD = Money.of(223, "GBP");
35+
private static final MonetaryAmount INITIAL_STOCK_PRICE = Money.of(123, "GBP");
36+
private static final MonetaryAmount STOCK_PRICE_AFTER_FIRST_PERIOD = Money.of(223, "GBP");
3537

3638
/**
3739
* Test calculate.

Diff for: exchange/exchange-rate-frb/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<artifactId>javamoney-exchange</artifactId>
2525
<version>1.0</version>
2626
</parent>
27-
<artifactId>javamoney-exchange-rate-frb</artifactId>
27+
<artifactId>javamoney-exchange-frb</artifactId>
2828
<packaging>jar</packaging>
2929

3030
<name>JavaMoney Exchange Federal Reserve Bank Rate Provider</name>

Diff for: exchange/exchange-rate-yahoo/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<artifactId>javamoney-exchange</artifactId>
2525
<version>1.0</version>
2626
</parent>
27-
<artifactId>javamoney-exchange-rate-yahoo</artifactId>
27+
<artifactId>javamoney-exchange-yahoo</artifactId>
2828
<packaging>jar</packaging>
2929

3030
<name>JavaMoney Exchange Yahoo Rate Provider</name>

Diff for: javamoney-cdi/pom.xml

+9
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@
2525
<version>1</version>
2626
<scope>provided</scope>
2727
</dependency>
28+
<dependency>
29+
<groupId>javax.money</groupId>
30+
<artifactId>money-api</artifactId>
31+
</dependency>
32+
<dependency>
33+
<groupId>org.javamoney.moneta</groupId>
34+
<artifactId>moneta-core</artifactId>
35+
<scope>test</scope>
36+
</dependency>
2837
</dependencies>
2938

3039
</project>

0 commit comments

Comments
 (0)