Skip to content

Commit

Permalink
🎨 Use Maven-based dependencies
Browse files Browse the repository at this point in the history
 - Allow out of the box build with mvn CLI tool

 - Move dependencies from source repo to POM XML

 - Use Maven Shade Plugin to build batteries-included JAR

 - Update CLI scripts (add Bash script)
  • Loading branch information
AlainODea committed Oct 21, 2017
1 parent b59844a commit c233c4a
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 3 deletions.
15 changes: 15 additions & 0 deletions Readme.MD
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,21 @@ __Important note__: please note that this tool only supports Okta MFA set up at
- Use ```git clone https://github.com/oktadeveloper/okta-aws-cli-assume-role.git``` to clone the repository locally.
- In Terminal, run ```defaults write com.apple.finder AppleShowAllFiles YES``` if you want to be able to inspect the ```~/.aws/credentials``` and ```~/.aws/config``` files.

## Build and run

Get a single JAR with all dependencies:

```bash
mvn package
cp target/okta-aws-cli-*.jar out/oktaawscli.jar
```

Run the program:

```bash
./awscli
```

## Compiling the application

The application was built and compiled with [JetBrains' IntelliJ IDEA](https://www.jetbrains.com/idea/). The instructions below explain how to compile the application using IntelliJ IDEA. Note that you don't have to compile the application in order to be able to execute it, since the compiled executable (a jar file) is available on GitHub in the ```out``` sub-folder.
Expand Down
2 changes: 1 addition & 1 deletion awscli.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
java -classpath oktaawscli.jar;../lib/aws-java-sdk-1.10.74.jar com.okta.tools.awscli
java -classpath out;out/oktaawscli.jar com.okta.tools.awscli
2 changes: 2 additions & 0 deletions out/awscli
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
java -classpath .:oktaawscli.jar com.okta.tools.awscli
2 changes: 1 addition & 1 deletion out/awscli.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
java -classpath oktaawscli.jar;../lib/aws-java-sdk-1.10.74.jar com.okta.tools.awscli
java -classpath .;oktaawscli.jar com.okta.tools.awscli
2 changes: 1 addition & 1 deletion out/awscli.command
Original file line number Diff line number Diff line change
@@ -1 +1 @@
java -classpath .:oktaawscli.jar:../lib/aws-java-sdk-1.11.37.jar com.okta.tools.awscli
java -classpath .:oktaawscli.jar com.okta.tools.awscli

0 comments on commit c233c4a

Please sign in to comment.