See my comments inline below.

On Mon, Jul 3, 2023 at 6:33 PM Ralph Goers <ralph.go...@dslextreme.com>
wrote:
> While I have no issue with the logic of what is being done I do object to
using BeanShell to do it. This smacks of going back to Ant/Make and
“rolling your own”. It is also way too tempting for people to just go and
modify the script since it is right there in the pom.
>
> It also looks like the Script is basically Java code, so converting that
to a Maven Plugin should be easy.

Let's assume we placed this logic into `logging-parent` POM (e.g., in a
plugin `<execution>` with a dedicated ID) and other Java projects of ours
using it (e.g., by binding the plugin execution to a certain Maven phase by
referring to its ID). If one figures out a customization is needed to
address a certain need, they can do two things:

   1. [structural fix] adapt the BeanShell in `logging-parent` POM
   accordingly and cut a release
   2. [temporary fix] copy-paste the BeanShell and fix it inline

I suppose you are afraid of the latter.

> The regex in the script is hard-coded. We also don’t currently include
all the binaries produced (on purpose). As a Maven Plugin it would be easy
to provide the configuration to supply/override the regex and to provide
artifacts to exclude.

It is trivial. We can put it in a Maven property, use the property in the
script, and `logging-parent` POM consumers can simply override the property.

Reply via email to