-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(manager/maven): Support variables for package replacements #34359
base: main
Are you sure you want to change the base?
feat(manager/maven): Support variables for package replacements #34359
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to make a significant change to results, including possibly adding duplicates, which seems unrelated to replacements
That's correct, but if a property is used multiple times, there may be already duplicates. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test changes show a lot of duplicate results, which is undesirable at best and potentially causes problems. Sorry but this solution is not acceptable
Just an example of a simple project with the following pom files: <project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.example</groupId>
<artifactId>parent</artifactId>
<version>1.0.0</version>
<properties>
<test.version>1.2.3</test.version>
</properties>
<dependencies>
<dependency>
<groupId>org.example</groupId>
<artifactId>test</artifactId>
<version>${test.version}</version>
</dependency>
</dependencies>
<modules>
<module>foo</module>
<module>bar</module>
</modules>
</project>
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.example</groupId>
<artifactId>parent</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>foo</artifactId>
<dependencies>
<dependency>
<groupId>org.example</groupId>
<artifactId>test</artifactId>
<version>${test.version}</version>
</dependency>
</dependencies>
</project>
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.example</groupId>
<artifactId>parent</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>bar</artifactId>
<dependencies>
<dependency>
<groupId>org.example</groupId>
<artifactId>test</artifactId>
<version>${test.version}</version>
</dependency>
</dependencies>
</project> The existing code gives the following:
We can see that the dependency With the proposed change the source
|
Changes
This should fix maven replacements if a shared variable name is in use.
Context
Closes #34088
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: