From 31d3d85e4c031c57fba81ea0cf8b298f2be32cbd Mon Sep 17 00:00:00 2001 From: Neo Pimentel Date: Fri, 3 Jun 2016 11:15:50 -0600 Subject: [PATCH] Extracted version to a file. --- pom.xml | 19 +++++++++++++++---- .../com/smartystreets/api/GoogleSender.java | 2 +- .../java/com/smartystreets/api/Sender.java | 1 - .../java/com/smartystreets/api/Version.java | 5 +++++ 4 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 src/main/java/com/smartystreets/api/Version.java diff --git a/pom.xml b/pom.xml index 9c28ead..7326927 100644 --- a/pom.xml +++ b/pom.xml @@ -6,11 +6,11 @@ com.smartystreets.api smartystreets-java-sdk - 1.0.0 + 0.0.0 jar SmartyStreets Java SDK - A library for Java developers to use to help them easily access the SmartyStreets APIs. + A library to help Java developers easily access the SmartyStreets APIs. https://github.com/smartystreets/smartystreets-java-sdk @@ -40,10 +40,10 @@ ossrh https://oss.sonatype.org/content/repositories/snapshots - + @@ -116,6 +116,17 @@ + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.3 + true + + ossrh + https://oss.sonatype.org/ + true + + diff --git a/src/main/java/com/smartystreets/api/GoogleSender.java b/src/main/java/com/smartystreets/api/GoogleSender.java index ca44a3c..77ca4ed 100644 --- a/src/main/java/com/smartystreets/api/GoogleSender.java +++ b/src/main/java/com/smartystreets/api/GoogleSender.java @@ -59,7 +59,7 @@ private void copyHeaders(Request request, HttpRequest httpRequest) { for (String headerName : headers.keySet()) httpHeaders.set(headerName, headers.get(headerName)); - httpHeaders.setUserAgent("smartystreets sdk:java@" + VERSION); + httpHeaders.setUserAgent("smartystreets sdk:java@" + Version.CURRENT); } private Response buildResponse(HttpResponse httpResponse) throws IOException { diff --git a/src/main/java/com/smartystreets/api/Sender.java b/src/main/java/com/smartystreets/api/Sender.java index ec9ffab..0fb2609 100644 --- a/src/main/java/com/smartystreets/api/Sender.java +++ b/src/main/java/com/smartystreets/api/Sender.java @@ -5,6 +5,5 @@ import java.io.IOException; public interface Sender { - String VERSION = "alpha"; Response send(Request request) throws SmartyException, IOException; } diff --git a/src/main/java/com/smartystreets/api/Version.java b/src/main/java/com/smartystreets/api/Version.java new file mode 100644 index 0000000..238fd5e --- /dev/null +++ b/src/main/java/com/smartystreets/api/Version.java @@ -0,0 +1,5 @@ +package com.smartystreets.api; + +public class Version { + static final String CURRENT = "0.0.0"; +}