Trying this again as I have not seen my reply show up for moderation. On 2023/07/02 19:57:08 Volkan Yazıcı wrote: > *Abstract:* `log4j-tools` 0.4.0 release contains a `beanshell-maven-plugin` > block that created the distribution ZIP in a way that addresses all past > concerns of PMC, it is reusable by other projects without any changes, > integrates with `log4j-changelog-maven-plugin`, uses JGit to collect > sources, and composed of 79 lines of BeanShell script > <https://github.com/apache/logging-log4j-tools/blob/release/0.4.0/pom.xml#L467>
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. > . > > It is no secret that I have been spending quite some time on _perfecting_ > the `logging-log4j-tools` Maven and release infrastructure. I will soon be > breaking the `logging-log4j2` repository into multiple repositories, and > there I want to take the `l-l-tools` as reference. Hence, my push for the > simplest and reusable Maven+release infra there. > > `l-l-tools` has the simplest ASF-compliant releasing procedure > <https://github.com/apache/logging-log4j-tools/blob/release/0.4.0/RELEASING.adoc> > out there in the wild. Though my use of `git ls-files | sort | zip` to > generate "the distribution" ZIP has been a subject of certain discussions. > I share an exhaustive list of all the complaints so far: > > 1. `git ls-files | sort | zip` is not reproducible! > 2. `git ls-files | sort | zip` cannot be executed on Windows! > 3. Why do we package `.github`, `.asf.yaml`, etc. files that are not > relevant for the release in the distribution? > 4. The distribution must contain binaries, not only sources, since there > are people still living in 1998, downloading JARs from the ASF website, and > copy-pasting them into their servers. > 5. The distribution must contain the release notes, because... we have > been doing this for more than decade while releasing Log4j. > 6. Why don't we simply use `maven-assembly-plugin` just like we do in > Log4j? I don’t recall seeing any of these complaints, but ok. > > In `l-l-tools` 0.4.0 release, I have done something different, addressing > all these concerns and delivering even more! `l-l-tools` 0.4.0 release > contains a `beanshell-maven-plugin` block creating the distribution ZIP > such that > > - The entire logic is composed of 79 lines of BeanShell – including > import statements, comments, and empty lines! > - `RELEASE-NOTES.md` is generated from `src/changelog` and included in > the distribution ZIP. > - `git ls-files` output is obtained using JGit (in BeanShell) and > compressed in a reproducible & platform-independent way. > - JARs to be added to the distribution ZIP are matched using regex. 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. Ralph