Skip to content

Mode resolveCiFriendliesOnly don't resolve variables in <dependency> and <dependenceManagement> in submodules. #422

@lowcasz

Description

@lowcasz

Plugin with mode resolveCiFriendliesOnly works in parent pom correctly, but in submodules it replace variables in parent and version tags, other occurences are ignored.

<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>maven-flatten-plugin.bug</groupId>
    <artifactId>parent</artifactId>
    <version>HERE-WORKS</version>
  </parent>
  <artifactId>demo</artifactId>
  <version>HERE-WORKS</version>
  <packaging>pom</packaging>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>maven-flatten-plugin.bug</groupId>
        <artifactId>dependency-management</artifactId>
        <version>${revision}</version><!------------------------------------- this place is not resolved -->
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>maven-flatten-plugin.bug</groupId>
      <artifactId>dependency</artifactId>
      <version>${revision}</version><!-------------------------------------- this place is not resolved -->
      <type>pom</type>
      <scope>import</scope>
    </dependency>
  </dependencies>
</project>

The bug demo and sample workaround is available here: https://github.com/lowcasz/maven-flatten-plugin-bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions