You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, if you add the rewrite maven plugin to the top-level pom of a multi-module project, the following error is encountered if you run mvn rewrite:fix from the top level:
[ERROR] No plugin found for prefix 'org.openrewrite.maven.rewrite' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories
Running the same command from the sub-modules works ok.
A workaround for this issue is to add the following to your maven settings file ~/.m2/settings.xml
I’m shaking out “why”, but spring-cloud-config only seems to have an issue with resolving the rewrite prefix within the <module>spring-cloud-config-dependencies</module> module. If you comment it out and run rewrite:dryRun (or whatever), it’ll resolve the rewrite prefix just fine. I believe it has something to do with pluginRepository resolution and some quirkiness with the parent pom.
It’s only an issue for spring-cloud-config-dependencies, and I know it’s not isolated to just the rewrite-maven-plugin. Their use of the jacoco plugin has to be fully-qualified for spring-cloud-config-dependencies, too.
In any case, a straightforward workaround is to just use the fully-qualified goal name: ./mvnw org.openrewrite.maven:rewrite-maven-plugin:discover.
Closing for the time being. After troubleshooting and reading, I don't believe this is fundamentally an issue with how we have the rewrite-maven-plugin structured or metadata publishing 👍 Included hint about it in the docs just for reference to help folks who might run into it and how one might get unstuck if that were to happen. But I don't believe it's an issue with the plugin, I believe it's something contingent on how the pom.xml is set up.
Currently, if you add the rewrite maven plugin to the top-level pom of a multi-module project, the following error is encountered if you run
mvn rewrite:fix
from the top level:Running the same command from the sub-modules works ok.
A workaround for this issue is to add the following to your maven settings file
~/.m2/settings.xml
The error provides this link and we should investigate a better solution.
https://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException
The text was updated successfully, but these errors were encountered: