<project root="true" xmlns="http://maven.apache.org/POM/4.1.0">
  <groupId>org.my.group</groupId>
  <artifactId>parent</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>pom</packaging>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>2.0.9</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <profiles>
    <profile>
      <id>test-profile</id>
      <activation>
        <condition>${project.artifactId} == 'parent'</condition>
      </activation>
      <dependencies>
        <dependency>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-api</artifactId>
        </dependency>
      </dependencies>
    </profile>
  </profiles>

</project>
