Running Rewrite on a multi-module Maven project
If you have a Maven project with multiple modules, you may run into errors finding and running the OpenRewrite Maven plugin.
There is currently an open issue to better support multi-module Maven projects that you can +1 on if you'd like.
In the meantime, one way to work around this is to add a profile on the parent POM:
pom.xml
You can then run OpenRewrite from any submodule using this command: mvn -Popenrewrite rewrite:run
.
There's no need to set the configLocation
for the default location of rewrite.yml
. The default value is ${maven.multiModuleProjectDirectory}/rewrite.yml
, which works in multi module projects. More information about the various configuration options can be found in the mojo docs
PreviousRunning Rewrite on a Maven project without modifying the buildNextRunning text based recipes
Last updated