mojohaus / flatten-maven-plugin

Flatten Maven Plugin

Home Page:https://www.mojohaus.org/flatten-maven-plugin/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dependencyManagement ... don't work.

crazyweeds opened this issue · comments

the result :

</dependencyManagement>            
           <dependency>
                <groupId>com.xx</groupId>
                <artifactId>rhythm-common</artifactId>
                <version>${revision}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

I expect this to be the result.

</dependencyManagement>            
           <dependency>
                <groupId>com.xx</groupId>
                <artifactId>rhythm-common</artifactId>
                <version>1.0</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

plugin config.

<plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>flatten-maven-plugin</artifactId>
                <version>1.3.0</version>
                <configuration>
                    <flattenMode>resolveCiFriendliesOnly</flattenMode>
                    <updatePomFile>true</updatePomFile>
                    <flattenDependencyMode>all</flattenDependencyMode>
                </configuration>
                <executions>
                    <execution>
                        <id>flatten</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>flatten</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>flatten.clean</id>
                        <phase>clean</phase>
                        <goals>
                            <goal>clean</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

What would I do?

you can try with:

                <pomElements>
                    <dependencyManagement>interpolate</dependencyManagement>
                </pomElements>