-
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
Fix Profile Interpolation bug #114
Changes from all commits
3b26719
3292034
c6abd71
3fa9e21
6819696
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,9 @@ public enum ElementHandling | |
keep, | ||
|
||
/** Remove the element entirely so it will not be present in flattened POM. */ | ||
remove | ||
remove, | ||
|
||
/** Take the element untouched from the original POM. Fix for {@link #keep} */ | ||
keepRaw | ||
Comment on lines
+52
to
+53
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. interesting. So actually There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The problem that arose for me was that the configuration in (active) profiles was interpolated, specifically And I did not invent anything, just rebased it. ^^ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Without wanting to be rude, but the overall direction of the original PR-code is rather being a work-around that being a real fix :D I guess the work remaining now is to fix the underlying issues so the workarounds ( |
||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,8 +77,12 @@ public enum FlattenMode | |
/** Only resolves variables revision, sha1 and changelist. Keeps everything else. | ||
* See <a href="https://maven.apache.org/maven-ci-friendly.html">Maven CI Friendly</a> for further details. | ||
*/ | ||
resolveCiFriendliesOnly; | ||
resolveCiFriendliesOnly, | ||
|
||
/** | ||
* Fix for {@link #resolveCiFriendliesOnly} | ||
*/ | ||
version; | ||
Comment on lines
+82
to
+85
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So if this is a "fix" for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just kept it during rebase, no other reasons from my side. ^^ |
||
|
||
/** | ||
* @return the {@link FlattenDescriptor} defined by this {@link FlattenMode}. | ||
|
@@ -147,6 +151,34 @@ public FlattenDescriptor getDescriptor() | |
descriptor.setUrl( ElementHandling.interpolate ); | ||
descriptor.setVersion( ElementHandling.resolve ); | ||
break; | ||
case version: | ||
descriptor.setBuild(ElementHandling.keepRaw); | ||
descriptor.setCiManagement(ElementHandling.keepRaw); | ||
descriptor.setContributors(ElementHandling.keepRaw); | ||
descriptor.setDependencies(ElementHandling.keepRaw); | ||
descriptor.setDependencyManagement(ElementHandling.keepRaw); | ||
descriptor.setDescription(ElementHandling.keepRaw); | ||
descriptor.setDevelopers(ElementHandling.keepRaw); | ||
descriptor.setDistributionManagement(ElementHandling.keepRaw); | ||
descriptor.setInceptionYear(ElementHandling.keepRaw); | ||
descriptor.setIssueManagement(ElementHandling.keepRaw); | ||
descriptor.setLicenses(ElementHandling.keepRaw); | ||
descriptor.setMailingLists(ElementHandling.keepRaw); | ||
descriptor.setModules(ElementHandling.keepRaw); | ||
descriptor.setName(ElementHandling.keepRaw); | ||
descriptor.setOrganization(ElementHandling.keepRaw); | ||
descriptor.setParent(ElementHandling.resolve); | ||
descriptor.setPluginManagement(ElementHandling.keepRaw); | ||
descriptor.setPluginRepositories(ElementHandling.keepRaw); | ||
descriptor.setPrerequisites(ElementHandling.keepRaw); | ||
descriptor.setProfiles(ElementHandling.keepRaw); | ||
descriptor.setProperties(ElementHandling.keepRaw); | ||
descriptor.setReporting(ElementHandling.keepRaw); | ||
descriptor.setRepositories(ElementHandling.keepRaw); | ||
descriptor.setScm(ElementHandling.keepRaw); | ||
descriptor.setUrl(ElementHandling.keepRaw); | ||
descriptor.setVersion(ElementHandling.resolve); | ||
break; | ||
case clean: | ||
// nothing to do... | ||
break; | ||
|
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.
Please do not missuse existing ITs to test a new feature. You would need to create a new integration test instead.
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.
IMHO we should either "fix" the existing mode, or if we keep it create a new IT for
version
mode.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 per #114 (comment)
resolveCiFriendlies
should be fixed. :)