You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maven replaces ${revision} version in POM when installing / deploying artifacts. However when using "jf mvn" it fails to replace the revision in the deployed pom to Artifactory
Current behavior
The published pom in the Artifactory ends up having POM containing ${revision} has version
Reproduction steps
Clone a sample maven project and update the artifacts to predefined variables (like {revision}) instead of actual value in the pom.xml file as shown here.
Deploy the project to the Artifactory using jf mvn
When we run the below command using the jf wrapper jf mvn --build-name=test --build-number=1 --detailed-summary -U -Drevision=1.0.0-SNAPSHOT clean install
The published pom in the Artifactory ends up having POM containing ${revision} has version
Whereas when we just use mvn without "jf" mvn -Drevision=1.0.0-SNAPSHOT clean deploy
The revision is replaced with the one passed as argument in the deployed pom to the Artifactory
Expected behavior
"jf mvn" should be able to resolve version in the published pom like just "mvn"
JFrog CLI version
latest
Operating system type and version
macOS
JFrog Artifactory version
SaaS latest
JFrog Xray version
No response
Attaching screenshots of deployed pom files to Artifactory.
When using mvn deploy
When using jf mvn
The text was updated successfully, but these errors were encountered:
This appears to be a problem with the jf mvn not considering (ie: ignoring) mvn extensions in .mvn/extensions.xml
Note that for this particular case, the unresolved variables, one could also use the flatten-maven-plugin to accomplish the same thing without relying on extensions.
I expect I'm effectively killing off any potential fix here by providing a work-around as they can now say "you just need to ..." as described above.
However, while I'm at it, let me propose an alternate fix that addresses both cases:
It would be nice to get the flatten-maven-plugin considered as something that could be applied by the jf mvn invoker such that one could provide a plugin cfg to jf mvn via a command line arg.
Or, to say it another way, allow the jf mvn invoker to inject additional maven plugins via XML fragments into the effective pom.
This way, for cases where one is using a common GitHub actions workflow, one can add this in one place to address the lack of maven extension processing that would otherwise need to be fixed in every single maven build cfg.
This would be a far less invasive fix than needing to embed the flatten-maven-plugin in every place where it is now needed.
Describe the bug
Maven replaces ${revision} version in POM when installing / deploying artifacts. However when using "jf mvn" it fails to replace the revision in the deployed pom to Artifactory
Current behavior
The published pom in the Artifactory ends up having POM containing ${revision} has version
Reproduction steps
Added the extension(https://github.com/jcgay/unique-revision-maven-filtering) which replaces the ${revision} version in POM to actual value to the pom.xml file in target folder when installing / deploying the artifacts.
Deploy the project to the Artifactory using jf mvn
When we run the below command using the jf wrapper
jf mvn --build-name=test --build-number=1 --detailed-summary -U -Drevision=1.0.0-SNAPSHOT clean install
The published pom in the Artifactory ends up having POM containing ${revision} has version
Whereas when we just use mvn without "jf"
mvn -Drevision=1.0.0-SNAPSHOT clean deploy
The revision is replaced with the one passed as argument in the deployed pom to the Artifactory
Expected behavior
"jf mvn" should be able to resolve version in the published pom like just "mvn"
JFrog CLI version
latest
Operating system type and version
macOS
JFrog Artifactory version
SaaS latest
JFrog Xray version
No response
Attaching screenshots of deployed pom files to Artifactory.
![Screenshot 2024-03-15 at 1 06 06 PM](https://private-user-images.githubusercontent.com/163888678/313772251-91eb2d5d-4439-4adc-ac8b-10f0ffa42be1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjEzOTcxMzQsIm5iZiI6MTcyMTM5NjgzNCwicGF0aCI6Ii8xNjM4ODg2NzgvMzEzNzcyMjUxLTkxZWIyZDVkLTQ0MzktNGFkYy1hYzhiLTEwZjBmZmE0MmJlMS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzE5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcxOVQxMzQ3MTRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xMzI0ZmM3OGZkYzEyYjFhZjI5ZjNlMjU5NGQ1OWEzZWRiZGZkZjQ0ZTQxNGMzMjIwNDRiMjEyNmMxZmE0MjgwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.mvGFFpsaqFvmBXT3mVLXIxKieidF_LeSkVVg326TjlY)
When using mvn deploy
When using jf mvn
![Screenshot 2024-03-15 at 1 04 37 PM](https://private-user-images.githubusercontent.com/163888678/313772501-9b12c510-7606-453d-96e3-28fe26d701bb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjEzOTcxMzQsIm5iZiI6MTcyMTM5NjgzNCwicGF0aCI6Ii8xNjM4ODg2NzgvMzEzNzcyNTAxLTliMTJjNTEwLTc2MDYtNDUzZC05NmUzLTI4ZmUyNmQ3MDFiYi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzE5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcxOVQxMzQ3MTRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03ZjhhMmEyMjMwZmRhNjQ1MzU2MDg4ZjM3YWU2YjE2N2ExMjRlZTY0OTFjNjEwMDBmMDdiNjViNzk5NGI0MWZjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.ckAAB602_Z9gY247mkx4RT9c5kNG9pv7gFV-vcHeaQk)
The text was updated successfully, but these errors were encountered: