Skip to content

Commit

Permalink
Merge pull request #137 from asyncapi/release/1.0.0-EAP-2
Browse files Browse the repository at this point in the history
1.0.0-EAP-2
  • Loading branch information
Pakisan authored Mar 16, 2023
2 parents 1950805 + 99a644a commit 41dfe4c
Show file tree
Hide file tree
Showing 755 changed files with 58,797 additions and 15,172 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,12 @@ buildNumber.properties

# Mac
.DS_Store

# Eclipse
asyncapi-plugin/asyncapi-plugin-maven/.settings/org.eclipse.jdt.core.prefs
asyncapi-plugin/asyncapi-plugin-maven/.project
asyncapi-plugin/.project
asyncapi-core/.project
.vscode/settings.json
asyncapi-core/.settings/org.eclipse.jdt.core.prefs
.project
2 changes: 0 additions & 2 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 0 additions & 28 deletions .idea/gradle.xml

This file was deleted.

19 changes: 12 additions & 7 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .sdkmanrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
java=8.0.362-amzn
maven=3.9.0
205 changes: 35 additions & 170 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,91 +1,46 @@
<h1 align="center">
<br>
<a href="https://asyncapi.org"><img src="./assets/logo.png" alt="AsyncAPI logo" height="80"></a>
</h1>
<h4 align="center">Building the future of event-driven architectures</h4>
<h6 align="center">We're on a mission to standardize message-based communication and increase interoperability of the different systems out there.</h6>
[![AsyncAPI Logo](./assets/logo.png)](https://www.asyncapi.com)

> ⚠️ This project doesn't support AsyncAPI 1.x
This monorepo stores modules, which simplifies interacting with AsyncAPI in `jvm` ecosystem.
<h4 align="left">Building the future of event-driven architectures</h4>
<h6 align="left">We're on a mission to standardize message-based communication and increase interoperability of the different systems out there.</h6>

# Index
---
> ⚠️ This project doesn't support AsyncAPI 1.x
---

* [Monorepo structure](#monorepo-structure)
* [core](#core)
* [plugin](#plugin)
* [Release](#release)
* [maven artifacts](#release-maven-artifacts)
* [gradle artifacts](#release-gradle-artifacts)
* [relese to maven central](#release-to-maven-central)
* [release to gradle plugins](#release-to-gradle-plugins)
[![Version](https://img.shields.io/maven-central/v/com.asyncapi/asyncapi-core?logo=apache-maven)](https://search.maven.org/artifact/io.quarkiverse.asyncapi/quarkus-asyncapi)

## Monorepo structure
Currently here it's splitted on two submodules:
* [core](#core)
* [plugin](#plugin)
## Overview
JVM-friendly bindings for AsyncAPI. It allows you to read or write specifications for your asynchronous API through code

### core
This submodule stores projection of AsyncAPI specification to java classes. Each class is being properly annotated with `jsr-305` annotations,
which allows to use it in null-safety languages like `kotlin` without extra headache.
Hints:
- If you are working with AsyncAPI specification in JetBrains IDE, check out our [AsyncAPI - IDEA plugin](https://github.com/asyncapi/jasyncapi-idea-plugin)
- If you are working with AsyncAPI specification in VSCode, check out our [AsyncAPI - VSCode plugin](https://github.com/asyncapi/vs-asyncapi-preview)

```
<dependency>
<groupId>com.asyncapi</groupId>
<artifactId>asyncapi-core</artifactId>
<version>1.0.0-EAP</version>
</dependency>
```
## Known consumers:
- [Springwolf Core](https://github.com/springwolf/springwolf-core) - Automated documentation for async APIs built with Spring Boot
- [AsyncAPI Quarkus](https://github.com/quarkiverse/quarkus-asyncapi) - Generates AsyncAPIRegistry and configuration classes for Quarkus

### plugin
This submodule stores plugins, which automatizes work with AsyncAPI specification.
## Contributors section

Currently here are three plugins:
* [maven plugin](#maven)
* [gradle plugin](#gradle)
* [IDEA plugin](#idea)
### Build

#### maven
Maven plugin helps to generate AsyncAPI specification from hand-crafted AsyncAPI class at choosed build cycle step.
#### Prerequisites
1. JDK 1.8
2. Maven 3+

If you are using SDKMAN! use [env](https://sdkman.io/usage#env) to prepare environment
```shell
sdk env
```
<dependency>
<groupId>com.asyncapi</groupId>
<artifactId>asyncapi-maven-plugin</artifactId>
<version>1.0.0-EAP</version>
<type>maven-plugin</type>
</dependency>
```

**[Source code with description and example](asyncapi-plugin/asyncapi-plugin-maven)**

#### gradle
Gradle plugin helps to generate AsyncAPI specification from hand-crafted AsyncAPI class at choosed build cycle step.

**[Source code with description and example](asyncapi-plugin/asyncapi-plugin-gradle)**

#### IDEA
IDEA plugin simplifies work with AsyncAPI specification not only in Intellij IDEA, but in others IDE from JetBrains
### Publish new release

[JetBrains plugin marketplace](https://plugins.jetbrains.com/plugin/15673-asyncapi)
#### Prerequisites
1. Request credentials for one of AsyncAPI's account on [Sonatype Jira](https://issues.sonatype.org), which is synced
with [Sonatype nexus](https://oss.sonatype.org)
2. Generate pgp key if it was not generated yet
3. Create `/Users/{userName}/.m2/settings.xml`

**[Source code with description and example](asyncapi-plugin/asyncapi-plugin-idea)**

## Release

**[Sonatype Instruction with references and clarifications](https://central.sonatype.org/pages/apache-maven.html)**

**⚠️ WARNING: next artifacts MUST always have common version at release. Because of dependency of plugins from core**
* **[asyncapi-core](./asyncapi-core)**
* **[asyncapi-plugin-maven](./asyncapi-plugin/asyncapi-plugin-maven)**
* **[asyncapi-plugin-gradle](./asyncapi-plugin/asyncapi-plugin-gradle)**

### Release maven artifacts:

* Request credentials for one of AsyncAPI's account on [Sonatype's Jira](https://issues.sonatype.org), which is synced
with [Sonatype's nexus](https://oss.sonatype.org)
* Generate pgp key if it was not generated yet
* Create `/Users/{userName}/.m2/settings.xml`
```xml
<settings>
<profiles>
Expand All @@ -112,101 +67,11 @@ with [Sonatype's nexus](https://oss.sonatype.org)
</settings>
```

* Choose new release version and set it to root [pom.xml](./pom.xml).

_Example:_
```xml
<?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.asyncapi</groupId>
<artifactId>asyncapi</artifactId>
<version>{new release version}</version>

<!-- Other project properties was omitted. They are located below and won't be updated generally -->

</project>
```

* Don't forget to update parent version in all submodules.
* [asyncapi-core](./asyncapi-core/pom.xml)
* [asyncapi-plugin](./asyncapi-plugin/pom.xml)
* [asyncapi-plugin-core](./asyncapi-plugin/asyncapi-plugin-core/pom.xml)
* [asyncapi-plugin-maven](./asyncapi-plugin/asyncapi-plugin-maven/pom.xml)

_Example_
```xml
<?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">
<parent>
<artifactId>asyncapi-plugin</artifactId>
<groupId>com.asyncapi</groupId>
<version>{new release version}</version>
</parent>

<!-- Other project properties was omitted. They are located below and won't be updated generally -->

</project>
```

* Build it, test it and release it to maven central repository
```shell script
➜ async-api git:(1.0.0-EAP) ✗ mvn clean deploy -P release
Release
```shell
mvn clean deploy -P release
```

### Release gradle artifacts:

#### release to maven central
**[gradle gpg instruction](https://docs.gradle.org/current/userguide/signing_plugin.html#signing_plugin)**
<br>
**[sonatype's instruction for deployment releasing](https://central.sonatype.org/pages/releasing-the-deployment.html)**

* Request credentials for one of AsyncAPI's account on [Sonatype's Jira](https://issues.sonatype.org), which is synced
with [Sonatype's nexus](https://oss.sonatype.org)
* Generate pgp key if it was not generated yet
* export secret key ring file containing your private key
```shell script
gpg --keyring secring.gpg --export-secret-keys > ~/.gnupg/secring.gpg
```
* Create `/Users/{userName}/.gradle/gradle.properties`
```properties
# gpg
signing.keyId={key name}
signing.password={key passphrase}
signing.secretKeyRingFile=/Users/{userName}/.gnupg/secring.gpg
# oss.sonatype.org
ossrhUsername={Jira username}
ossrhPassword={Jira password}
```
* Choose new release version and set it to root [build.gradle.kts](./asyncapi-plugin/asyncapi-plugin-gradle/build.gradle.kts).
_Example_
```kotlin
version = "{new release version}"
```
* Build it, test it and release it to maven central repository
```shell script
➜ asyncapi-plugin-gradle git:(1.0.0-EAP) ✗ ./gradlew publishPluginMavenPublicationToMavenRepository
```
* Go to [stagin repositories](https://oss.sonatype.org/#stagingRepositories) and release it manually
* Select repository
* Click `close` and wait some time
* Click `release`

#### release to gradle plugins

* Request `key` and `secret` for gradle account
* Update `/Users/{userName}/.gradle/gradle.properties` with gradle credential
```properties
gradle.publish.key={key}
gradle.publish.secret={secret}
```
* Release plugin to [gradle plugins](https://plugins.gradle.org/)
```shell script
➜ asyncapi-plugin-gradle git:(1.0.0-EAP) ✗ ./gradlew publishPlugins
```
references:
- [Sonatype Instruction with references and clarifications](https://central.sonatype.org/pages/apache-maven.html)
- [Sonatype Instruction for deployment releasing](https://central.sonatype.org/pages/releasing-the-deployment.html)
Binary file modified assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion asyncapi-core/asyncapi-core.iml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<module version="4">
<component name="AutoImportedSourceRoots">
<option name="directories">
<list>
Expand Down
14 changes: 10 additions & 4 deletions asyncapi-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>asyncapi</artifactId>
<groupId>com.asyncapi</groupId>
<version>1.0.0-EAP-1</version>
<version>1.0.0-EAP-2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -21,9 +21,10 @@
</dependency>
<!-- JSR305 -->
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>24.0.0</version>
<scope>provided</scope>
</dependency>
<!-- Tests -->
<dependency>
Expand All @@ -45,6 +46,11 @@
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Loading

0 comments on commit 41dfe4c

Please sign in to comment.