root/child-b/child-b-2/pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project>
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>net.example</groupId>
    <artifactId>child-b</artifactId>
  </parent>
  <artifactId>child-b-2</artifactId>
  <version>1.2.2</version>
  <packaging>jar</packaging>
  <name>ChildB2</name>
  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>child-a-2</artifactId>
    </dependency>
  </dependencies>
</project>

root/child-b/child-b-2/target/pom-transformed.xml

<?xml version="1.0" encoding="UTF-8"?>
<project>
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>net.example</groupId>
    <artifactId>child-b</artifactId>
    <version>1.2.0</version>
  </parent>
  <artifactId>child-b-2</artifactId>
  <version>1.2.2</version>
  <packaging>jar</packaging>
  <name>ChildB2</name>
  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>child-a-2</artifactId>
      <version>1.1.2</version>
    </dependency>
  </dependencies>
</project>