maven-release
maven-release copied to clipboard
Simplify PerformReleaseMojo
@kwin @nielsbasjes Have a look whether this makes sense to you. I am not 100% certain about this. It feels awkward that this mojo does not extend from AbstractScmReleaseMojo, but still from AbstractReleaseMojo since other release mojos do so. If this isn't right a comment should be added to the code explaning why.
This affects #133 and #134.
@slavino Have a look also.
@kwin @nielsbasjes @slavino I need a review to continue with other open issues.
I had a look at this code and I agree that there is indeed some duplication that can be simplified this way. As the entire build pipeline passes I think the code change is good. The only "effect" is that you reduce the code duplication (good) and the PerformReleaseMojo will have more config settings available than needed.
I agree with @nielsbasjes that a lot more parameters are now exposed for goal perform which are not useful. Maybe the AbstractScmReleaseMojo would need a split up between AbstractScmReadReleaseMojo and AbstractScmWriteReleaseMojo (inheriting from the former).
I agree with @nielsbasjes that a lot more parameters are now exposed for goal
performwhich are not useful. Maybe the AbstractScmReleaseMojo would need a split up betweenAbstractScmReadReleaseMojoandAbstractScmWriteReleaseMojo(inheriting from the former).
As part of #149, this change could possibly be introduced? Unless @michael-o wishes to do that
I'm wondering what the real downside (if any) is of having some properties available that are not used. Apparently (as shown in #149) some of those are actually missing and should be made available.
For me the 2 phase release process is already complicated enough. Exposing unused parameters for the perform goal in its documentation (https://maven.apache.org/maven-release/maven-release-plugin/perform-mojo.html) will make it even harder to grasp what is going on. Also I expect a lot of wrong reports due to the unused (but documented) parameters.
I agree with @nielsbasjes that a lot more parameters are now exposed for goal
performwhich are not useful. Maybe the AbstractScmReleaseMojo would need a split up betweenAbstractScmReadReleaseMojoandAbstractScmWriteReleaseMojo(inheriting from the former).
This totally makes sense.