Skip to content

Commit ca526cf

Browse files
lpatino10germanattanasio
authored andcommitted
Automatic jar upload. Fixes #831 (#832)
* Add JDNI test library as gradle dependency * Add GitHub releases deployment for Travis * Address review comments * Fix variable syntax
1 parent 57aa9b6 commit ca526cf

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

.bumpversion.cfg

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
[bumpversion]
22
current_version = 4.1.0
3-
commit = True
4-
tag = True
53

64
[bumpversion:file:README.md]
75

@@ -34,4 +32,3 @@ tag = True
3432
[bumpversion:file:visual-recognition/README.md]
3533
search = {current_version}
3634
replace = {new_version}
37-

.travis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,13 @@ deploy:
5656
repo: watson-developer-cloud/java-sdk
5757
jdk: oraclejdk7
5858

59+
- provider: releases
60+
api_key: ${GITHUB_TOKEN_RELEASES}
61+
file: java-sdk/build/libs/jar-with-dependencies-${TRAVIS_BRANCH}.jar
62+
skip_cleanup: true
63+
on:
64+
repo: watson-developer-cloud/java-sdk
65+
jdk: oraclejdk7
66+
tags: true
5967
notifications:
6068
email: true

core/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ dependencies {
7575
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.0'
7676
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.5'
7777
compile group: 'org.glassfish.jersey.bundles.repackaged', name: 'jersey-jsr166e', version: '2.25.1'
78+
testCompile group: 'simple-jndi', name: 'simple-jndi', version: '0.11.4.1'
7879

7980
signature 'org.codehaus.mojo.signature:java17:1.0@signature'
8081

core/src/test/java/com/ibm/watson/developer_cloud/util/CredentialUtilsTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import static org.junit.Assert.assertEquals;
1616
import static org.junit.Assert.assertNull;
1717
import static org.junit.Assert.assertTrue;
18-
import static org.junit.Assume.assumeTrue;
1918

2019
import java.io.InputStream;
2120
import java.util.Hashtable;
@@ -131,7 +130,6 @@ public void testGetUserCredentialsWithPlan() {
131130
*/
132131
@Test
133132
public void testGetAPIUrlFromJDNI() {
134-
assumeTrue(!System.getenv().containsKey("TRAVIS"));
135133
assertEquals(CredentialUtils.getAPIUrlTest(SERVICE_NAME), PERSONALITY_INSIGHTS_URL);
136134
}
137135
}

0 commit comments

Comments
 (0)