-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Maven goal report-aggregate
should consider dependencies specified using version range
#658
Maven goal report-aggregate
should consider dependencies specified using version range
#658
Conversation
@Godin What do you think about this PR? Beside adding a test this looks good to me. |
…anges-in-report-aggregate
I've added an integration test heavily based on the |
@marchof to be honest every implementation of aggregate reports for Maven look like workaround/hack for inflexible lifecycle of Maven build. And so I don't like them in general as a source of user confusions, misconfigurations, etc. This change looks like a continuation of workarounds/hacking. Nevertheless couple of more constructive comments here and inline in changes:
I'm wondering why instead not simply update/extend |
depVersionAsRange = VersionRange.createFromVersionSpec(d.getVersion()); | ||
} catch (InvalidVersionSpecificationException e) { | ||
throw new IllegalStateException("Could not parse the version of the dependency even though Maven" + | ||
" could: " + d); |
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.
Can this ever happen?
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.
Should not, really, but InvalidVersionSpecificationException
is a checked exception, so there has to be something done about it...
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.
If I'm not mistaken, then we use throw new AssertionError(e)
for such things - e.g.
throw new AssertionError(e); |
Well, I've seen another version of the report aggreate it-test - it-report-aggregate-customization and so I thought this was the approach you take. I can merge it into the main it-test if you wish.. |
report-aggregate
should consider dependencies specified using version range
For the record: during testing I stumbled upon a fact that when reactor contains two modules with same
This looks acceptable to me - case seems rare, range can be narrowed/specified to select correct version from reactor. |
3d33f29
to
dd7bcf8
Compare
667e426
to
fb6c2e7
Compare
8671717
to
95f64e7
Compare
@metlos thank you for your contribution which is now recorded in changelog ❤️ |
Fixes #657.