Skip to content

Commit 3b76106

Browse files
authored
Merge pull request #897 from watson-developer-cloud/develop
Release v5.1.0
2 parents 224b80f + 1a0ff70 commit 3b76106

File tree

107 files changed

+20354
-6
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+20354
-6
lines changed

RELEASE.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,28 @@ If you are not familiar with Sonatype and/or the maven release process please re
3939

4040
You will have to answer prompts for versions and tags. That will tag and commit a new version into your repository automatically.
4141

42-
[bumpversion]: https://pypi.python.org/pypi/bumpversion
42+
[bumpversion]: https://pypi.python.org/pypi/bumpversion
43+
44+
### Manually releasing
45+
46+
The above steps should work, but we've run into situations where the archive uploading through CI has failed because IP changes caused multiple staging repositories to be created in Sonatype, each with different pieces of the full set of artifacts. If this happens, the repositories won't be able to be closed and released on the Sonatype website.
47+
48+
Uploading the archives locally with the following command solves this problem:
49+
50+
```bash
51+
./gradlew uploadArchives -Psigning.keyId=<keyId> -Psigning.password=<keyPassword> -Psigning.secretKeyRingFile=<pathToKeyRingFile> -PossrhUsername=<sonatypeUsername> -PossrhPassword=<sonatypePassword>
52+
```
53+
54+
The arguments should be populated with the following:
55+
- `-Psigning.keyId`: The ID of your public key you created after following the link in the prerequisites
56+
- `-Psigning.password`: Your password you created for making public GPG keys
57+
- `-Psigning.secretKeyRingFile`: After creating your public key, you create your keyring file with the following command and use the absolute path to your new file:
58+
59+
```bash
60+
gpg --export-secret-keys -o <outputFilename>.gpg
61+
```
62+
63+
- `-PossrhUsername`: Your Sonatype username
64+
- `-PossrhPassword`: Your Sonatype password
65+
66+
Assuming this command works properly, you should be able to then log into Sonatype and close and release the repository as usual.

assistant/README.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Assistant
2+
3+
## Installation
4+
5+
##### Maven
6+
```xml
7+
<dependency>
8+
<groupId>com.ibm.watson.developer_cloud</groupId>
9+
<artifactId>assistant</artifactId>
10+
<version>5.0.0</version>
11+
</dependency>
12+
```
13+
14+
##### Gradle
15+
```gradle
16+
'com.ibm.watson.developer_cloud:assistant:5.0.0'
17+
```
18+
19+
## Usage
20+
21+
Use the [Assistant][assistant] service to identify intents, entities, and conduct conversations.
22+
23+
```java
24+
Assistant service = new Assistant("2018-02-16");
25+
service.setUsernameAndPassword("<username>", "<password>");
26+
27+
InputData input = new InputData.Builder("Hi").build();
28+
MessageOptions options = new MessageOptions.Builder(workspaceId).input(input).build();
29+
MessageResponse response = service.message(options).execute();
30+
System.out.println(response);
31+
```
32+
33+
Moving from Node 1 to Node 2.
34+
35+
```java
36+
Context context = null;
37+
38+
// first message
39+
MessageOptions newMessageOptions = new MessageOptions.Builder()
40+
.workspaceId("<workspace-id>")
41+
.input(new InputData.Builder("First message").build())
42+
.context(context)
43+
.build();
44+
45+
MessageResponse response = service.message(newMessageOptions).execute();
46+
47+
// second message
48+
newMessageOptions = new MessageOptions.Builder()
49+
.workspaceId("<workspace-id>")
50+
.input(new InputData.Builder("Second message").build())
51+
.context(response.getContext()) // output context from the first message
52+
.build();
53+
54+
response = service.message(newMessageOptions).execute();
55+
56+
System.out.println(response);
57+
```
58+
59+
[assistant]: https://console.bluemix.net/docs/services/assistant/index.html

assistant/build.gradle

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
plugins {
2+
id 'ru.vyarus.animalsniffer' version '1.3.0'
3+
}
4+
5+
defaultTasks 'clean'
6+
7+
apply from: '../utils.gradle'
8+
import org.apache.tools.ant.filters.*
9+
10+
apply plugin: 'java'
11+
apply plugin: 'ru.vyarus.animalsniffer'
12+
apply plugin: 'maven'
13+
apply plugin: 'signing'
14+
apply plugin: 'checkstyle'
15+
apply plugin: 'eclipse'
16+
17+
task javadocJar(type: Jar) {
18+
classifier = 'javadoc'
19+
from javadoc
20+
}
21+
22+
task sourcesJar(type: Jar) {
23+
classifier = 'sources'
24+
from sourceSets.main.allSource
25+
}
26+
27+
repositories {
28+
mavenCentral()
29+
}
30+
31+
artifacts {
32+
archives sourcesJar
33+
archives javadocJar
34+
}
35+
36+
signing {
37+
sign configurations.archives
38+
}
39+
40+
signArchives {
41+
onlyIf { Task task ->
42+
def shouldExec = false
43+
for (myArg in project.gradle.startParameter.taskRequests[0].args) {
44+
if (myArg.toLowerCase().contains('signjars') || myArg.toLowerCase().contains('uploadarchives')) {
45+
shouldExec = true
46+
}
47+
}
48+
return shouldExec
49+
}
50+
}
51+
52+
checkstyle {
53+
configFile = rootProject.file('checkstyle.xml')
54+
ignoreFailures = false
55+
}
56+
57+
dependencies {
58+
compile project(':core')
59+
60+
testCompile project(path: ':core', configuration: 'tests')
61+
signature 'org.codehaus.mojo.signature:java17:1.0@signature'
62+
}
63+
64+
processResources {
65+
filter ReplaceTokens, tokens: [
66+
"pom.version": project.version,
67+
"build.date" : getDate()
68+
]
69+
}
70+
71+
uploadArchives {
72+
repositories {
73+
mavenDeployer {
74+
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
75+
76+
repository(url: "http://oss.sonatype.org/service/local/staging/deploy/maven2/") {
77+
authentication(userName: System.env.CI_DEPLOY_USERNAME, password: System.env.CI_DEPLOY_PASSWORD)
78+
}
79+
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/"){
80+
authentication(userName: System.env.CI_DEPLOY_USERNAME, password: System.env.CI_DEPLOY_PASSWORD)
81+
}
82+
pom.project {
83+
name 'conversation'
84+
packaging 'jar'
85+
// optionally artifactId can be defined here
86+
description 'Client library to use the IBM Watson Assistant Service'
87+
url 'https://console.bluemix.net/docs/services/assistant/index.html'
88+
89+
scm {
90+
connection 'scm:git:[email protected]:watson-developer-cloud/java-sdk.git'
91+
developerConnection 'scm:git:[email protected]:watson-developer-cloud/java-sdk.git'
92+
url 'https://github.com/watson-developer-cloud/java-sdk'
93+
}
94+
95+
licenses {
96+
license {
97+
name 'The Apache License, Version 2.0'
98+
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
99+
}
100+
}
101+
102+
developers {
103+
developer {
104+
id 'german'
105+
name 'German Attanasio'
106+
107+
}
108+
}
109+
}
110+
}
111+
}
112+
}

0 commit comments

Comments
 (0)