I'm trying to replace a multi-line text which contains XML in all files named pom.xml.
In practice, I need to replace this section:
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
with:
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
I've come up with the following sed:
find . -name pom.xml -exec sed -i 's/\<groupId\>javax\.enterprise\<\/groupId\>
\<artifactId\>cdi-api\<\/artifactId\>/\<groupId\>jakarta\.enterprise\<\/groupId\>
\<artifactId\>jakarta\.enterprise\.cdi-api\<\/artifactId\>/g' {} +
However, from the output it's returned "command not terminated". I'm not too familiar with multiline replacement, could you suggest any fix or other tool to do it? Thanks