diff --git a/digital-currency/bitcoin/pom.xml b/digital-currency/bitcoin/pom.xml index 6c4d888..f94cb2a 100644 --- a/digital-currency/bitcoin/pom.xml +++ b/digital-currency/bitcoin/pom.xml @@ -4,7 +4,7 @@ org.javamoney.shelter javamoney-digital-currency - 0.4-SNAPSHOT + 0.4 javamoney-bitcoin JavaMoney Bitcoin @@ -62,7 +62,6 @@ org.apache.maven.plugins maven-surefire-plugin - 2.12.4 **/*Spec.java @@ -71,6 +70,42 @@ + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + + org.codehaus.gmaven + + + gmaven-plugin + + + [1.4,) + + + compile + testCompile + + + + + + + + + + + + diff --git a/digital-currency/bitcoin/src/main/java/org/javamoney/shelter/bitcoin/provider/BitcoinCurrencyProvider.java b/digital-currency/bitcoin/src/main/java/org/javamoney/shelter/bitcoin/provider/BitcoinCurrencyProvider.java index f3c7795..5f06efe 100644 --- a/digital-currency/bitcoin/src/main/java/org/javamoney/shelter/bitcoin/provider/BitcoinCurrencyProvider.java +++ b/digital-currency/bitcoin/src/main/java/org/javamoney/shelter/bitcoin/provider/BitcoinCurrencyProvider.java @@ -1,26 +1,36 @@ +/* + * Copyright (c) 2013, 205, Werner Keil and others by the @author tag. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.javamoney.shelter.bitcoin.provider; import javax.money.CurrencyContext; import javax.money.CurrencyContextBuilder; import javax.money.CurrencyQuery; import javax.money.CurrencyUnit; -import javax.money.MonetaryAmountFactoryQuery; -import javax.money.MonetaryAmountFactoryQueryBuilder; -import javax.money.MonetaryContext; import javax.money.spi.CurrencyProviderSpi; import java.util.Collections; -import java.util.Currency; import java.util.HashSet; import java.util.Set; import org.javamoney.moneta.CurrencyUnitBuilder; -import org.javamoney.moneta.Money; /** * A clueless attempt at a BitcoinCurrencyProvider based on (out of date?) code * in the Moneta User's Guide. * * @author Sean Gilligan + * @author Werner Keil */ public final class BitcoinCurrencyProvider implements CurrencyProviderSpi { @@ -61,4 +71,9 @@ public Set getCurrencies(CurrencyQuery query){ return Collections.emptySet(); } + @Override + public boolean isCurrencyAvailable(CurrencyQuery query) { + return !getCurrencies(query).isEmpty(); + } + } \ No newline at end of file diff --git a/digital-currency/pom.xml b/digital-currency/pom.xml index b5f3d15..7263053 100644 --- a/digital-currency/pom.xml +++ b/digital-currency/pom.xml @@ -4,7 +4,7 @@ org.javamoney.shelter javamoney-shelter - 0.4-SNAPSHOT + 0.4 javamoney-digital-currency pom diff --git a/groovylang-support/javamoney-spock/gradlew.bat b/groovylang-support/javamoney-spock/gradlew.bat index aec9973..8a0b282 100644 --- a/groovylang-support/javamoney-spock/gradlew.bat +++ b/groovylang-support/javamoney-spock/gradlew.bat @@ -1,90 +1,90 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/pom.xml b/pom.xml index f940ecb..28f2306 100644 --- a/pom.xml +++ b/pom.xml @@ -3,14 +3,14 @@ 4.0.0 org.javamoney.shelter javamoney-shelter - 0.4-SNAPSHOT + 0.4 pom JavaMoney Shelter A shelter for new ideas and modules to be adopted, e.g. via Adopt-a-JSR org.javamoney javamoney-parent - 1.0-RC1 + 1.0-RC2 http://javamoney.github.io/shelter.html 2013 @@ -21,8 +21,8 @@ 4.8.2 1.6.1 - 1.0-RC1 - 0.6-SNAPSHOT + 1.0-RC2 +