-
Notifications
You must be signed in to change notification settings - Fork 835
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
Fixed false error thrown if parent pom version uses variable #7158
Conversation
java/maven.hints/src/org/netbeans/modules/maven/hints/pom/ParentVersionError.java
Outdated
Show resolved
Hide resolved
java/maven.hints/src/org/netbeans/modules/maven/hints/pom/ParentVersionError.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Achal Talati <achal.talati@oracle.com>
556d4b4
to
b1a7497
Compare
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.
good fix!
I don't know why this test is failing, I haven't changed anything in context of this test. |
happens sometimes, I restarted it. |
Hi sorry to join late. But ${revision} is reserved word, if ${my-revision} were used it's should warn that version is incorrect ${revision}, ${changelist}, and ${sha1} are the reserved versions as per https://maven.apache.org/docs/3.2.1/release-notes.html |
Oh sorry I didn't knew of this. So, anything apart from ${revision}, ${changelist}, and ${sha1} cannot be used as expression in version field? |
I'm not aware of others 'keyword' but if you use a random properties you will have warning
|
Yes, valid properties from here I think - https://github.com/apache/maven/blob/master/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/DefaultModelVersionProcessor.java#L43 Not sure best way to access that, or whether to code in the allowed values? |
maybe hardcoded + link to the github :p |
The above error is anyways misleading for any case. So, imo we can keep the change that is done in this PR as it is. ![]() |
When parent pom uses variable for defining version:
![image](https://private-user-images.githubusercontent.com/55803675/312801828-2136278a-1aaa-4fc0-b5ba-f5a3bb136b3b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA5MjMxODgsIm5iZiI6MTcyMDkyMjg4OCwicGF0aCI6Ii81NTgwMzY3NS8zMTI4MDE4MjgtMjEzNjI3OGEtMWFhYS00ZmMwLWI1YmEtZjVhM2JiMTM2YjNiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzE0VDAyMDgwOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQxYzM3MjFjOWVjNTBhZmFiMGM3MDUyZGM4NjRiMDgzMmI2NDcyMDRkN2RlZTc1NjY3YWVkMTY5MDE5NDcxODkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Bai9nro9eIgMlYU2U9qD4k1kIdwIF4QxaAbRbIdhlh4)
When child pom uses variable again for the parent version then it throws false error:
![image](https://private-user-images.githubusercontent.com/55803675/312801665-05103a54-04b0-4773-9778-488d1eaaef96.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA5MjMxODgsIm5iZiI6MTcyMDkyMjg4OCwicGF0aCI6Ii81NTgwMzY3NS8zMTI4MDE2NjUtMDUxMDNhNTQtMDRiMC00NzczLTk3NzgtNDg4ZDFlYWFlZjk2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzE0VDAyMDgwOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU5YjYyY2Y4M2JhMDE0NjFkN2U2ZWFmMDk5ZDNiMGUxMTI2YTRkNjA5MWJkNGFjZDcyZWU3MmVhZTRlNmNjNjAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.k4PoAwvc_gnyxXK9HgoM4lVYziQABhtVAn3i2JclXrE)
So, fixed the above mentioned issue in this PR.
Refer for more info: oracle/javavscode#95