Remove invalid parent relativePath

Apache 2.0

Maven 3.10 and 4 fail the build when a parent <relativePath> contains any of the characters : " < > | ? *, which typically means a groupId:artifactId:version was entered instead of a path. Earlier Maven versions found no POM at such a path and resolved the parent from the repository. This recipe replaces the value with an empty <relativePath/>, which tells Maven to do exactly that.

org.openrewrite.maven.RemoveInvalidParentRelativePath
mod run . --recipe=org.openrewrite.maven.RemoveInvalidParentRelativePath

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.