openrewrite / rewrite-maven-plugin

OpenRewrite's Maven plugin.
https://openrewrite.github.io/rewrite-maven-plugin/plugin-info.html
Apache License 2.0
141 stars 72 forks source link

Add exclusions configuration maven as parameter #704

Closed sergiogp98 closed 9 months ago

sergiogp98 commented 9 months ago

What problem are you trying to solve?

I am running recipes using a YAML file and using mvn command directly. However, it takes too long since it analyses files I don't want to.

Describe the solution you'd like

I would like to have a mvn command parameter to exclude files. For example mvn -Drewrite.exclusions=folder/**

Have you considered any alternatives or workarounds?

I have considered adding <configuration><exclusions>...</exclusions></configuration> in pom.xml file but I didn't work

Additional context

Are you interested in contributing this feature to OpenRewrite?

timtebeek commented 9 months ago

According to our docs exclusions do have user properties as well: https://openrewrite.github.io/rewrite-maven-plugin/run-mojo.html

The question then is what values you were using and how. Are you not quoting your value on the commandline for instance? -Drewrite.exclusions="folder/**"

sergiogp98 commented 9 months ago

Thank you @timtebeek! I was not using quotes.