diff --git a/.github/ISSUE_TEMPLATE/reporte-de-error.md b/.github/ISSUE_TEMPLATE/reporte-de-error.md new file mode 100644 index 0000000..78b5f58 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/reporte-de-error.md @@ -0,0 +1,39 @@ +--- +name: Reporte de Error +about: Crea un reporte para ayudarnos a mejorar +title: '' +labels: bug +assignees: '' + +--- + +**Describe el bug** + +Una descripción concisa sobre el bug. + +**Para reproducir** + +1. Configura '...' +2. Crea un objeto '...' +3. Ejecuta el método '...' +4. Se ve el error en '...' + +**Comportamiento observado** + +Describe de forma concisa lo que observaste siguiendo los pasos para reproducir el error. + +**Comportamiento esperado** + +Una explicación concisa y clara de qué es lo que esperas que ocurra. + +**Capturas de pantalla** + +Si aplica, agrega aquí capturas de pantalla que ayuden a explicar tu problema. + +**Versiones (por favor agrega aquí la siguiente información):** +- SDK: [e.g. 1.1.0] +- JDK: [e.g. 8u211] + +**Contexto adicional** + +Agrega cualquier otro información sobre el problema aquí. diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..d990cba --- /dev/null +++ b/.travis.yml @@ -0,0 +1,23 @@ +language: java +dist: trusty +jdk: oraclejdk8 +sudo: required +addons: + sonarcloud: + organization: "transbankdevelopers" + token: + secure:"Nui1spHqyeYsW7YfB3uhtYK6NQU4EzpaDqlLIzM3xlx+TvAXg+dCGDhE0LRyLtH+Vvbqw7plntWAhDquQIPwKM/0P1WrXLw9l+Wd6olD1FlpXFXnr3+JboAVatoDI8se1qziEKKYlvk6i5TYYn1ajbbl461gcDDLJfjniOCQnAFh1WwbgH0fBJkiYo9LRKflksn5JtevvtTCsHmqozJfM2fIWSWwR/h3HmIxaTUYBdiBPntH3qWHgK5q1W9uR/ZHZTbjFrhGDk3CeDAuX/dAQMvsEDfMh4DOCDb+QP1X3n07qJkY0gRMkKtfUORBygssE/BgDvaqSQkwztjy2j3JBYrgEZDZW60tx7Mr004GX5c3egd6fkH06/CX858adtWjckrvXbjuMPZVSRxVVKceZ3OAW0wUYU5e86xbjOczz6cWMpB/+wYP3nlxmi0rdqY5E0BMcG5NY3r8jdDaHzoazz29lC9lSINcGld72lC4UJK9AI7in7FfCZPXrL7Ci3cBahLwkk+wZ3axyUh7F+AoJF1poTp0iCoJNuXDXf6LSMTIW2AZLaq2kw0qnVDDKIiCUtt2EHLVMQCYKEVqXcIHfE4nWGd3Q40J6htBkIJIN4TYtLYuAxGgoFBMXFXCca+RYkdOZ3nhsdW1qpz021KnLITJotC11fMdvHbdgRUVcfs=" +install: mvn --settings .travis/settings.xml clean compile +before_install: + - if [ ! -z "$GPG_SECRET_KEYS" ]; then echo $GPG_SECRET_KEYS | base64 --decode | $GPG_EXECUTABLE --import; fi + - if [ ! -z "$GPG_OWNERTRUST" ]; then echo $GPG_OWNERTRUST | base64 --decode | $GPG_EXECUTABLE --import-ownertrust; fi +script: + - mvn --settings .travis/settings.xml clean org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_LOGIN +deploy: + - + provider: script + script: bash .travis/deploy.sh + skip_cleanup: true + on: + all_branches: true + jdk: oraclejdk8 diff --git a/.travis/deploy.sh b/.travis/deploy.sh new file mode 100644 index 0000000..fb3c938 --- /dev/null +++ b/.travis/deploy.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +if [ ! -z "$TRAVIS_TAG" ] +then + echo "Tag found" + if ( echo $TRAVIS_TAG | egrep -i '^v[0-9]+\.[0-9]+\.[0-9]+') + then + VERSION_NUMBER=${TRAVIS_TAG:1} + echo "on a tag -> set pom.xml to $VERSION_NUMBER" + mvn --settings .travis/settings.xml org.codehaus.mojo:versions-maven-plugin:2.1:set -DnewVersion=$VERSION_NUMBER 1>/dev/null 2>/dev/null + else + echo "Tag does not start with v: ${TRAVIS_TAG} keep snapshot version in pom.xml" + fi + mvn clean deploy --settings .travis/settings.xml -B -U +else + echo "not on a tag no deploy trigered" +fi diff --git a/.travis/settings.xml b/.travis/settings.xml new file mode 100644 index 0000000..1a11498 --- /dev/null +++ b/.travis/settings.xml @@ -0,0 +1,25 @@ + + + + + ossrh + ${env.SONATYPE_USERNAME} + ${env.SONATYPE_PASSWORD} + + + + + ossrh + + true + + + ${env.GPG_EXECUTABLE} + ${env.GPG_PASSPHRASE} + + + + diff --git a/CHANGELOG.md b/CHANGELOG.md index e69de29..7e7c0fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -0,0 +1,9 @@ +# Changelog +Todos los cambios notables a este proyecto serán documentados en este archivo. + +El formato está basado en [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +y este proyecto adhiere a [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +## [1.0.0] - 2020-17-03 +### Added +- Release inicial. \ No newline at end of file diff --git a/pom.xml b/pom.xml index 6c93740..2141429 100644 --- a/pom.xml +++ b/pom.xml @@ -1,4 +1,22 @@ + @@ -7,6 +25,66 @@ com.github.transbankdevelopers transbank-sdk-pos-java 1.0.2-SNAPSHOT + Transbank POS Java SDK + + 2020 + + Transbank SDK to connect to Verifone VX520 and VX520c POS + + + http://www.transbankdevelopers.cl/ + + + git + https://github.com/TransbankDevelopers/transbank-pos-sdk-java/issues + + + + scm:git:https://github.com/TransbankDevelopers/transbank-pos-sdk-java.git + scm:git:https://github.com/TransbankDevelopers/transbank-pos-sdk-java.git + https://github.com/TransbankDevelopers/transbank-pos-sdk-java.git + v1.0.2-SNAPSHOT + + + + + BSD-3-Clause + https://opensource.org/licenses/BSD-3-Clause + + + + + + Juan Pablo Nuñez Rojas + floydnunez + jp.nunnez@continuum.cl + Continuum SPA + -4 + + Full-stack developer + + + + Alfredo Fiebig Cosmelli + afiebig + alfredo.fiebig@continuum.cl + Continuum SPA + -4 + + Full-stack developer + + + + + jar + + + 1.7 + 1.7 + UTF-8 + UTF-8 + + org.apache.logging.log4j @@ -19,6 +97,7 @@ 2.13.1 + @@ -30,8 +109,87 @@ 8 + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.8 + + + default-deploy + deploy + + deploy + + + + + ossrh + https://oss.sonatype.org/ + true + + + + + org.apache.maven.plugins + maven-source-plugin + 3.0.1 + + + attach-sources + + jar-no-fork + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.4 + + com.transbank.* + + + + attach-javadocs + + jar + + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + + sign-artifacts + verify + + sign + + + ${gpg.keyname} + + + + + + + ossrh + https://oss.sonatype.org/content/repositories/snapshots + + + ossrh + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + \ No newline at end of file diff --git a/src/main/java/cl/transbank/pos/helper/StringUtils.java b/src/main/java/cl/transbank/pos/helper/StringUtils.java index 228d597..d4927ac 100644 --- a/src/main/java/cl/transbank/pos/helper/StringUtils.java +++ b/src/main/java/cl/transbank/pos/helper/StringUtils.java @@ -1,6 +1,5 @@ package cl.transbank.pos.helper; -import cl.transbank.pos.SDKTest; import cl.transbank.pos.exceptions.NotInstantiableException; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/src/main/java/cl/transbank/pos/responses/DetailResponse.java b/src/main/java/cl/transbank/pos/responses/DetailResponse.java index 268e99f..181fe95 100644 --- a/src/main/java/cl/transbank/pos/responses/DetailResponse.java +++ b/src/main/java/cl/transbank/pos/responses/DetailResponse.java @@ -1,6 +1,5 @@ package cl.transbank.pos.responses; -import cl.transbank.pos.SDKTest; import cl.transbank.pos.exceptions.TransbankParseException; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/src/main/java/cl/transbank/pos/responses/KeysResponse.java b/src/main/java/cl/transbank/pos/responses/KeysResponse.java index d7b9d25..d6b712b 100644 --- a/src/main/java/cl/transbank/pos/responses/KeysResponse.java +++ b/src/main/java/cl/transbank/pos/responses/KeysResponse.java @@ -1,6 +1,5 @@ package cl.transbank.pos.responses; -import cl.transbank.pos.SDKTest; import cl.transbank.pos.utils.BaseResponse; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/src/main/java/cl/transbank/pos/responses/SaleResponse.java b/src/main/java/cl/transbank/pos/responses/SaleResponse.java index 1ea4773..67ea74e 100644 --- a/src/main/java/cl/transbank/pos/responses/SaleResponse.java +++ b/src/main/java/cl/transbank/pos/responses/SaleResponse.java @@ -1,6 +1,5 @@ package cl.transbank.pos.responses; -import cl.transbank.pos.SDKTest; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/src/main/java/cl/transbank/pos/responses/TotalsResponse.java b/src/main/java/cl/transbank/pos/responses/TotalsResponse.java index fc11854..55149b0 100644 --- a/src/main/java/cl/transbank/pos/responses/TotalsResponse.java +++ b/src/main/java/cl/transbank/pos/responses/TotalsResponse.java @@ -1,6 +1,5 @@ package cl.transbank.pos.responses; -import cl.transbank.pos.SDKTest; import cl.transbank.pos.utils.TotalsCResponse; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger;