Skip to content
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

Resolves #855: Set should evaluate expressions #856

Merged
merged 1 commit into from
Dec 17, 2022

Conversation

andrzejj0
Copy link
Contributor

Fixing a regression after #799

The premise of that PR was that the mojo was updating every file if it did not find any match anywhere. This made the mojo update files where e.g. the version was specified as a parameter.

The fix does it differently -- by resolving parameters and checking if they match the artifact coordinates.

@andrzejj0
Copy link
Contributor Author

@slawekjaranowski please review

@andrzejj0
Copy link
Contributor Author

@pzygielo @slachiewicz @slawekjaranowski do you think there might be other corner cases to check here?

@pzygielo
Copy link
Contributor

@ajarmoniuk thanks for asking, but I'm not advanced user of versions-m-p nor I know the codebase well.
It looks that feedback from community is pretty fast though 😄

@andrzejj0
Copy link
Contributor Author

Sławek's question is valid though -- perhaps this PR is not needed after all.
On the other hand, it does fix the issue :)

@slawekjaranowski
Copy link
Member

a Corner cases from https://maven.apache.org/maven-ci-friendly.html

Property as:

 <properties>
    <revision>1.0.0-${buildNumber}-SNAPSHOT</revision>
  </properties>

version with multiple properties:

<version>${revision}${sha1}${changelist}</version>

Multi Module example

@andrzejj0
Copy link
Contributor Author

@slawekjaranowski added these corner cases

@slawekjaranowski slawekjaranowski linked an issue Dec 16, 2022 that may be closed by this pull request
@slawekjaranowski slawekjaranowski added this to the next-release milestone Dec 16, 2022
@slawekjaranowski
Copy link
Member

On more test will be appreciable:

Parent with property:

 <parent>
    <groupId>org.apache.maven.ci</groupId>
    <artifactId>ci-parent</artifactId>
    <version>${revision}</version>
  </parent>

@andrzejj0
Copy link
Contributor Author

Assuming you meant a parent with a property with a child module -- added.

@slawekjaranowski slawekjaranowski merged commit a487771 into mojohaus:master Dec 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

${revision} not being updated
3 participants