WoGu

Maven Plugin

Published on Maven Central under io.github.vikas0686. No repository configuration is needed — it resolves straight from Central.

Installation

Add the plugin to the <build> section of your pom.xml:

pom.xml
<plugin>
  <groupId>io.github.vikas0686</groupId>
  <artifactId>wogu-maven-plugin</artifactId>
  <version>0.1.0</version>
  <executions>
    <execution>
      <goals>
        <goal>validate</goal>
      </goals>
    </execution>
  </executions>
</plugin>

That's it — mvn verify now runs WoGu automatically, bound to the verify phase.

Configuration

The default binds wogu:validate to verify, after your tests run. Bind it to an earlier phase for faster feedback by setting <phase> explicitly:

pom.xml
<plugin>
  <groupId>io.github.vikas0686</groupId>
  <artifactId>wogu-maven-plugin</artifactId>
  <version>0.1.0</version>
  <executions>
    <execution>
      <phase>compile</phase>
      <goals>
        <goal>validate</goal>
      </goals>
    </execution>
  </executions>
</plugin>

Usage

Run your build as usual:

Terminal
$ mvn verify
 
Scanning project...
 Found 1 workflow class
 
Running Rules...
 
 WG001 UUID.randomUUID() inside Workflow
 WG002 Thread.sleep() inside Workflow
 WG003 Non-deterministic Time APIs inside Workflow
----------------------------------------
3 ERROR
Build FAILED
 
HTML Report
target/wogu/index.html

A build with violations fails with a non-zero exit code, prints a console summary, and writes the full report to target/wogu/index.html. See Reports for what the report contains.

Example

A minimal project with the Temporal SDK and the WoGu plugin:

pom.xml
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.example</groupId>
  <artifactId>payments-service</artifactId>
  <version>1.0.0</version>
 
  <dependencies>
    <dependency>
      <groupId>io.temporal</groupId>
      <artifactId>temporal-sdk</artifactId>
      <version>1.25.1</version>
    </dependency>
  </dependencies>
 
  <build>
    <plugins>
      <plugin>
        <groupId>io.github.vikas0686</groupId>
        <artifactId>wogu-maven-plugin</artifactId>
        <version>0.1.0</version>
        <executions>
          <execution>
            <goals>
              <goal>validate</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>

Need Gradle instead? View the Gradle Plugin, or open an issue on GitHub.