maven-enforcer icon indicating copy to clipboard operation
maven-enforcer copied to clipboard

[MENFORCER-422] Added externalRules rule

Open gastaldi opened this issue 3 years ago • 3 comments
trafficstars

Following this checklist to help us incorporate your contribution quickly and easily:

  • [x] Make sure there is a JIRA issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes.
  • [x] Each commit in the pull request should have a meaningful subject line and body.
  • [x] Format the pull request title like [MENFORCER-XXX] - Fixes bug in ApproximateQuantiles, where you replace MENFORCER-XXX with the appropriate JIRA issue. Best practice is to use the JIRA issue title in the pull request title and in the first line of the commit message.
  • [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • [x] Run mvn clean verify to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
  • [x] You have run the integration tests successfully (mvn -Prun-its clean verify).

If your pull request is about ~20 lines of code you don't need to sign an Individual Contributor License Agreement if you are unsure please ask on the developers list.

To make clear that you license your contribution under the Apache License Version 2.0, January 2004 you have to acknowledge this by using the following check-box.

gastaldi avatar Aug 11 '22 17:08 gastaldi

Another important feature for the future: be able to customize the descriptor before processing, ideally through an XSLT. Motivation: some artifacts that are banned in Quarkus might be required in Camel Quarkus. With XSLT I could remove those specific ones from Quarkus descriptor and keep the rest.

@ppalaga because other transformation steps might be needed and because I wanted to keep it simple, I think this would be better served if the transformed file were already available as a separate dependency (eg. you could use the Maven dependency plugin to unpack the original rule XML, transform and include the transformed file in another dependency with another GAV), but we can discuss about that.

gastaldi avatar Aug 11 '22 20:08 gastaldi

you could use the Maven dependency plugin to unpack the original rule XML, transform and include the transformed file in another dependency with another GAV), but we can discuss about that.

Yes, I know, but it is a sh** lot of XML that I hoped to be able to avoid :)

ppalaga avatar Aug 11 '22 20:08 ppalaga

Otherwise, I wonder whether there is any Enforcer end user docs, where an externalRules example could be added?

I added an example doc in the generated site

gastaldi avatar Aug 15 '22 14:08 gastaldi

Would you like to review, @michael-o ? Otherwise, I could merge.

ppalaga avatar Aug 17 '22 09:08 ppalaga

Thanks, @gastaldi !

ppalaga avatar Aug 19 '22 08:08 ppalaga

@michael-o do you happen to know whether an Enforcer release is planned already? Not sure where to look for that kind of info, although I am a committer.

ppalaga avatar Aug 19 '22 10:08 ppalaga

@michael-o do you happen to know whether an Enforcer release is planned already? Not sure where to look for that kind of info, although I am a committer.

We don't publish any plans since we are volunteers.

First of all, please complete the accompanying JIRA issue. Second, someone needs to tackle https://issues.apache.org/jira/browse/MENFORCER-407 then we can consider a release.

michael-o avatar Aug 19 '22 10:08 michael-o

Thanks for the info @michael-o !

ppalaga avatar Aug 19 '22 11:08 ppalaga