-
Notifications
You must be signed in to change notification settings - Fork 85
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
Add new flattenMode called versionOnly #74
Conversation
As it seems travis is having some SSL handshake issues whilst downloading with java7. Most probably because in java7 the wrong TLS version is used by default. We might needs some hacking of |
BTW: Would the name |
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.
Thanks for your PR. Please consider my review suggestions.
descriptor.setRepositories( ElementHandling.keep ); | ||
descriptor.setScm( ElementHandling.keep ); | ||
descriptor.setUrl( ElementHandling.keep ); | ||
descriptor.setVersion( ElementHandling.expand ); |
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.
adding a break here would be more clean than an uncommented fallthrough.
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.
Will do.
fatjar, | ||
|
||
/** Only flattens the version field in pom. Keeps everything else. */ | ||
versionOnly; |
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.
as already commented: maybe onlyResolveVersion
or onlyExpandVersion
would be more self-explanatory.
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.
I will change that.
I played around with this a bit and while this is suitable for single module projects, it is not very good for multi module ones. In those the children might have variables in their parent-version or dependencies-dependency-version that should probably be resolved. |
This https://github.com/mojohaus/flatten-maven-plugin/compare/master...lasselindqvist:Issue-63?expand=1 shows my thoughts on the issue. I haven't tested the solution yet at all but the idea is to extend abstract class AbstractStringBasedModelInterpolator which does not resolve variables that are not revision, sha or changelist. Requires testing and cleaning up. |
I have a implementation for the CI friendly resolver and will publish once it and its integration test are all polished. It is based on replacing AbstractStringBasedModelInterpolator and StringSearchInterpolator to interpolate only the chosen variables. |
dc9c4ef
to
071277c
Compare
This PR has been closed but why ? It seems like the feature is not in an official branch yet... Am I wrong ? |
I am not totally sure why this is closed (and it looks like by me). Perhaps because I am rearranging my forks branches and making a new pull request from a different branch soon. |
I've noticed that rebasing the target branch for a pr will cause GitHub to
close that pr... maybe that's what occurred.
…On Sun, 23 Sep 2018, 11:56 lasselindqvist, ***@***.***> wrote:
I am not totally sure why this is closed (and it looks like by me).
Perhaps because I am rearranging my forks branches and making a new pull
request from a different branch soon.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#74 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA-9yYkIznXOcHYKx8ZgNMRrmDM9OYcZks5ud1rlgaJpZM4WA_ye>
.
|
Here you can find the new pull request #77 |
versionOnly keeps everything in the pom except the version element. Version is expanded. This is very helpful for the CI friendly workflow (https://maven.apache.org/maven-ci-friendly.html) where version contains something like.${revision}