Preserve custom PomFile and deployToLocal through var expansion#62
Open
copart-jafloyd wants to merge 15 commits into
Open
Preserve custom PomFile and deployToLocal through var expansion#62copart-jafloyd wants to merge 15 commits into
copart-jafloyd wants to merge 15 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I tried to use the Pom File setting on an artifact, but it had no effect.
The
TokenExpander.expandmethod is the source of the bug because it does not preserve/copy the user-providedpomFilevalue. In fixing that, I also noticed thatdeployToLocalwas also not preserved, so I included that as well.The custom pom file feature was introduced in #43 with 2.0.0, but it looks like the var expansion feature was added after the pomFile feature, so the pomFile was inadvertently missed.
There are no Jira or GitHub issues for this afaik.
Testing done
I just installed and successfully tested this build in my Jenkins instance: https://ci.jenkins.io/job/Plugins/job/repository-connector-plugin/job/PR-61/2/artifact/target/repository-connector.hpi In my test, the custom pom file was deploted correctly.
I added some basic unit tests for TokenExpander. Note that I did not test actual var expansion; I only tested that vars are preserved.
Submitter checklist