Skip to content

Commit 4ca4b93

Browse files
committed
14: Deploy lib to maven repository
Task-Url: http://github.com/JavaMoney/javamoney-lib/issues/issue/14
1 parent 5c9fc18 commit 4ca4b93

File tree

4 files changed

+47
-14
lines changed

4 files changed

+47
-14
lines changed

calc/src/test/java/org/javamoney/calc/UltraFastMoneyPerformanceTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
//import javax.money.CurrencyUnit;
2424
//import javax.money.MonetaryAmount;
2525
//import javax.money.MonetaryCurrencies;
26-
//import javax.money.MonetaryRoundings;
26+
//import javax.money.Monetary;
2727
//
2828
//import org.javamoney.calc.UltraFastMoney;
2929
//import org.junit.Test;
@@ -71,7 +71,7 @@
7171
// b.append("money1 = money1.subtract(UltraFastMoney.of(EURO, 232323));\n");
7272
// b.append("money1 = money1.multiply(3.4);\n");
7373
// b.append("money1 = money1.divide(5.456);\n");
74-
// b.append("money1 = money1.with(MonetaryRoundings.getRounding());\n");
74+
// b.append("money1 = money1.with(Monetary.getRounding());\n");
7575
// System.out.println(b);
7676
// b.setLength(0);
7777
// MonetaryAmount adding = UltraFastMoney.of(EURO, 1234567.3444);
@@ -83,7 +83,7 @@
8383
// moneyuf = moneyuf.subtract(subtracting);
8484
// moneyuf = moneyuf.multiply(3.4);
8585
// moneyuf = moneyuf.divide(5.456);
86-
// moneyuf = moneyuf.with(MonetaryRoundings.getRounding());
86+
// moneyuf = moneyuf.with(Monetary.getRounding());
8787
// }
8888
// long end = System.currentTimeMillis();
8989
// long duration = end - start;

calc/src/test/java/org/javamoney/calc/common/FutureValueTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2012, 2014, Credit Suisse (Anatole Tresch), Werner Keil.
2+
* Copyright (c) 2012, 2015, Credit Suisse (Anatole Tresch), Werner Keil.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
55
* use this file except in compliance with the License. You may obtain a copy of
@@ -19,7 +19,7 @@
1919
import org.junit.Test;
2020

2121
import javax.money.MonetaryOperator;
22-
import javax.money.MonetaryRoundings;
22+
import javax.money.Monetary;
2323
import javax.money.RoundingQueryBuilder;
2424
import java.math.BigDecimal;
2525
import java.math.RoundingMode;
@@ -37,7 +37,7 @@ public class FutureValueTest {
3737
@Test
3838
public void testOfAndApply() throws Exception {
3939
Money money = Money.of(100, "CHF");
40-
MonetaryOperator rounding = MonetaryRoundings.getRounding(RoundingQueryBuilder.of().setScale(2).set(RoundingMode.HALF_EVEN)
40+
MonetaryOperator rounding = Monetary.getRounding(RoundingQueryBuilder.of().setScale(2).set(RoundingMode.HALF_EVEN)
4141
.build());
4242
assertEquals(Money.of(BigDecimal.valueOf(105.00), "CHF"), money.with(FutureValue.of(Rate.of(0.05), 1)).with(rounding));
4343
assertEquals(Money.of(BigDecimal.valueOf(110.25), "CHF"), money.with(FutureValue.of(Rate.of(0.05), 2)).with(rounding));
@@ -50,7 +50,7 @@ public void testOfAndApply() throws Exception {
5050
@Test
5151
public void testCalculate() throws Exception {
5252
Money money = Money.of(100, "CHF");
53-
MonetaryOperator rounding = MonetaryRoundings.getRounding(RoundingQueryBuilder.of().setScale(2).set(RoundingMode.HALF_EVEN)
53+
MonetaryOperator rounding = Monetary.getRounding(RoundingQueryBuilder.of().setScale(2).set(RoundingMode.HALF_EVEN)
5454
.build());
5555
assertEquals(Money.of(BigDecimal.valueOf(105.00), "CHF"), FutureValue.calculate(money, Rate.of(0.05), 1).with(rounding));
5656
assertEquals(Money.of(BigDecimal.valueOf(110.25), "CHF"), FutureValue.calculate(money, Rate.of(0.05), 2).with(rounding));
@@ -70,7 +70,7 @@ public void testToString() throws Exception {
7070
@Test
7171
public void testFormula() {
7272
Money money = Money.of(100, "CHF");
73-
MonetaryOperator rounding = MonetaryRoundings.getRounding(RoundingQueryBuilder.of().setScale(2).set(RoundingMode.HALF_EVEN)
73+
MonetaryOperator rounding = Monetary.getRounding(RoundingQueryBuilder.of().setScale(2).set(RoundingMode.HALF_EVEN)
7474
.build());
7575
assertEquals(Money.of(BigDecimal.valueOf(105.00), "CHF"), FutureValue.calculate(money, Rate.of(0.05), 1).with(rounding));
7676
assertEquals(Money.of(BigDecimal.valueOf(110.25), "CHF"), FutureValue.calculate(money, Rate.of(0.05), 2).with(rounding));

calc/src/test/java/org/javamoney/calc/common/PresentValueTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2012, 2014, Credit Suisse (Anatole Tresch), Werner Keil. Licensed under the Apache
2+
* Copyright (c) 2012, 2015, Credit Suisse (Anatole Tresch), Werner Keil. Licensed under the Apache
33
* License, Version 2.0 (the "License"); you may not use this file except in compliance with the
44
* License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
55
* Unless required by applicable law or agreed to in writing, software distributed under the License
@@ -29,7 +29,7 @@ public class PresentValueTest{
2929
@Test
3030
public void testOfAndApply() throws Exception {
3131
Money money = Money.of(100, "CHF");
32-
MonetaryOperator rounding = MonetaryRoundings.getRounding(RoundingQueryBuilder.of().setScale(2).set(RoundingMode.HALF_EVEN)
32+
MonetaryOperator rounding = Monetary.getRounding(RoundingQueryBuilder.of().setScale(2).set(RoundingMode.HALF_EVEN)
3333
.build());
3434
assertEquals(Money.of(BigDecimal.valueOf(95.24), "CHF"), money.with(PresentValue.of(Rate.of(0.05), 1)).with(rounding));
3535
assertEquals(Money.of(BigDecimal.valueOf(90.70), "CHF"), money.with(PresentValue.of(Rate.of(0.05), 2)).with(rounding));
@@ -42,7 +42,7 @@ public void testOfAndApply() throws Exception {
4242
@Test
4343
public void testCalculate() throws Exception {
4444
Money money = Money.of(100, "CHF");
45-
MonetaryOperator rounding = MonetaryRoundings.getRounding(RoundingQueryBuilder.of().setScale(2).set(RoundingMode.HALF_EVEN)
45+
MonetaryOperator rounding = Monetary.getRounding(RoundingQueryBuilder.of().setScale(2).set(RoundingMode.HALF_EVEN)
4646
.build());
4747
assertEquals(Money.of(BigDecimal.valueOf(95.24), "CHF"), PresentValue.calculate(money, Rate.of(0.05), 1).with(rounding));
4848
assertEquals(Money.of(BigDecimal.valueOf(90.70), "CHF"), PresentValue.calculate(money, Rate.of(0.05), 2).with(rounding));

pom.xml

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@
3939
<snapshots>
4040
<enabled>false</enabled>
4141
</snapshots>
42-
<id>central</id>
43-
<name>libs-release</name>
42+
<id>release</id>
43+
<name>jfrog-libs-release</name>
4444
<url>http://oss.jfrog.org/artifactory/libs-release</url>
4545
</repository>
4646
<repository>
4747
<snapshots />
4848
<id>snapshots</id>
49-
<name>libs-snapshot</name>
49+
<name>jfrog-libs-snapshot</name>
5050
<url>http://oss.jfrog.org/artifactory/libs-snapshot</url>
5151
</repository>
5252
</repositories>
@@ -66,6 +66,39 @@
6666
</executions>
6767
</plugin>
6868
</plugins>
69+
<pluginManagement>
70+
<plugins>
71+
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
72+
<plugin>
73+
<groupId>org.eclipse.m2e</groupId>
74+
<artifactId>lifecycle-mapping</artifactId>
75+
<version>1.0.0</version>
76+
<configuration>
77+
<lifecycleMappingMetadata>
78+
<pluginExecutions>
79+
<pluginExecution>
80+
<pluginExecutionFilter>
81+
<groupId>org.jacoco</groupId>
82+
<artifactId>
83+
jacoco-maven-plugin
84+
</artifactId>
85+
<versionRange>
86+
[0.7.2.201409121644,)
87+
</versionRange>
88+
<goals>
89+
<goal>prepare-agent</goal>
90+
</goals>
91+
</pluginExecutionFilter>
92+
<action>
93+
<ignore></ignore>
94+
</action>
95+
</pluginExecution>
96+
</pluginExecutions>
97+
</lifecycleMappingMetadata>
98+
</configuration>
99+
</plugin>
100+
</plugins>
101+
</pluginManagement>
69102
</build>
70103
<dependencyManagement>
71104
<dependencies>

0 commit comments

Comments
 (0)