The following POM files generates the AsyncAPI definition in the file src/main/asyncapi.yaml to target/generated/asyncapi and does add it to the projects sources:
<?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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>de.dentrassi.maven.asyncapi.examples</groupId> <artifactId>example1</artifactId> <version>1.0.0-SNAPSHOT</version> <packaging>jar</packaging> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencies> <dependency> <groupId>de.dentrassi.asyncapi</groupId> <artifactId>asyncapi</artifactId> <version>0.0.4</version> </dependency> <!-- using the jms-client generator extension --> <dependency> <groupId>de.dentrassi.asyncapi</groupId> <artifactId>asyncapi-jms-amqp</artifactId> <version>0.0.4</version> </dependency> <!-- using the gson generator extension --> <dependency> <groupId>de.dentrassi.asyncapi</groupId> <artifactId>asyncapi-gson</artifactId> <version>0.0.4</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>de.dentrassi.maven</groupId> <artifactId>asyncapi</artifactId> <version>0.0.4</version> <executions> <execution> <goals> <goal>generate</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </project>