Skip to content

Commit 1aad80c

Browse files
authored
Merge pull request #4 from IonicDev/release/0.9.0
Release/0.9.0
2 parents 119e8de + 4c3af89 commit 1aad80c

27 files changed

Lines changed: 1223 additions & 887 deletions

README.md

Lines changed: 14 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
11

22
## Setup Instructions for Developers
33

4-
### Install Ionic SDK JAR
5-
6-
1. [Download](https://dev-dashboard.ionic.com/#/downloads?tenant=5640bb430ea2684423e0655c) the "Java 2.2.1 SDK"
7-
2. Extract SDK zip
8-
3. Add Ionic SDK JAR to Maven Local Repository with the appropriate package information:
9-
10-
~~~bash
11-
mvn install:install-file -Dfile=ionic-sdk-2.2.1.jar -DpomFile=pom.xml
12-
~~~
13-
14-
> NOTE: ionic-sdk-2.2.1.jar is only compatible with Java 7, 8 & 9
15-
16-
> NOTE: Because Ionic uses strong 256-bit keys for encryption, the standard cryptography library built into Java will
17-
> require that you have installed the [Unlimited Strength Java Cryptography Extension](https://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html).
18-
194
## AWS Documentation:
205
* [AWS SDK](https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/setup-install.html)
216
* [AWS Credentials](https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/setup-credentials.html)
@@ -24,13 +9,6 @@ mvn install:install-file -Dfile=ionic-sdk-2.2.1.jar -DpomFile=pom.xml
249
### Amazon Standard SDKs
2510
* If you don't already have an AWS Account, go to [Sign In or Create an AWS Account](https://aws.amazon.com/). Select "Create an AWS Account" and follow the instructions to create and configure your AWS account.
2611

27-
### Install AWS SDK
28-
* `git clone https://github.com/aws/aws-sdk-java.git`
29-
* `cd aws-sdk-java/`
30-
* If you have a gpg signing key `mvn clean install` will attempt to sign the SDK jar file using the key.
31-
* If you want to skip the signing process use `mvn clean install -Dgpg.skip=true`
32-
33-
3412
### Setup AWS Credentials
3513
#### Create IAM User
3614
The IAM user will be used to put and get objects from the AWS Bucket
@@ -75,35 +53,43 @@ Replace `your_access_key_id` and `your_secret_access_key` with the keys created
7553
Mac:
7654
* `export AWS_ACCESS_KEY_ID=your_access_key_id`
7755
* `export AWS_SECRET_ACCESS_KEY=your_secret_access_key`
78-
* `export AWS_DEFAULT_REGION=your_default_region`
56+
* `export AWS_REGION=your_default_region`
7957

8058
Windows:
8159
* `set AWS_ACCESS_KEY_ID=your_access_key_id`
8260
* `set AWS_SECRET_ACCESS_KEY=your_secret_access_key`
83-
* `set AWS_DEFAULT_REGION=your_default_region`
61+
* `set AWS_REGION=your_default_region`
8462

8563

8664
### Build the Project
65+
To build and install the Ionic S3 sdk `mvn install`
8766

88-
`./build.sh` or `build.bat`
67+
To build the IonicS3SampleApp from /awss3examples `mvn package`
8968

9069
### Usage
9170

9271
#### Sample App
9372

94-
After the build, a fat JAR of the sample app is produced at `awss3examples/target/S3SampleApp.jar`.
73+
After the build, a fat JAR of the sample app is produced at `awss3examples/target/IonicS3SampleApp.jar`.
9574

9675
Ensure that your Ionic device credentials can be located at `${user.home}/.ionicsecurity/profiles.pt`.
9776

98-
The user can run the program with either "put" or "get" commands with usage as follows:
77+
The user can run the program from /awss3examples with either "put" or "get" commands with usage as follows:
9978
* `./run.sh putString <bucketName> <objectKey> <objectContent> [<metadata>]`
10079
* `./run.sh putFile <bucketName> <objectKey> <filePath> [<metadata>]`
10180
* `./run.sh putMultipart <bucketName> <objectKey> <file> <partsize_mb> [<metadata>]`
10281
* `./run.sh getFile [-m] <bucketName> <objectKey> <destinationPath>`
10382
* `./run.sh getString [-m] <bucketName> <objectKey>`
83+
Windows users should use ./run.bat instead
84+
85+
Note: S3SampleApp does not protect against invalid entry of AWS S3 bucket names or Object Keys
86+
Current Rules for naming S3 buckets can be found at:
87+
https://docs.aws.amazon.com/AmazonS3/latest/dev//BucketRestrictions.html#bucketnamingrules
88+
Current Rules for specifying Object Keys can be found at:
89+
https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#object-keys
10490

10591
#### Using the Library
10692

10793
Using the library as a developer is documented in the `docs/content/` directories.
108-
The JAR for use here is produced in `ionics3/target/`, such as `ionics3/target/ionics3-0.7.1.jar`.
94+
The JAR for use here is produced in `ionics3/target/`, such as `ionics3/target/ionics3-0.7.2.jar`.
10995
This JAR is thin, and needs the Ionic SDK and the AWS SDKs available during builds that use it.

awss3examples/run.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
java -jar target/IonicS3SampleApp.jar %*

awss3examples/run.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
java -jar target/IonicS3SampleApp.jar "$@"

0 commit comments

Comments
 (0)