Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
Merge branch 'release/0.0.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
zambrovski committed Nov 3, 2023
2 parents a71cb68 + 98e4efc commit 03e8184
Show file tree
Hide file tree
Showing 107 changed files with 3,336 additions and 628 deletions.
8 changes: 4 additions & 4 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.4/apache-maven-3.8.4-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar
45 changes: 14 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,26 @@
# avro-avro-generator-maven-plugin
# axon-avro-spoon

Template repository for usage in organizations: toolisticon, holunda-io, holixon...

[![Build Status](https://github.com/holixon/axon-avro-generator-maven-plugin/workflows/Development%20branches/badge.svg)](https://github.com/holixon/axon-avro-generator-maven-plugin/actions)
[![sponsored](https://img.shields.io/badge/sponsoredBy-Holisticon-RED.svg)](https://holisticon.de/)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.holixon.avro.maven/axon-avro-generator-maven-plugin/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.holixon.avro.maven/axon-avro-generator-maven-plugin)
![currently in development](https://img.shields.io/badge/lifecycle-INCUBATING-orange.svg)

This repository is a **template repository** designed to be a template for the next project.
Collection of libs and tools to work with axon framework and apache avro.

## How to use
[![incubating](https://img.shields.io/badge/lifecycle-INCUBATING-orange.svg)](https://github.com/holisticon#open-source-lifecycle)
[![Build Status](https://github.com/holixon/axon-avro/workflows/Development%20branches/badge.svg)](https://github.com/holixon/axon-avro/actions)
[![sponsored](https://img.shields.io/badge/sponsoredBy-Holisticon-red.svg)](https://holisticon.de/)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.holixon.axon.avro/axon-avro-bom/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.holixon.axon.avro/axon-avro-bom)

* create a new repo on github (can be in any organization). Choose this project as template repository. Copy all branches, so the `master`exists in your repo (for the github actions)
* on the command line: clone your new repo locally
* in the `setup.sh` script: set your organization, repository and base package
* run the `setup.sh` script, all placeholders are filled with your information
* delete the setup-script
* Update the `README.md`
* in the `developers` section of the `pom.xml`: mention yourself ... it is your project.
## goals

## Things to change after usage of template
### verify-and-create-docs

To change the following values, modify the placeholders in `setup.sh` and run it.
This is a one-time operation, you can safely delete the `setup.sh` file afterwards.
Keep your schema files in `src/main/avro`. The path must fit the declared namespace, so

Of course, you can also edit manually .... and do not forget to change this `README.md` with YOUR project specific information :-).
```json
{ "type":"record", "namespace":"io.foo.bar", "name": "BarEvent" }
```

### Maven pom.xml

* Maven coordinates: `groupId`, `artifactId` and `version`
* Main description: `name`, `url`, `description`
* SCM: `connection`, `url`, `developerConnection`

### Issue Template

* correct the URL to repo

### Issue Labels

* Check the release-notes.yml for details, but create the following labels: Type: dependencies, Type: bug, Type: documentation, Type: question, Type: enhancement
must be placed in a file: `src/main/avro/io/foo/bar/BarEvent.avsc`

## Useful information

Expand Down
43 changes: 36 additions & 7 deletions _examples/app-using-the-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.holixon.avro.maven._examples</groupId>
<groupId>io.holixon.axon.avro.examples</groupId>
<artifactId>_examples</artifactId>
<version>EXAMPLE</version>
<relativePath>../pom.xml</relativePath>
<version>0.0.3</version>
</parent>

<artifactId>app-using-the-plugin</artifactId>
Expand All @@ -19,6 +18,7 @@
<schema-global.version>${project.version}</schema-global.version>
<schema-service.version>${project.version}</schema-service.version>

<jmolecules.version>1.6.0</jmolecules.version>

<!-- TEST -->
<kotlin-logging.version>2.1.21</kotlin-logging.version>
Expand Down Expand Up @@ -60,7 +60,7 @@
<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
<version>1.11.0</version>
<version>1.11.3</version>
</dependency>

<dependency>
Expand All @@ -69,6 +69,35 @@
<version>4.5.8</version>
</dependency>

<!-- include dependencies to force compilation order -->
<!-- not required for actual execution -->
<dependency>
<groupId>io.holixon.axon.avro.examples</groupId>
<artifactId>schema-service</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.holixon.axon.avro.examples</groupId>
<artifactId>schema-global</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>

<!-- runtime dependencies on jmolecules -->
<dependency>
<groupId>org.jmolecules</groupId>
<artifactId>jmolecules-ddd</artifactId>
</dependency>
<dependency>
<groupId>org.jmolecules</groupId>
<artifactId>jmolecules-cqrs-architecture</artifactId>
</dependency>
<dependency>
<groupId>org.jmolecules</groupId>
<artifactId>jmolecules-events</artifactId>
</dependency>

<!-- TEST -->
<dependency>
<groupId>org.mockito.kotlin</groupId>
Expand Down Expand Up @@ -238,7 +267,7 @@
<version>${kotlin.version}</version>
</plugin>
<plugin>
<groupId>io.holixon.avro.maven</groupId>
<groupId>io.holixon.axon.avro.maven</groupId>
<artifactId>axon-avro-generator-maven-plugin</artifactId>
<executions>
<execution>
Expand All @@ -251,8 +280,8 @@
<debug>true</debug>
<localSchemaDirectory>${project.basedir}/src/main/avro</localSchemaDirectory>
<schemaArtifacts>
<artifact>io.holixon.avro.maven._examples:schema-service:${schema-global.version}</artifact>
<artifact>io.holixon.avro.maven._examples:schema-global:${schema-service.version}</artifact>
<artifact>io.holixon.axon.avro.examples:schema-service:${schema-global.version}</artifact>
<artifact>io.holixon.axon.avro.examples:schema-global:${schema-service.version}</artifact>
</schemaArtifacts>
<includeSchemas>
<schema>io.holixon.schema.bank.event.BankAccountCreatedEvent</schema>
Expand Down
15 changes: 9 additions & 6 deletions _examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@
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>io.holixon.avro.maven._examples</groupId>
<parent>
<groupId>io.holixon.axon.avro._</groupId>
<artifactId>axon-avro_</artifactId>
<version>0.0.3</version>
</parent>

<groupId>io.holixon.axon.avro.examples</groupId>
<artifactId>_examples</artifactId>
<version>EXAMPLE</version>
<packaging>pom</packaging>

<modules>
Expand All @@ -17,8 +22,6 @@
<properties>
<java.version>11</java.version>
<avro.version>1.11.0</avro.version>
<generator-plugin.version>0.0.2-SNAPSHOT</generator-plugin.version>
<!-- <generator-plugin.version>0.0.2</generator-plugin.version>-->
</properties>

<build>
Expand All @@ -27,9 +30,9 @@
<pluginManagement>
<plugins>
<plugin>
<groupId>io.holixon.avro.maven</groupId>
<groupId>io.holixon.axon.avro.maven</groupId>
<artifactId>axon-avro-generator-maven-plugin</artifactId>
<version>${generator-plugin.version}</version>
<version>${project.version}</version>

<!-- TODO do we need this? or can we inherit avro from project that uses this plugin? -->
<dependencies>
Expand Down
12 changes: 9 additions & 3 deletions _examples/schema-global/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Global

| Type | Namespace | Name | Revision | Description |
|------|-----------|------|----------|-------------|
| **query** | _io.holixon.schema.global.query_ | [LookupCustomerQuery](./src/main/avro/io/holixon/schema/global/query/LookupCustomerQuery.avsc) | 1 | Query to look up a customer ID |
| **N/A** | _io.holixon.schema.global.query_ | [LookupCustomerQueryResult](./src/main/avro/io/holixon/schema/global/query/LookupCustomerQueryResult.avsc) | 1 | An ID representing a customer |
| **event** | _io.holixon.schema.global.event_ | [OrderImportedEvent](./src/main/avro/io/holixon/schema/global/event/OrderImportedEvent.avsc) | 1 | A new order has been imported. Order ID ... |
| **query** | _io.holixon.schema.global.query_ | [LookupCustomerQuery](./src/main/avro/io/holixon/schema/global/query/LookupCustomerQuery.avsc) | 456 | Query to look up a customer ID |
| **queryResult** | _io.holixon.schema.global.query_ | [LookupCustomerQueryResult](./src/main/avro/io/holixon/schema/global/query/LookupCustomerQueryResult.avsc) | 123 | An ID representing a customer |
| **event** | _io.holixon.schema.global.event_ | [OrderImportedEvent](./src/main/avro/io/holixon/schema/global/event/OrderImportedEvent.avsc) | 90 | A new order has been imported. Order ID ... |

<!-- /GENERATED AVSC DOCS (do not remove this marker) -->

Expand All @@ -18,3 +18,9 @@ Some footer stuff









12 changes: 8 additions & 4 deletions _examples/schema-global/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.holixon.avro.maven._examples</groupId>
<groupId>io.holixon.axon.avro.examples</groupId>
<artifactId>_examples</artifactId>
<version>EXAMPLE</version>
<relativePath>../pom.xml</relativePath>
<version>0.0.3</version>
</parent>

<artifactId>schema-global</artifactId>
Expand All @@ -23,9 +22,14 @@
<build>
<defaultGoal>clean package</defaultGoal>

<resources>
<resource>
<directory>${project.basedir}/src/main/avro</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>io.holixon.avro.maven</groupId>
<groupId>io.holixon.axon.avro.maven</groupId>
<artifactId>axon-avro-generator-maven-plugin</artifactId>
<executions>
<execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"doc": "A new order has been imported. Order ID ...",
"meta": {
"type": "event",
"revision": "1"
"revision": "90"
},
"fields": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"doc": "Query to look up a customer ID",
"meta": {
"type": "query",
"revision": "1",
"revision": "456",
"result": "io.holixon.schema.global.query.LookupCustomerQueryResult"
},
"fields": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"name": "LookupCustomerQueryResult",
"doc": "An ID representing a customer",
"meta": {
"revision": "1",
"revision": "123",
"type": "queryResult",
"resultFor": "io.holixon.schema.global.query.LookupCustomerQuery"
},
"fields": [
Expand Down
13 changes: 9 additions & 4 deletions _examples/schema-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,24 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.holixon.avro.maven._examples</groupId>
<groupId>io.holixon.axon.avro.examples</groupId>
<artifactId>_examples</artifactId>
<version>EXAMPLE</version>
<relativePath>../pom.xml</relativePath>
<version>0.0.3</version>
</parent>

<artifactId>schema-service</artifactId>


<build>
<resources>
<resource>
<directory>${project.basedir}/src/main/avro</directory>
</resource>
</resources>

<plugins>
<plugin>
<groupId>io.holixon.avro.maven</groupId>
<groupId>io.holixon.axon.avro.maven</groupId>
<artifactId>axon-avro-generator-maven-plugin</artifactId>
<executions>
<execution>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"type": "record",
"namespace": "io.holixon.schema.bank.command",
"name": "CreateBankAccountCommand",
"doc": "Create a new BankAccount",
"meta": {
"type": "command",
"revision": "47"
},
"fields": [
{
"name": "id",
"type": "string"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"doc": "Domain event containing accountId and new balance",
"meta": {
"type": "event",
"revision": "1"
"revision": "18"
},
"fields": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"doc": "A bank account has been created",
"meta": {
"type": "event",
"revision": "1"
"revision": "19"
},
"fields": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"doc": "Money was deposited (at a bank counter)",
"meta": {
"type": "event",
"revision": "1"
"revision": "20"
},
"fields": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"doc": "Money was withdrawn (at an ATM)",
"meta": {
"type": "event",
"revision": "1"
"revision": "21"
},
"fields": [
{
Expand Down
Loading

0 comments on commit 03e8184

Please sign in to comment.