com.asyncapi:asyncapi-maven-plugin

Java AsyncAPI maven plugin.

License

License

Categories

Categories

Maven Build Tools
GroupId

GroupId

com.asyncapi
ArtifactId

ArtifactId

asyncapi-maven-plugin
Last Version

Last Version

1.0.0-EAP-1
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

Java AsyncAPI maven plugin.
Project Organization

Project Organization

AsyncAPI Initiative

Download asyncapi-maven-plugin

How to add to project

<plugin>
    <groupId>com.asyncapi</groupId>
    <artifactId>asyncapi-maven-plugin</artifactId>
    <version>1.0.0-EAP-1</version>
</plugin>

Dependencies

compile (2)

Group / Artifact Type Version
org.jetbrains.kotlin : kotlin-stdlib-jdk8 jar 1.3.71
com.asyncapi : asyncapi-plugin-core jar 1.0.0-EAP-1

provided (4)

Group / Artifact Type Version
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.6.0
org.apache.maven : maven-plugin-api jar 3.6.3
org.apache.maven : maven-core jar 3.6.3
org.apache.maven : maven-artifact jar 3.6.3

test (8)

Group / Artifact Type Version
org.apache.maven : maven-compat jar 3.6.3
org.apache.maven.plugin-testing : maven-plugin-testing-harness jar 3.3.0
pl.pragmatists : JUnitParams jar 1.1.1
org.jetbrains.kotlin : kotlin-test jar 1.3.71
org.projectlombok : lombok jar 1.18.10
org.junit.jupiter : junit-jupiter-engine jar 5.6.1
org.junit.jupiter : junit-jupiter-api jar 5.6.1
org.junit.jupiter : junit-jupiter-params jar 5.6.1

Project Modules

There are no modules declared in this project.


AsyncAPI logo

Building the future of event-driven architectures

We're on a mission to standardize message-based communication and increase interoperability of the different systems out there.

⚠️ This project doesn't support AsyncAPI 1.x

This monorepo stores modules, which simplifies interacting with AsyncAPI in jvm ecosystem.

Index

Monorepo structure

Currently here it's splitted on two submodules:

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.

<dependency>
  <groupId>com.asyncapi</groupId>
  <artifactId>asyncapi-core</artifactId>
  <version>1.0.0-EAP</version>
</dependency>

plugin

This submodule stores plugins, which automatizes work with AsyncAPI specification.

Currently here are three plugins:

maven

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

<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

gradle

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

Source code with description and example

IDEA

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

JetBrains plugin marketplace

Source code with description and example

Release

Sonatype Instruction with references and clarifications

⚠️ WARNING: next artifacts MUST always have common version at release. Because of dependency of plugins from core

Release maven artifacts:

  • Request credentials for one of AsyncAPI's account on Sonatype's Jira, which is synced with Sonatype's nexus
  • Generate pgp key if it was not generated yet
  • Create /Users/{userName}/.m2/settings.xml
<settings>
  <profiles>
    <profile>
      <id>ossrh</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <properties>
        <gpg.keyname>GPG key name</gpg.keyname>
        <gpg.executable>gpg</gpg.executable>
        <gpg.passphrase>GPG passphrase for selected key</gpg.passphrase>
        <gpg.homedir>/Users/{userName}/.gnupg</gpg.homedir>
      </properties>
    </profile>
  </profiles>
  <servers>
    <server>
      <id>ossrh</id>
      <username>Jira username</username>
      <password>Jira password</password>
    </server>
  </servers>
</settings>
  • Choose new release version and set it to root pom.xml.

Example:

<?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>

Example

<?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
➜  async-api git:(1.0.0-EAP) ✗ mvn clean deploy -P release 

Release gradle artifacts:

release to maven central

gradle gpg instruction
sonatype's instruction for deployment releasing

  • Request credentials for one of AsyncAPI's account on Sonatype's Jira, which is synced with Sonatype's nexus
  • Generate pgp key if it was not generated yet
    • export secret key ring file containing your private key
      gpg --keyring secring.gpg --export-secret-keys > ~/.gnupg/secring.gpg
  • Create /Users/{userName}/.gradle/gradle.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}
version = "{new release version}"
  • Build it, test it and release it to maven central repository
➜  asyncapi-plugin-gradle git:(1.0.0-EAP) ✗ ./gradlew publishPluginMavenPublicationToMavenRepository
  • Go to stagin repositories 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
gradle.publish.key={key}
gradle.publish.secret={secret}
➜  asyncapi-plugin-gradle git:(1.0.0-EAP) ✗ ./gradlew publishPlugins
com.asyncapi

AsyncAPI Initiative

Versions

Version
1.0.0-EAP-1
1.0.0-EAP