A small stopgap regarding extensibility/inheritance #342
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Could you please change the variables near the top, the ones specifying launch4j group/artifact,
so they're non-static non-final?
Rationale: it doesn't matter in normal use, but it hardcodes the plugin to specific launch4j
artifact. With the change it would be possible to extend the plugin declaring it as dependency,
instead of having to fork it as it is now. Plenty of things can be hacked into via reflection,
but not static final fields, there were some hacks but they aren't working in recent versions
of Java.
Right now if you change the dependency to a fork of launch4j, everything just stops working.
With this it would be enough to, at minimum, change these fields in constructor via reflection,
and in an extending class, with no further changes required to the plugin itself, and with a very
high chance it will work with the future versions of the plugin (with no guarantees obviously,
since they're still private so not part of the api).
I have some other more, no pun intended, extensive ideas regarding that subject, but this is the
minimum so it can be used that way via dependency and inheritance instead of full forking.