Skip to content

Update Readme #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 51 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<project>
...
<repositories>
<repository>
<id>github-parallaxsecond</id>
<name>GitHub Parallax Second Apache Maven Packages</name>
<url>https://maven.pkg.github.com/parallaxsecond/parsec-client-java</url>
</repository>
</repositories>
...
</project>
```

2. **Add the Dependency:**
Add the `parsec-jca-java` artifact as a dependency in your `pom.xml`:

```xml
<dependencies>
...
<dependency>
<groupId>org.parallaxsecond</groupId>
<artifactId>parsec-jca-java</artifactId>
<version>0.1.0</version> <!-- Replace with the desired version -->
</dependency>
...
</dependencies>
```

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

Expand All @@ -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`
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion parsec-client-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.parallaxsecond</groupId>
<artifactId>parsec-java</artifactId>
<version>0.1.0-SNAPSHOT</version>
<version>0.1.0</version>
</parent>
<artifactId>parsec-client-java</artifactId>
<properties>
Expand Down
2 changes: 1 addition & 1 deletion parsec-interface-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.parallaxsecond</groupId>
<artifactId>parsec-java</artifactId>
<version>0.1.0-SNAPSHOT</version>
<version>0.1.0</version>
</parent>
<artifactId>parsec-interface-java</artifactId>
<properties>
Expand Down
2 changes: 1 addition & 1 deletion parsec-jca-java-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.parallaxsecond</groupId>
<artifactId>parsec-java</artifactId>
<version>0.1.0-SNAPSHOT</version>
<version>0.1.0</version>
</parent>
<artifactId>parsec-jca-java-test</artifactId>
<properties>
Expand Down
2 changes: 1 addition & 1 deletion parsec-jca-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.parallaxsecond</groupId>
<artifactId>parsec-java</artifactId>
<version>0.1.0-SNAPSHOT</version>
<version>0.1.0</version>
</parent>
<artifactId>parsec-jca-java</artifactId>
<properties>
Expand Down
2 changes: 1 addition & 1 deletion parsec-protobuf-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.parallaxsecond</groupId>
<artifactId>parsec-java</artifactId>
<version>0.1.0-SNAPSHOT</version>
<version>0.1.0</version>
</parent>
<artifactId>parsec-protobuf-java</artifactId>

Expand Down
2 changes: 1 addition & 1 deletion parsec-testcontainers/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.parallaxsecond</groupId>
<artifactId>parsec-java</artifactId>
<version>0.1.0-SNAPSHOT</version>
<version>0.1.0</version>
<relativePath>..</relativePath>
</parent>
<artifactId>parsec-testcontainers</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<packaging>pom</packaging>
<groupId>org.parallaxsecond</groupId>
<artifactId>parsec-java</artifactId>
<version>0.1.0-SNAPSHOT</version>
<version>0.1.0</version>
<distributionManagement>
<repository>
<id>github</id> <!-- MUST match the server-id in the workflow -->
Expand Down