diff --git a/README.md b/README.md index 3876541..b6c7f13 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,43 @@ The repository contains the following packages: # How to use this library -TODO +To use the Parsec JCA provider in your Maven project, you need to: + +1. **Configure GitHub Packages Repository:** + Add the following repository configuration to your project's `pom.xml`. This allows Maven to find and download Parsec Java Client artifacts from GitHub Packages. + + ```xml + + ... + + + github-parallaxsecond + GitHub Parallax Second Apache Maven Packages + https://maven.pkg.github.com/parallaxsecond/parsec-client-java + + + ... + + ``` + +2. **Add the Dependency:** + Add the `parsec-jca-java` artifact as a dependency in your `pom.xml`: + + ```xml + + ... + + org.parallaxsecond + parsec-jca-java + 0.1.0 + + ... + + ``` + + This will also bring in the necessary transitive dependencies: `parsec-client-java`, `parsec-interface-java`, and `parsec-protobuf-java`. For other JVM build systems, please take the necessary coordinates (`groupId`, `artifactId`, `version`) and adapt to your dependency management syntax. You can find the latest available version on the [project's GitHub Packages page](https://github.com/parallaxsecond/parsec-client-java/packages). + + If you don't want to use the JCA, you can employ this library in a more parsec-idiomatic way by depending directly on `parsec-client-java`. _Note:_ this is not a recommendation either way. # How to develop the Parsec Java Client @@ -26,9 +62,18 @@ Check out this repo's submodules: git submodule update --init --recursive ``` -You can use `act` to run the github action locally. On OSX, you need to set the container architecture, and for testcontainers to work, you may need to set the env var `TESTCONTAINERS_HOST_OVERRIDE`. +Develop with Maven in the usual way, but use the `./mvnw` wrapper. -Example CLI input: +Examples: + +- Full build: `./mvnw clean verify` +- Run all tests: `./mvnw clean test` +- Run single test: `./mvnw test -pl parsec-jca-java-test -Dtest=org.parallaxsecond.parsec.jce.provider.SecureRandomParsecTest` + Note: if you have container changes, clean out docker images and prefix your test run with `./mvnw install -pl parsec-testcontainers -am -Ddocker.nocache=true -Dtestcontainers.reuse.enable=false` + +You can also use `act` to run the github action locally. On OSX, you need to set the container architecture, and for testcontainers to work, you may need to set the env var `TESTCONTAINERS_HOST_OVERRIDE`. + +Example: ```sh act --container-architecture linux/amd64 --env TESTCONTAINERS_HOST_OVERRIDE=`ipconfig getifaddr en0` @@ -39,8 +84,9 @@ act --container-architecture linux/amd64 --env TESTCONTAINERS_HOST_OVERRIDE=`ipc There are a number of example implementations of both the basic java client and JCA provider along with a demo (separate repository) Both the tests and workshop demo cover the basic functionality of the current implementation: -- Parsec JCA Tests [**Link**](/parsec-jca-test) -- Parsec Test Containers [**Link**](/parsec-testcontainers) +- Parsec JCA Tests [**Link**](/parsec-jca-java-test/src/test/java/org/parallaxsecond/parsec/jce/provider/) +- Parsec Client Tests [**Link**](/parsec-client-java/src/test/java/org/parallaxsecond/parsec/client/core/) +- AWS Greengrass Parsec Provider [**Link**](https://github.com/awslabs/aws-greengrass-labs-parsec-provider) - Parsec Workshop Demos (External Repository) [**Link**](https://github.com/56kcloud/parsec-workshop) ## License diff --git a/parsec-client-java/pom.xml b/parsec-client-java/pom.xml index 575b132..a617828 100644 --- a/parsec-client-java/pom.xml +++ b/parsec-client-java/pom.xml @@ -6,7 +6,7 @@ org.parallaxsecond parsec-java - 0.1.0-SNAPSHOT + 0.1.0 parsec-client-java diff --git a/parsec-interface-java/pom.xml b/parsec-interface-java/pom.xml index 013484e..f417aa4 100644 --- a/parsec-interface-java/pom.xml +++ b/parsec-interface-java/pom.xml @@ -6,7 +6,7 @@ org.parallaxsecond parsec-java - 0.1.0-SNAPSHOT + 0.1.0 parsec-interface-java diff --git a/parsec-jca-java-test/pom.xml b/parsec-jca-java-test/pom.xml index 20f28f6..84f4af6 100644 --- a/parsec-jca-java-test/pom.xml +++ b/parsec-jca-java-test/pom.xml @@ -5,7 +5,7 @@ org.parallaxsecond parsec-java - 0.1.0-SNAPSHOT + 0.1.0 parsec-jca-java-test diff --git a/parsec-jca-java/pom.xml b/parsec-jca-java/pom.xml index b5d1394..2d95c2f 100644 --- a/parsec-jca-java/pom.xml +++ b/parsec-jca-java/pom.xml @@ -6,7 +6,7 @@ org.parallaxsecond parsec-java - 0.1.0-SNAPSHOT + 0.1.0 parsec-jca-java diff --git a/parsec-protobuf-java/pom.xml b/parsec-protobuf-java/pom.xml index 8dbcb4b..0a016ea 100644 --- a/parsec-protobuf-java/pom.xml +++ b/parsec-protobuf-java/pom.xml @@ -6,7 +6,7 @@ org.parallaxsecond parsec-java - 0.1.0-SNAPSHOT + 0.1.0 parsec-protobuf-java diff --git a/parsec-testcontainers/pom.xml b/parsec-testcontainers/pom.xml index 8b08443..f2007bc 100644 --- a/parsec-testcontainers/pom.xml +++ b/parsec-testcontainers/pom.xml @@ -5,7 +5,7 @@ org.parallaxsecond parsec-java - 0.1.0-SNAPSHOT + 0.1.0 .. parsec-testcontainers diff --git a/pom.xml b/pom.xml index b495881..59b0e03 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ pom org.parallaxsecond parsec-java - 0.1.0-SNAPSHOT + 0.1.0 github