Design Partners
Demonstrate rendering of recipe exceptions
** org.openrewrite.java.RecipeExceptionDemonstration** Show how recipe exceptions are rendered in various forms of OpenRewrite tooling.

Source

  • groupId: org.openrewrite
  • artifactId: rewrite-java
  • version: 7.30.0

Options

Type
Name
Description
String
throwOnMethodPattern
Optional. A method pattern that is used to find matching method declarations/invocations.
Boolean
throwOnVisitAll
Optional.
Boolean
throwOnVisitAllVisitor
Optional.
Boolean
throwOnApplicableTest
Optional.
Boolean
throwOnApplicableTestVisitor
Optional.
Boolean
throwOnSingleSourceApplicableTest
Optional.
Boolean
throwOnSingleSourceApplicableTestVisitor
Optional.

Usage

This recipe has no required configuration parameters and comes from a rewrite core library. It can be activated directly without adding any dependencies.
Gradle
Maven POM
Maven Command Line
build.gradle
plugins {
id("org.openrewrite.rewrite") version("5.29.0")
}
rewrite {
activeRecipe("org.openrewrite.java.RecipeExceptionDemonstration")
}
repositories {
mavenCentral()
}
pom.xml
<project>
<build>
<plugins>
<plugin>
<groupId>org.openrewrite.maven</groupId>
<artifactId>rewrite-maven-plugin</artifactId>
<version>4.34.0</version>
<configuration>
<activeRecipes>
<recipe>org.openrewrite.java.RecipeExceptionDemonstration</recipe>
</activeRecipes>
</configuration>
</plugin>
</plugins>
</build>
</project>
shell
mvn org.openrewrite.maven:rewrite-maven-plugin:4.34.0:run \
-DactiveRecipes=org.openrewrite.java.RecipeExceptionDemonstration
Recipes can also be activated directly from the command line by adding the argument -Drewrite.activeRecipes=org.openrewrite.java.RecipeExceptionDemonstration
Export as PDF
Copy link
On this page
Source
Options
Usage