Skip to content

Commit e2f5cb7

Browse files
committed
SUPPO-1256: A few more updates to the docs.
1 parent fe7498d commit e2f5cb7

File tree

3 files changed

+43
-33
lines changed

3 files changed

+43
-33
lines changed

DEVELOPER.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
## Developer Notes
2+
3+
#### Building and Releasing
4+
To be updated..
5+
6+
7+
#### Internal Releasing
8+
TBD..
9+
10+
#### Old Stuff
11+
[Docker](examples/docker) bits for running examples. Maybe just remove?
12+
13+
A duplicate copy of the examples docker notes is below...
14+
15+
Docker files can be found [here](https://github.com/rosette-api/java/tree/master/examples/docker)
16+
17+
To simplify the running of the Java examples, the Dockerfile will build an image and install the rosette-api library from the *published source*.
18+
19+
Build the docker image, e.g. `docker build --rm -t basistech/java:1.1 .`
20+
21+
Run an example as `docker run --rm -e API_KEY=api-key -v "path-to-java-dir:/source" basistech/java:1.1`
22+
23+
To test against a specific source file, add `-e FILENAME=filename` before the `-v`.
24+
To test against an alternate url, add `-e ALT_URL=alternate_url`.
25+
26+
#### TODOs
27+
...
28+

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ them without consultation with Basis Technology Corp.
3535

3636
#### Examples
3737
View small example programs for each Rosette endpoint in the
38-
[examples](https://github.com/rosette-api/java/tree/master/examples/src/main/java/com/basistech/rosette/examples) directory.
38+
[examples](examples/src/main/java/com/basistech/rosette/examples) directory.
3939

4040
#### Documentation & Support
4141
- [Binding API](https://rosette-api.github.io/java/)
@@ -44,8 +44,8 @@ View small example programs for each Rosette endpoint in the
4444
- [Rosette Platform Release Notes](https://support.rosette.com/hc/en-us/articles/360018354971-Release-Notes)
4545
- [Binding/Rosette Platform Compatibility](https://developer.rosette.com/features-and-functions?java#)
4646
- [Support](https://support.rosette.com)
47-
- [Binding License: Apache 2.0](https://github.com/rosette-api/java/blob/develop/LICENSE.txt)
47+
- [Binding License: Apache 2.0](LICENSE.txt)
4848

4949
## Binding Developer Information
50-
If you are modifying the binding code, please refer to the [developer README](https://github.com/rosette-api/java/tree/develop/DEVELOPER.md) file.
50+
If you are modifying the binding code, please refer to the [developer README](DEVELOPER.md) file.
5151

Lines changed: 12 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,17 @@
1-
Rosette API Java Examples
2-
=========================
3-
4-
Each example class can be run independently.
5-
1+
## Endpoint Examples
62
Each example file demonstrates one of the capabilities of the Rosette Platform.
73

8-
A note on prerequisites. Rosette API only suports TLS 1.2 so ensure your toolchain also supports it.
9-
10-
## Maven ##
11-
If you use Maven, everything should have been setup and you can start running the examples using `mvn exec:java`.
12-
Otherwise you can compile and run these examples by hand:
13-
14-
- make sure you have JRE 1.7+, verify by `java -version`
15-
- download <TODO: nexus url>
16-
- `cd src/main/java/com/basistech/rosette/examples`
17-
- `javac -cp .:<path-to-rosette-api-jar-file> *.java`
18-
- `java -cp .:<path-to-rosette-api-jar-file> -Drosette.api.key=<your-api-key> com.basistech.rosette.examples.<XyzExample>`
19-
20-
## Docker ##
21-
Docker files can be found [here](https://github.com/rosette-api/java/tree/master/examples/docker)
22-
23-
### Summary
24-
To simplify the running of the Java examples, the Dockerfile will build an image and install the rosette-api library from the *published source*.
25-
26-
### Basic Usage
27-
Build the docker image, e.g. `docker build --rm -t basistech/java:1.1 .`
28-
29-
Run an example as `docker run --rm -e API_KEY=api-key -v "path-to-java-dir:/source" basistech/java:1.1`
30-
31-
To test against a specific source file, add `-e FILENAME=filename` before the `-v`.
32-
To test against an alternate url, add `-e ALT_URL=alternate_url`.
4+
Here are some methods for running the examples. Each example will also accept an optional `-Drosette.api.altUrl`
5+
parameter for overriding the default URL.
336

7+
A note on prerequisites. Rosette API only supports TLS 1.2 so ensure your toolchain also supports it.
348

9+
#### Running from Local Source
3510

11+
```
12+
git clone [email protected]:rosette-api/java.git
13+
cd java
14+
mvn compile
15+
cd examples
16+
mvn exec:java -Dexec.mainClass="com.basistech.rosette.examples.PingExample" -Drosette.api.key=$API_KEY
17+
```

0 commit comments

Comments
 (0)