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

Recipes with required options no longer need rewrite.yml for Maven and Moderne CLI #134

Open
timtebeek opened this issue Sep 17, 2024 · 0 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@timtebeek
Copy link
Contributor

Recipes with required configuration parameters can have these parameters specified on the command line with Maven and the Moderne CLI.

As an example: https://docs.openrewrite.org/recipes/csharp/dependencies/upgradedependencyversion
Currently reads:

This recipe has required configuration parameters. Recipes with required configuration parameters cannot be activated directly. To activate this recipe you must create a new recipe which fills in the required parameters. In your rewrite.yml create a new recipe with a unique name. For example: com.yourorg.UpgradeDependencyVersionExample. Here's how you can define and customize such a recipe within your rewrite.yml:

That's no longer the case; we have -PpackagePattern="Microsoft*" to make this work with the CLI.

Or this alternative for the Maven plugin:

mvn org.openrewrite.maven:rewrite-maven-plugin:5.36.0-SNAPSHOT:run -Drewrite.activeRecipes=org.openrewrite.maven.RemovePlugin -Drewrite.options=groupId=org.springframework.boot,artifactId=spring-boot-maven-plugin

We should update the docs generator to use this shorthand for Maven and the CLI, as opposed to generating a rewrite.yml that's only needed for Gradle.

@timtebeek timtebeek added bug Something isn't working enhancement New feature or request labels Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

1 participant