Open murdos opened 3 years ago
Thanks @murdos . For context, in an earlier iteration all recipes were added to one of the regular dependency scopes. And we tried to keep dependencies really thin in rewrite jars to limit the potential for conflict resolution having an impact. But ultimately, the increased dependency isolation into the rewrite plugin configuration wound up being functionally necessary.
That shouldn't preclude us from also scanning Rewrite recipes where they happen to exist in regular dependency scopes. So I suggest we just do both going forward. Scanning from regular dependency scopes also permits framework authors to pack recipes into their own releases.
According to documentation, https://docs.openrewrite.org/tutorials/authoring-declarative-yaml-recipes#updating-downstream-projects, the maven plugin should detect recipes in directory
/src/main/resources/META-INF/rewrite
of project dependencies (as opposed to dependencies added to rewrite plugin in configuration).However it doesn't currently work. This can easily be reproduced with the following simple pom.xml :
results in :
NB : referencing a java recipe doesn't work either, e.g. with
org.openrewrite.java.migrate.guava.NoGuavaAtomicsNewReference