From 2b86152140e48429018153d2a1b5527f353f83c2 Mon Sep 17 00:00:00 2001
From: Nikita Pushkarskii <92988368+npushkarskii@users.noreply.github.com>
Date: Thu, 6 Jul 2023 13:40:48 -0400
Subject: [PATCH 1/5] updates the README
---
README.md | 145 ++++++++++++++++++++++++++++++------------------------
1 file changed, 82 insertions(+), 63 deletions(-)
diff --git a/README.md b/README.md
index 6412a8ac..79a84898 100644
--- a/README.md
+++ b/README.md
@@ -1,58 +1,66 @@
# Push API Client
-A Coveo Push API Client in Java
+A [Coveo Push API ](https://docs.coveo.com/en/12/api-reference/push-api) client library for Java.
+
+## Prerequisites
+
+The Coveo `push-api-client.java` package is stored on GitHub packages.
+You will need a personal access token (classic) with at least `read:packages` scope to install this dependency.
+
+For details, see [Authenticating to GitHub Packages](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry#authenticating-to-github-packages)
## Installation
-### Step 1: Prerequisites
-The Coveo `push-api-client.java` package is stored on Github packages. You will need a personal access token (classic) with at least `read:packages` scope to install this dependency.
+### Step 1: Update `settings.xml`
+You can install this GitHub Package with [Apache Maven by](https://maven.apache.org/) editing the `~/.m2/settings.xml` file:
-More info, visit [Authenticating to GitHub Packages](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry#authenticating-to-github-packages)
+1. Add a repository definition to the GitHub Package.
-### Step 2: Update `settings.xml`
-You can install this GitHub Package with Apache Maven by editing your `~/.m2/settings.xml`:
+ ```xml
+
+ github
+ https://maven.pkg.github.com/coveo/push-api-client.java
+
+ true
+
+
+ ```
-#### The repository to the package
-Add a definition to the Github Package
+1. Add your GitHub personal access token to install packages from GitHub Packages.
-```xml
-
- github
- https://maven.pkg.github.com/coveo/push-api-client.java
-
- true
-
-
-```
+ ```xml
+
+
+ github
+ USERNAME
+ TOKEN
+
+
+ ```
-#### Your GitHub personal access token
-Your personal access token required to install packages from Github Packages
+### Step 2: Add a Coveo dependency to project
+
+Add a Coveo dependency to your Maven project by editing the `pom.xml` file.
```xml
-
-
- github
- USERNAME
- TOKEN
-
-
+
+ com.coveo
+ push-api-client.java
+ 2.3.0
+
```
-### Step 3: Add Coveo dependency to project
-Using Maven:
-
+### Step 3: Install the project files
-Add Coveo dependency to your maven project. Instructions on how to do that available in this [URL](https://github.com/coveo/push-api-client.java/packages/1884180).
+To install the updated project files, build the Maven project.
-### Step 4: Install
-Run via command line
```bash
mvn install
```
## Usage
-See more examples in the `./samples` folder.
+> See more examples in the `./samples` folder.
```java
import com.coveo.pushapiclient.DocumentBuilder;
@@ -82,45 +90,56 @@ public class PushOneDocument {
```
## Logging
-When pushing multiple documents into your source using a service (e.g. `PushService`, `StreamService`), make sure to configure a **logger** to be able to see what happens.
-to do so .. in your `resources` folder.
-### Log4j2 XML Configuration Example
-To log execution output into the console, use the below `log4j2.xml` configuration:
-```xml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-```
+If you want to push multiple documents to your Coveo organization and use a service for that (e.g. `PushService`, `StreamService`), you need to configure a **logger** to be able to see what happens.
-See [Log4j2 configuration](https://logging.apache.org/log4j/2.x/manual/configuration.html) for more details.
+1. Go to your project's root folder.
-## Local Setup to Contribute
+1. Update the Apache Log4j2 configuration by editing the `log4j2.xml` file.
+ The following example will print the log execution to the console.
-### Formatting
+ ```xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ```
+
+ For more details, see [Log4j2 configuration](https://logging.apache.org/log4j/2.x/manual/configuration.html).
+
+## Formatting the code before contributing
This project uses [Google Java Format](https://github.com/google/google-java-format), so make sure your code is properly formatted before opening a pull request.
+
+To enforce code style and formatting rules, run the Maven Spotless plugin:
+
```bash
mvn spotless:apply
```
## Release
-* Tag the commit following semver.
-* Bump version in pom.xml
-* mvn -P release clean deploy
-* cd into ./target
-* jar -cvf bundle.jar push-api-client.java-1.0.0-javadoc.jar push-api-client.java-1.0.0-javadoc.jar.asc push-api-client.java-1.0.0-sources.jar push-api-client.java-1.0.0-sources.jar.asc push-api-client.java-1.0.0.jar push-api-client.java-1.0.0.jar.asc push-api-client.java-1.0.0.pom push-api-client.java-1.0.0.pom.asc
-* Log into https://oss.sonatype.org/
-* Upload newly created bundle.jar
+1. Tag the commit according to the [semantic versioning](https://semver.org/).
+
+1. Bump version in `pom.xml`.
+
+1. Run the following commands:
+
+ 1. `mvn -P release clean deploy`.
+
+ 1. `cd ./target`.
+
+ 1. `jar -cvf bundle.jar push-api-client.java-1.0.0-javadoc.jar push-api-client.java-1.0.0-javadoc.jar.asc push-api-client.java-1.0.0-sources.jar push-api-client.java-1.0.0-sources.jar.asc push-api-client.java-1.0.0.jar push-api-client.java-1.0.0.jar.asc push-api-client.java-1.0.0.pom push-api-client.java-1.0.0.pom.asc`
+
+1. Log in to https://oss.sonatype.org/.
+
+1. Upload the newly created `bundle.jar` file.
From 07ad16c103276844e21af6ae4ef639517597e101 Mon Sep 17 00:00:00 2001
From: Nikita Pushkarskii <92988368+npushkarskii@users.noreply.github.com>
Date: Fri, 7 Jul 2023 17:14:33 -0400
Subject: [PATCH 2/5] Apply suggestions from code review
Co-authored-by: Benjamin Taillon <54454747+btaillon@users.noreply.github.com>
---
README.md | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/README.md b/README.md
index 79a84898..2e263552 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# Push API Client
-A [Coveo Push API ](https://docs.coveo.com/en/12/api-reference/push-api) client library for Java.
+A [Coveo Push API](https://docs.coveo.com/en/12/api-reference/push-api) client library for Java.
## Prerequisites
@@ -12,17 +12,17 @@ For details, see [Authenticating to GitHub Packages](https://docs.github.com/en/
## Installation
### Step 1: Update `settings.xml`
-You can install this GitHub Package with [Apache Maven by](https://maven.apache.org/) editing the `~/.m2/settings.xml` file:
+You can install this GitHub Package with [Apache Maven](https://maven.apache.org/) by editing the `~/.m2/settings.xml` file:
1. Add a repository definition to the GitHub Package.
```xml
- github
- https://maven.pkg.github.com/coveo/push-api-client.java
-
- true
-
+ github
+ https://maven.pkg.github.com/coveo/push-api-client.java
+
+ true
+
```
From 7c5ea8e4715d6f85889f04e929428d57bf2f89ab Mon Sep 17 00:00:00 2001
From: Nikita Pushkarskii <92988368+npushkarskii@users.noreply.github.com>
Date: Fri, 7 Jul 2023 17:17:54 -0400
Subject: [PATCH 3/5] updates formatting
---
README.md | 83 ++++++++++++++++++++++++++++---------------------------
1 file changed, 42 insertions(+), 41 deletions(-)
diff --git a/README.md b/README.md
index 2e263552..48ad4dfe 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@ A [Coveo Push API](https://docs.coveo.com/en/12/api-reference/push-api) client l
## Prerequisites
-The Coveo `push-api-client.java` package is stored on GitHub packages.
+The Coveo `push-api-client.java` package is stored on GitHub packages.
You will need a personal access token (classic) with at least `read:packages` scope to install this dependency.
For details, see [Authenticating to GitHub Packages](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry#authenticating-to-github-packages)
@@ -12,31 +12,32 @@ For details, see [Authenticating to GitHub Packages](https://docs.github.com/en/
## Installation
### Step 1: Update `settings.xml`
+
You can install this GitHub Package with [Apache Maven](https://maven.apache.org/) by editing the `~/.m2/settings.xml` file:
1. Add a repository definition to the GitHub Package.
- ```xml
-
- github
- https://maven.pkg.github.com/coveo/push-api-client.java
-
- true
-
-
- ```
+ ```xml
+
+ github
+ https://maven.pkg.github.com/coveo/push-api-client.java
+
+ true
+
+
+ ```
1. Add your GitHub personal access token to install packages from GitHub Packages.
- ```xml
-
-
- github
- USERNAME
- TOKEN
-
-
- ```
+ ```xml
+
+
+ github
+ USERNAME
+ TOKEN
+
+
+ ```
### Step 2: Add a Coveo dependency to project
@@ -96,25 +97,25 @@ If you want to push multiple documents to your Coveo organization and use a serv
1. Go to your project's root folder.
1. Update the Apache Log4j2 configuration by editing the `log4j2.xml` file.
- The following example will print the log execution to the console.
-
- ```xml
-
-
-
-
-
-
-
-
-
-
-
-
-
- ```
-
- For more details, see [Log4j2 configuration](https://logging.apache.org/log4j/2.x/manual/configuration.html).
+ The following example will print the log execution to the console.
+
+ ```xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ```
+
+ For more details, see [Log4j2 configuration](https://logging.apache.org/log4j/2.x/manual/configuration.html).
## Formatting the code before contributing
@@ -134,11 +135,11 @@ mvn spotless:apply
1. Run the following commands:
- 1. `mvn -P release clean deploy`.
+ 1. `mvn -P release clean deploy`.
- 1. `cd ./target`.
+ 1. `cd ./target`.
- 1. `jar -cvf bundle.jar push-api-client.java-1.0.0-javadoc.jar push-api-client.java-1.0.0-javadoc.jar.asc push-api-client.java-1.0.0-sources.jar push-api-client.java-1.0.0-sources.jar.asc push-api-client.java-1.0.0.jar push-api-client.java-1.0.0.jar.asc push-api-client.java-1.0.0.pom push-api-client.java-1.0.0.pom.asc`
+ 1. `jar -cvf bundle.jar push-api-client.java-1.0.0-javadoc.jar push-api-client.java-1.0.0-javadoc.jar.asc push-api-client.java-1.0.0-sources.jar push-api-client.java-1.0.0-sources.jar.asc push-api-client.java-1.0.0.jar push-api-client.java-1.0.0.jar.asc push-api-client.java-1.0.0.pom push-api-client.java-1.0.0.pom.asc`
1. Log in to https://oss.sonatype.org/.
From 344693984bff9df234b93b12a877b0997592234b Mon Sep 17 00:00:00 2001
From: Nikita Pushkarskii <92988368+npushkarskii@users.noreply.github.com>
Date: Tue, 11 Jul 2023 10:32:21 -0400
Subject: [PATCH 4/5] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 48ad4dfe..683abc9c 100644
--- a/README.md
+++ b/README.md
@@ -92,7 +92,7 @@ public class PushOneDocument {
## Logging
-If you want to push multiple documents to your Coveo organization and use a service for that (e.g. `PushService`, `StreamService`), you need to configure a **logger** to be able to see what happens.
+If you want to push multiple documents to your Coveo organization and use a service for that (e.g. `PushService`, `StreamService`), you may find it useful to configure a **logger** to catch error and warning messages .
1. Go to your project's root folder.
From 911df74b6683298a532408974536b1957753e398 Mon Sep 17 00:00:00 2001
From: Nikita Pushkarskii <92988368+npushkarskii@users.noreply.github.com>
Date: Tue, 11 Jul 2023 10:33:13 -0400
Subject: [PATCH 5/5] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 683abc9c..fba2c261 100644
--- a/README.md
+++ b/README.md
@@ -92,7 +92,7 @@ public class PushOneDocument {
## Logging
-If you want to push multiple documents to your Coveo organization and use a service for that (e.g. `PushService`, `StreamService`), you may find it useful to configure a **logger** to catch error and warning messages .
+If you want to push multiple documents to your Coveo organization and use a service for that (e.g. `PushService`, `StreamService`), you may find it useful to configure a **logger** to catch error and warning messages.
1. Go to your project's root folder.