Skip to content
This repository has been archived by the owner on Jul 28, 2021. It is now read-only.

Commit

Permalink
Updates for 0.4.1 release (#190)
Browse files Browse the repository at this point in the history
* Paho 1.2.4
* Add CONTRIBUTING.md
* Clear out some old test resources left behind from previous implementation
* Rebuild oshi sample using 0.4.1 SDK
* Update ref to latest version in README
* Update Dockerfile
  • Loading branch information
durera authored May 8, 2020
1 parent f28412f commit 50471ff
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 39 deletions.
1 change: 0 additions & 1 deletion .settings/org.eclipse.core.resources.prefs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding//src/test=UTF-8
encoding//src/test/java=UTF-8
encoding//src/test/resources=UTF-8
encoding/<project>=UTF-8
encoding/src=UTF-8
42 changes: 42 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Contributing to Java for IBM Watson IoT Platform

## Running the Tests
```
set JAVA_HOME=/path/to/java/sdk
set MAVEN_HOME=/path/to/maven
set WIOTP_API_KEY=a-xxxxx-xxxxxxxxxx
set WIOTP_API_TOKEN=xxxxxxxxxxxxxxxxxx
set WIOTP_IDENTITY_ORGID=xxxxx
set WIOTP_IDENTITY_TYPEID=test
set WIOTP_IDENTITY_DEVICEID=000001
set WIOTP_AUTH_TOKEN=passw0rd
```

Test results are automatically submitted to Coveralls. Ensure that new commits don't lower the code coverage %: https://coveralls.io/github/ibm-watson-iot/iot-java


## Deploying to Maven

We live here: https://mvnrepository.com/artifact/com.ibm.wiotp

```
mvn versions:set -DnewVersion=0.1.0
mvn clean package -Dmaven.test.skip=true
mvn deploy -P sign-artifacts
```

Go to https://oss.sonatype.org/#stagingRepositories
- Close the staging repo after verifying content
- Promote the repo to release after it's closed

## Useful links
- Summary: https://central.sonatype.org/pages/ossrh-guide.html
- Maven overview: https://central.sonatype.org/pages/apache-maven.html
- Requirements for release in Maven Central: https://central.sonatype.org/pages/requirements.html
- Setting up PGP: https://central.sonatype.org/pages/working-with-pgp-signatures.html
- Releasing the deployment: https://central.sonatype.org/pages/releasing-the-deployment.html
- Check released artifacts: https://search.maven.org/search?q=com.ibm.wiotp (Sync to Maven Central occurs roughly every two hours)
- Sonatype staging: https://oss.sonatype.org/content/groups/staging/com/ibm/wiotp/
- Sonatype release: https://oss.sonatype.org/content/groups/public/com/ibm/wiotp/
- Snapshots: https://oss.sonatype.org/content/repositories/snapshots/com/ibm/wiotp/
- Releases: https://repo1.maven.org/maven2/com/ibm/wiotp
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Add a dependency on `com.ibm.wiotp.sdk` to your project's `pom.xml`:
<dependency>
<groupId>com.ibm.wiotp</groupId>
<artifactId>com.ibm.wiotp.sdk</artifactId>
<version>0.3.0</version>
<version>0.4.1</version>
</dependency>
```

Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.ibm.wiotp</groupId>
<artifactId>com.ibm.wiotp.sdk</artifactId>
<version>0.4.0</version>
<version>0.4.1</version>
<packaging>jar</packaging>

<!--
Expand All @@ -27,7 +27,7 @@
<maven.compiler.target>${java.version}</maven.compiler.target>

<gson-version>2.8.1</gson-version>
<paho-version>1.2.2</paho-version>
<paho-version>1.2.4</paho-version>
<junit-version>4.12</junit-version>

<runSuite>**/AllTestSuite.class</runSuite>
Expand Down
2 changes: 1 addition & 1 deletion samples/oshi/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM openjdk:8u212-jdk-alpine3.9

ADD target/com.ibm.wiotp.samples.oshi-1.0.3-jar-with-dependencies.jar /opt/ibm/iotoshi/
ADD target/com.ibm.wiotp.samples.oshi-1.0.4-jar-with-dependencies.jar /opt/ibm/iotoshi/

ENTRYPOINT ["java", "-jar", "/opt/ibm/iotoshi/com.ibm.wiotp.samples.oshi-1.0.3-jar-with-dependencies.jar"]
4 changes: 2 additions & 2 deletions samples/oshi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ Installation across all OS's is pretty much the same:
- Run the sample

```
$ wget https://repo1.maven.org/maven2/com/ibm/wiotp/com.ibm.wiotp.samples.oshi/1.0.0/com.ibm.wiotp.samples.oshi-1.0.0-jar-with-dependencies.jar
$ java -jar com.ibm.wiotp.samples.oshi-1.0.0-jar-with-dependencies.jar --quickstart
$ wget https://repo1.maven.org/maven2/com/ibm/wiotp/com.ibm.wiotp.samples.oshi/1.0.4/com.ibm.wiotp.samples.oshi-1.0.4-jar-with-dependencies.jar
$ java -jar com.ibm.wiotp.samples.oshi-1.0.4-jar-with-dependencies.jar --quickstart
```

Note: Set the same environment variables detailed in the Docker section of this README (above) and ommit the `--quickstart` argument to connect to IBM Watson IoT Platform as a registered device.
Expand Down
4 changes: 2 additions & 2 deletions samples/oshi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.ibm.wiotp</groupId>
<artifactId>com.ibm.wiotp.samples.oshi</artifactId>
<version>1.0.3</version>
<version>1.0.4</version>
<packaging>jar</packaging>

<!--
Expand All @@ -29,7 +29,7 @@
<args4j-version>2.33</args4j-version>
<slf4j-version>1.7.29</slf4j-version>
<gson-version>2.8.1</gson-version>
<wiotp-sdk-version>0.4.0</wiotp-sdk-version>
<wiotp-sdk-version>0.4.1</wiotp-sdk-version>
<oshi-version>3.13.2</oshi-version>

<junit-version>4.12</junit-version>
Expand Down
15 changes: 0 additions & 15 deletions src/test/resources/envSensor.json

This file was deleted.

15 changes: 0 additions & 15 deletions src/test/resources/tempEventSchema.json

This file was deleted.

0 comments on commit 50471ff

Please sign in to comment.