Do we have org.openrewrite.build.recipe-library plugin available for maven project

78 Views Asked by At

Below are the plugins available for Gradle project. Do we have same plugin if I want to opt Maven project instead of Gradle:-

plugins {
    id("java")
    id("org.openrewrite.rewrite") version("6.1.8") // available in maven
    id("org.openrewrite.build.recipe-library") version "latest.release" // not found in maven
}

If not adding last plugin then getting below error in maven project:-

[INFO] Validating active recipes...
[ERROR] Recipe validation error in com.sk.app.MyMergeYamlRecipe: Unable to load Recipe: java.lang.IllegalArgumentException: Cannot construct instance of `com.sk.app.MyMergeYamlRecipe` (no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator)
 at [Source: UNKNOWN; byte offset: #UNKNOWN]
1

There are 1 best solutions below

2
On

There's no specific plugin provided for folks that want to develop recipes in an Apache Maven project. That said, there are folks out there using Apache Maven to develop and share their recipes, such as for instance the Axon Framework: https://github.com/AxonFramework/AxonFramework/blob/master/migration/pom.xml Feel free to see what you can learn from their approach, and let us know if you run into any limitations.