Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failOnInvalidActiveRecipes is not documented #311

Open
francisoud opened this issue Oct 17, 2024 · 1 comment
Open

failOnInvalidActiveRecipes is not documented #311

francisoud opened this issue Oct 17, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@francisoud
Copy link

What problem are you trying to solve?

The failOnInvalidActiveRecipes option is not documented (maven and gradle).
Fro example I'm referring to this line in the gradle plugin: https://github.com/openrewrite/rewrite-gradle-plugin/blob/main/plugin/src/main/java/org/openrewrite/gradle/RewriteExtension.java#L72

gradle.properties

systemProp.rewrite.failOnInvalidActiveRecipes=true

build.gradle:

dependencies {
        // missing dependency
	// rewrite("org.openrewrite.recipe:rewrite-spring:5.21.0")
}
---
type: specs.openrewrite.org/v1beta/recipe
name: my.Migration
displayName: Upgrade code and dependencies
recipeList:
  - org.openrewrite.java.migrate.UpgradeToJava17
  - org.openrewrite.java.spring.boot3.SpringBoot3BestPractices
gradlew rewriteRun
...
> Task :rewriteRun
Validating active recipes
Recipe validation error in initialization: DeclarativeRecipe must not contain uninitialized recipes. Be sure to call .initialize() on DeclarativeRecipe.
Recipe validation error in my.Migration.recipeList[2] (in file:/.../rewrite.yml): recipe 'org.openrewrite.java.spring.boot3.SpringBoot3BestPractices' does 
not exist.
mvn -U -ntp org.openrewrite.maven:rewrite-maven-plugin:run \
-Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-migrate-java:RELEASE,org.openrewrite.recipe:rewrite-testing-frameworks:RELEASE,org.openrewrite.recipe:rewrite-spring:RELEASE,org.openrewrite.recipe:rewrite-logging-frameworks:RELEASE \
-Drewrite.failOnInvalidActiveRecipes=true

Describe the solution you'd like

I think updating this 2 pages should be enough:
https://docs.openrewrite.org/reference/gradle-plugin-configuration
https://docs.openrewrite.org/reference/rewrite-maven-plugin

along with other available options

Have you considered any alternatives or workarounds?

I looked into source code but not many people will do it ;)

Additional context

None

Are you interested in contributing this feature to OpenRewrite?

Not for the moment

@francisoud francisoud added the enhancement New feature or request label Oct 17, 2024
@timtebeek timtebeek added the documentation Improvements or additions to documentation label Oct 20, 2024
@timtebeek timtebeek moved this to Backlog in OpenRewrite Oct 20, 2024
@timtebeek
Copy link
Contributor

Thanks for pointing this out! Indeed it's hard to keep the plugin documentation updated when it's not automatically generated; for the Maven plugin we have an alternative in the form of: https://openrewrite.github.io/rewrite-maven-plugin/run-mojo.html#failOnInvalidActiveRecipes
For the Gradle plugin I'm not aware of any plugin to generate plugin documentation, but perhaps I'm just not fully caught up there; any pointers appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

2 participants