diff --git a/build.md b/build.md new file mode 100644 index 0000000..5228fb5 --- /dev/null +++ b/build.md @@ -0,0 +1,36 @@ +# FF-UnitXC Building + +## Requirements + +* java sdk 1.8 or higher. +* maven 3 or higher. +* Commands are runned in project root folder. + +## Tests + +### Run tests normal +mvn clean test + +### Run tests with jacoco +mvn -Ptest-jacoco clean test + +## Create build artifacts +mvn -Pbuild clean package + +## Change pom.xml versions +mvn versions:set -DnewVersion=2.3.4-SNAPSHOT + +## Make release build +mvn -Pbuild -Dusername=(scm_username) clean install release:clean release:prepare release:perform + +## Make site +mvn -Ptest-jacoco clean install +mvn -Pbuild-site site:site + +Optional add -DstagingDirectory=/tmp/fullsite +And then manual upload. + +## Check for dependency-updates +mvn versions:display-plugin-updates|grep ">"|uniq +mvn versions:display-dependency-updates|grep ">"|uniq + diff --git a/ff-unitxc-converter/pom.xml b/ff-unitxc-converter/pom.xml new file mode 100644 index 0000000..5680472 --- /dev/null +++ b/ff-unitxc-converter/pom.xml @@ -0,0 +1,9 @@ + + 4.0.0 + + net.forwardfire.unitxc + ff-unitxc + 0.0.1-SNAPSHOT + + ff-unitxc-converter + \ No newline at end of file diff --git a/ff-unitxc-converter/src/main/java/net/forwardfire/unitxc/converter/UnitXConverter.java b/ff-unitxc-converter/src/main/java/net/forwardfire/unitxc/converter/UnitXConverter.java new file mode 100644 index 0000000..e86d05e --- /dev/null +++ b/ff-unitxc-converter/src/main/java/net/forwardfire/unitxc/converter/UnitXConverter.java @@ -0,0 +1,8 @@ +package net.forwardfire.unitxc.converter; + +public interface UnitXConverter { + + double convert(double value,String fromTypeId,String toTypeId); + + double convert(double value/*,UnitXType fromType,UnitXType toType*/); +} diff --git a/ff-unitxc-converter/src/main/java/net/forwardfire/unitxc/converter/package-info.java b/ff-unitxc-converter/src/main/java/net/forwardfire/unitxc/converter/package-info.java new file mode 100644 index 0000000..78ad825 --- /dev/null +++ b/ff-unitxc-converter/src/main/java/net/forwardfire/unitxc/converter/package-info.java @@ -0,0 +1,8 @@ +/** + * + */ +/** + * @author willemc + * + */ +package net.forwardfire.unitxc.converter; \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..3e1003c --- /dev/null +++ b/pom.xml @@ -0,0 +1,390 @@ + + 4.0.0 + net.forwardfire.unitxc + ff-unitxc + 0.0.1-SNAPSHOT + pom + FFUnitXC + Unit Xross Converter + 2015 + + ForwardFire.net + http://www.forwardfire.net/ + + + + BSD License + license.txt + repo + BSD 2-Clause License + + + + 3.0.1 + + + ff-unitxc-converter + + + UTF-8 + 1.8 + + + 0.7.4.201502262128 + 2.10.3 + 2.8 + + + + + org.slf4j + slf4j-api + 1.7.12 + + + org.apache.commons + commons-lang3 + 3.4 + + + junit + junit + 4.12 + + + ch.qos.logback + logback-classic + 1.1.3 + + + org.codehaus.sonar-plugins.java + sonar-jacoco-listeners + 3.2 + + + + + + junit + junit + test + + + ch.qos.logback + logback-classic + test + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + 1.8 + + + maven-compiler-plugin + 3.0 + + ${project.build.sourceEncoding} + ${project.build.sourceVersion} + ${project.build.sourceVersion} + + + + maven-source-plugin + 2.2.1 + + + org.apache.maven.plugins + maven-site-plugin + 3.4 + + + org.apache.maven.doxia + doxia-module-markdown + 1.6 + + + + + org.apache.maven.plugins + maven-javadoc-plugin + ${maven-javadoc-plugin.version} + + + org.jacoco + jacoco-maven-plugin + ${jacoco-maven-plugin.version} + + + + + + + test-none + + true + + + + test-jacoco + + + + maven-surefire-plugin + + + + listener + org.sonar.java.jacoco.JUnitListener + + + + + + org.jacoco + jacoco-maven-plugin + + + jacoco-prepare-agent + initialize + true + + prepare-agent + + + + + + + + + org.codehaus.sonar-plugins.java + sonar-jacoco-listeners + test + + + + + build + + + + maven-source-plugin + + + attach-sources + + jar + + + + + + + + + build-site + + + + org.apache.maven.plugins + maven-site-plugin + + + org.apache.maven.plugins + maven-project-info-reports-plugin + ${maven-project-info-reports-plugin} + + + org.apache.maven.shared + maven-shared-jar + 1.1 + + + org.apache.bcel + bcel + + + + + com.google.code.findbugs + bcel-findbugs + 6.0 + + + + + org.apache.maven.plugins + maven-antrun-plugin + + + copy-project-markdown + generate-sources + false + + run + + + + Copy project markdown to site. + + + + + + + + + + + + + + org.apache.maven.plugins + maven-project-info-reports-plugin + ${maven-project-info-reports-plugin} + + true + false + false + + + + + + dependencies + dependency-convergence + dependency-info + dependency-management + + + + issue-tracking + license + + + plugin-management + plugins + + scm + summary + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + ${maven-javadoc-plugin.version} + + true + true + true + 512m + true + true + + + + + aggregate + + + + + + org.apache.maven.plugins + maven-pmd-plugin + 3.4 + + true + true + ${project.build.sourceEncoding} + 100 + ${project.build.javaVersion} + + + + org.codehaus.mojo + findbugs-maven-plugin + 3.0.0 + + true + true + true + true + + + + org.apache.maven.plugins + maven-checkstyle-plugin + 2.15 + + true + true + src/config/checkstyle.xml + + + + org.codehaus.mojo + taglist-maven-plugin + 2.4 + + true + + @todo + @TODO + @deprecated + @help + @HELP + help + HELP + todo + TODO + fixme + FIXME + later + LATER + error + ERROR + temp + TEMP + mmm + MMM + ??? + + + + + org.apache.maven.plugins + maven-surefire-report-plugin + 2.18.1 + + true + + + + + report-only + + + + + + org.jacoco + jacoco-maven-plugin + ${jacoco-maven-plugin.version} + + true + report + + + + + + + diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..f4d4334 --- /dev/null +++ b/readme.md @@ -0,0 +1,44 @@ +FF-UnitXC +========= + +FF-UnitXC is a java8 library providing a cross unit converter. + +## Features + +* Many units provided. +* Unit groups. +* Unit tags. +* Full metric system. +* Imperial values. + +## Installation + + Add maven deps; + + + net.forwardfire.unitxc + ff-unitxc-converter + 0.0.1-SNAPSHOT + compile + + +## Files in this package + +* build.md - Developer build commands. +* license.txt - The license of ff-unitxc. +* pom.xml - Maven specific build file. +* readme.md - This file. +* todo.md - Small todo list. +* src - Site source. + +## Contributing + +In lieu of a formal styleguide, take care to maintain the existing coding style. +Add unit tests for any new or changed functionality. Style and test your code. + +## Release History + +### Version 0.0.1 +* First public release + + diff --git a/todo.md b/todo.md index 7cf8843..a2e22c6 100644 --- a/todo.md +++ b/todo.md @@ -1,4 +1,4 @@ -# FF-Unit-Converter TODO +# FF-UnitXC TODO ## Current ERRATA