Skip to content

Commit

Permalink
Add spotless for automatic formatting (#4766)
Browse files Browse the repository at this point in the history
* automatic formatting setup with spotless

* apply spotless configuration
  • Loading branch information
andreaTP authored Jun 19, 2024
1 parent aacf882 commit 973378e
Show file tree
Hide file tree
Showing 886 changed files with 29,667 additions and 32,770 deletions.
49 changes: 24 additions & 25 deletions .github/test-mvn-deploy/pom.xml
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.apicurio.test</groupId>
<artifactId>verify-registry-maven-deploy</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>verify-registry-maven-deploy</name>
<description>Simple Project to verify the deployment of Apicurio Registry JARS</description>
<groupId>com.apicurio.test</groupId>
<artifactId>verify-registry-maven-deploy</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>verify-registry-maven-deploy</name>
<description>Simple Project to verify the deployment of Apicurio Registry JARS</description>

<properties>
<!-- To be filled at runtime using "-Dversion.apicurio=1.x.x.Final" -->
<version.apicurio>TBD</version.apicurio>
</properties>
<properties>
<!-- To be filled at runtime using "-Dversion.apicurio=1.x.x.Final" -->
<version.apicurio>TBD</version.apicurio>
</properties>

<dependencies>
<dependency>
<groupId>io.apicurio</groupId>
<artifactId>apicurio-registry-serdes-avro-serde</artifactId>
<version>${version.apicurio}</version>
</dependency>
<dependency>
<groupId>io.apicurio</groupId>
<artifactId>apicurio-registry-java-sdk</artifactId>
<version>${version.apicurio}</version>
</dependency>
</dependencies>
<dependencies>
<dependency>
<groupId>io.apicurio</groupId>
<artifactId>apicurio-registry-serdes-avro-serde</artifactId>
<version>${version.apicurio}</version>
</dependency>
<dependency>
<groupId>io.apicurio</groupId>
<artifactId>apicurio-registry-java-sdk</artifactId>
<version>${version.apicurio}</version>
</dependency>
</dependencies>
</project>
7 changes: 3 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Contributing guide

**Want to contribute? Great!**
**Want to contribute? Great!**
We try to make it easy, and all contributions, even the smaller ones, are more than welcome.
This includes bug reports, fixes, documentation, examples...
This includes bug reports, fixes, documentation, examples...
But first, read this page (including the small print at the end).

* [Legal](#legal)
Expand Down Expand Up @@ -66,7 +66,7 @@ Because we are all humans, and to ensure Apicurio Registry is stable for everyon

### Tests and documentation are not optional

Don't forget to include tests in your pull requests.
Don't forget to include tests in your pull requests.
Also don't forget the documentation (reference documentation, javadoc...).

Be sure to test your pull request using all storage variants:
Expand Down Expand Up @@ -97,4 +97,3 @@ The important parts are as follows:
## The small print

This project is an open source project. Please act responsibly, be nice, polite and enjoy!

30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ An API/Schema registry - stores and retrieves APIs and Schemas.

This project supports several build configuration options that affect the produced executables.

By default, `mvn clean install` produces an executable JAR with the *dev* Quarkus configuration profile enabled, and *in-memory* persistence implementation.
By default, `mvn clean install` produces an executable JAR with the *dev* Quarkus configuration profile enabled, and *in-memory* persistence implementation.

Apicurio Registry supports 4 persistence implementations:
- In-Memory
Expand All @@ -34,15 +34,15 @@ For this property, there are three possible values:
Additionally, there are 2 main configuration profiles:
- *dev* - suitable for development, and
- *prod* - for production environment.

### Getting started (APIs)

```
./mvnw clean install -DskipTests
cd app/
../mvnw quarkus:dev
```

This should result in Quarkus and the in-memory registry starting up, with the REST APIs available on localhost port 8080:

* [API documentation](http://localhost:8080/apis)
Expand Down Expand Up @@ -78,7 +78,7 @@ The following parameters are available for executable files:
### SQL
- By default, the application expects an H2 server running at `jdbc:h2:tcp://localhost:9123/mem:registry`.
- For configuring the database kind and the datasource values, the following configuration options are available:

| Option | Command argument | Env. variable |
|---------------------------|---------------------------------|--------------------------------|
| Registry SQL storage kind | `-Dapicurio.storage.sql.kind` | `APICURIO_STORAGE_SQL_KIND` |
Expand All @@ -87,8 +87,8 @@ The following parameters are available for executable files:
| DS Password | `-Dapicurio.datasource.password` | `APICURIO_DATASOURCE_PASSWORD` |

To see additional options, visit:
- [Data Source config](https://quarkus.io/guides/datasource)
- [Data Source options](https://quarkus.io/guides/datasource-guide#configuration-reference)
- [Data Source config](https://quarkus.io/guides/datasource)
- [Data Source options](https://quarkus.io/guides/datasource-guide#configuration-reference)

### KafkaSQL
`./mvnw clean install -Pprod -DskipTests` builds the application artifact.
Expand Down Expand Up @@ -119,7 +119,7 @@ java \
This will start up the registry with the persistence managed by the external kafka cluster.

## Docker containers
Every time a commit is pushed to `main` an updated docker image is built and pushed to Docker
Every time a commit is pushed to `main` an updated docker image is built and pushed to Docker
Hub. The image can be found in:

* [apicurio-registry](https://hub.docker.com/r/apicurio/apicurio-registry)
Expand All @@ -128,8 +128,8 @@ Run the above docker image like this:

docker run -it -p 8080:8080 apicurio/apicurio-registry:latest-snapshot

The same configuration options are available for the docker containers, but only in the form of environment
variables (The command line parameters are for the `java` executable and at the moment it's not possible to
The same configuration options are available for the docker containers, but only in the form of environment
variables (The command line parameters are for the `java` executable and at the moment it's not possible to
pass them into the container). Each docker image will support the environment variable configuration options
documented above for their respective storage type.

Expand Down Expand Up @@ -161,7 +161,7 @@ Run Apicurio Registry with Postgres:

- Compile using `mvn clean install -DskipTests -Pprod -Ddocker`

- Then create a docker-compose file `test.yml`:
- Then create a docker-compose file `test.yml`:
```yaml
version: '3.1'

Expand All @@ -187,7 +187,7 @@ services:
## Security

You can enable authentication for both the application REST APIs and the user interface using a server based
on OpenID Connect (OIDC). The same server realm and users are federated across the user interface and the
on OpenID Connect (OIDC). The same server realm and users are federated across the user interface and the
REST APIs using Open ID Connect so that you only require one set of credentials.

In order no enable this integration, you will need to set the following environment variables.
Expand Down Expand Up @@ -221,7 +221,7 @@ For more information see the documentation on [how to configure security in Regi
## Eclipse IDE

Some notes about using the Eclipse IDE with the Apicurio Registry codebase. Before
importing the registry into your workspace, we recommend some configuration of the
importing the registry into your workspace, we recommend some configuration of the
Eclipse IDE.

### Lombok Integration
Expand All @@ -239,7 +239,7 @@ We use the **maven-dependency-plugin** in a few places to unpack a maven module
reactor into another module. For example, the `app` module unpacks the contents of
the `ui` module to include/embed the user interface into the running application.
Eclipse does not like this. To fix this, configure the Eclipse Maven "Lifecycle Mappings"
to ignore the usage of **maven-dependency-plugin**.
to ignore the usage of **maven-dependency-plugin**.

* Open up **Window->Preferences**
* Choose **Maven->Lifecycle Mappings**
Expand All @@ -264,7 +264,7 @@ to ignore the usage of **maven-dependency-plugin**.
</pluginExecution>
```
* Now go back into **Maven->Lifecycle Mappings** -> **Maven->Lifecycle Mappings** and click
* Now go back into **Maven->Lifecycle Mappings** -> **Maven->Lifecycle Mappings** and click
the **Reload workspace lifecycle mappings metadata** button.
* If you've already imported the Apicurio projects, select all of them and choose **Maven->Update Project**.
Expand All @@ -273,5 +273,5 @@ the **Reload workspace lifecycle mappings metadata** button.
We use some Google Protobuf files and a maven plugin to generate some Java classes that
get stored in various modules' `target` directories. These are then recognized by m2e
but are sometimes deleted during the Eclipse "clean" phase. To prevent Eclipse from
over-cleaning these files, find the **os-maven-plugin-1.6.2.jar** JAR in your
over-cleaning these files, find the **os-maven-plugin-1.6.2.jar** JAR in your
`.m2/repository` directory and copy it into `$ECLIPSE_HOME/dropins`.
2 changes: 1 addition & 1 deletion TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Apicurio Registry testsuite has various types of tests: unit tests and integrati
Quick tests that verify specific functionalities or components of the application. Each maven module can have it's own set of unit tests.
For the Apicurio Registry app they can be found in `app/src/test`

Because Apicurio Registry is a Quarkus application we use `@QuarkusTest` for the unit tests, that allow us to run multiple different configurations of
Because Apicurio Registry is a Quarkus application we use `@QuarkusTest` for the unit tests, that allow us to run multiple different configurations of
the application, easily provide mocks or external dependencies... QuarkusTest allows us to easily verify feature flags or config properties that change completely the behavior of the application. In order to do that we use `@QuarkusTestProfile` quite often.

Unit tests are executed as part of the project build. You can build the project and run the tests by executing this command:
Expand Down
Loading

0 comments on commit 973378e

Please sign in to comment.