versions
versions copied to clipboard
caching repeated call of methods
Just a heads up ;)
I'm preparing a chunky PR unifying those renderers. I've introduced a common model and managed to largely unify them. Work not done since there's still some area of improvement.
https://github.com/mojohaus/versions-maven-plugin/compare/master...ajarmoniuk:versions-maven-plugin:doxia-renderers
ok i'll put my work on halt until then, my needs would be being able to access your model in any report method. that would help me filter out things for my other pr
I think this PR is made redundant by #749
I think this PR is made redundant by #749
That's hopefully ok, let me rework my PR and see if i need any additional refactoring.
We chatted about some reworks, there : https://github.com/mojohaus/versions-maven-plugin/issues/454#issuecomment-1262817203
my suggestions seems still relevant, i am eager to do the job, but i'd like feedback on the idea from you @ajarmoniuk or anybody :)
about improvements on -DallowAnyUpdates=false -DallowMajorUpdates=false : allowMinor allowMinor etc could be replaced by an enum with NULL/EMPTY equivalent to MAJOR, examples -DupdateScope=major -DupdateUpTo=major
Subinc | Inc | Minor | Major | |
---|---|---|---|---|
YES | YES | YES | YES | Major/Any/All/Empty/Null/ |
YES | YES | YES | no | Minor/MinorOrLess |
YES | YES | no | no | Inc/IncOrLess |
YES | no | no | no | SubInc/SubincOnly |
others are a bit more complicated, i would like to introduce the possibility to disallow previews :
Snapshots | Previews : Milestones RCs |
Releases | |
---|---|---|---|
YES | YES | YES | Any/All/Empty/Null |
YES | no | no | Snapshots Only |
no | YES | no | Previews Only |
no | no | YES | Releases Only |
no | YES | YES | All but Snapshots |
YES | no | YES | All but Previews |
YES | YES | no | All but Releases |
I think this PR is made redundant by #749
That's hopefully ok, let me rework my PR and see if i need any additional refactoring.
We chatted about some reworks, there : #454 (comment)
my suggestions seems still relevant, i am eager to do the job, but i'd like feedback on the idea from you @ajarmoniuk or anybody :)
about improvements on -DallowAnyUpdates=false -DallowMajorUpdates=false : allowMinor allowMinor etc could be replaced by an enum with NULL/EMPTY equivalent to MAJOR, examples -DupdateScope=major -DupdateUpTo=major Subinc Inc Minor Major YES YES YES YES Major/Any/All/Empty/Null/ YES YES YES no Minor/MinorOrLess YES YES no no Inc/IncOrLess YES no no no SubInc/SubincOnly
others are a bit more complicated, i would like to introduce the possibility to disallow previews : Snapshots Previews : Milestones RCs Releases YES YES YES Any/All/Empty/Null YES no no Snapshots Only no YES no Previews Only no no YES Releases Only no YES YES All but Snapshots YES no YES All but Previews YES YES no All but Releases
This is also largely handled. Since the interface should not have been changed (otherwise this would constitute a big change to the users and would probably cause a lot of new bug reports), I have simply implemented a change request that the allowMinorUpdates
being false should imply allowMajorUpdates
false. Which also implies allowIncrementalUpdates
false implying both allowMajorUpdates
and allowMinorUpdates
equal to false.
Internally we represent this as Optional<Segment>
across the board. Which is basically the enum we wanted, with all updates represented as empty()
. Arguable whether this shouldn't be made a separate value of the Segment
, in my opinion it's not.
okay thanks for the quick reply,
let's not change theses flags for the users then.
back on the caching, i think i need some work on caching results on the property report
i'll try something
Still open to feedback before we merge this,
i would like to suggest the removal of all the NEXT labels in the HTML reports only the LATEST labels are usefull.
i would like to suggest the removal of all the OLDEST methods and replace calls by NEWEST this suggestion impacts the XML reports (tag lastVersion instead of nextVersion)
this should normally not impact the "useNext" Mojos
Thanks @slawekjaranowski