-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MENFORCER-422] Added externalRules rule #180
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be great, thanks @gastaldi! Some comments inline.
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.
maven-enforcer-plugin/src/it/projects/descriptors-local-always-pass/pom.xml
Outdated
Show resolved
Hide resolved
enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/Descriptors.java
Outdated
Show resolved
Hide resolved
enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/Descriptors.java
Outdated
Show resolved
Hide resolved
@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. |
Yes, I know, but it is a sh** lot of XML that I hoped to be able to avoid :) |
606b254
to
abc34f5
Compare
2d693c8
to
cfb2511
Compare
enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/ExternalRules.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks great!
I made one JavaDoc suggestion inline.
Otherwise, I wonder whether there is any Enforcer end user docs, where an externalRules
example could be added?
e83aef4
to
27f5283
Compare
I added an example doc in the generated site |
- Fixes quarkusio#24880 This moves the rules to an external rule file to allow reusing enforcer rules in another modules. For more information: https://github.com/gastaldi/enforcer-rules#externalrules PS: The ExternalRules rule is tracked in [MENFORCER-422](https://issues.apache.org/jira/browse/MENFORCER-422) will be migrated in the maven-enforcer-plugin upstream repository in this PR: - apache/maven-enforcer#180
- Fixes #24880 This moves the rules to an external rule file to allow reusing enforcer rules in another modules. For more information: https://github.com/gastaldi/enforcer-rules#externalrules PS: The ExternalRules rule is tracked in [MENFORCER-422](https://issues.apache.org/jira/browse/MENFORCER-422) will be migrated to the maven-enforcer-plugin upstream repository in this PR: - apache/maven-enforcer#180
- Fixes quarkusio#24880 This moves the rules to an external rule file to allow reusing enforcer rules in another modules. For more information: https://github.com/gastaldi/enforcer-rules#externalrules PS: The ExternalRules rule is tracked in [MENFORCER-422](https://issues.apache.org/jira/browse/MENFORCER-422) will be migrated to the maven-enforcer-plugin upstream repository in this PR: - apache/maven-enforcer#180
- Fixes quarkusio#24880 This moves the rules to an external rule file to allow reusing enforcer rules in another modules. For more information: https://github.com/gastaldi/enforcer-rules#externalrules PS: The ExternalRules rule is tracked in [MENFORCER-422](https://issues.apache.org/jira/browse/MENFORCER-422) will be migrated to the maven-enforcer-plugin upstream repository in this PR: - apache/maven-enforcer#180
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @gastaldi, some small docs suggestions inline.
66d4717
to
77c2a95
Compare
- Fixes quarkusio#24880 This moves the rules to an external rule file to allow reusing enforcer rules in another modules. For more information: https://github.com/gastaldi/enforcer-rules#externalrules PS: The ExternalRules rule is tracked in [MENFORCER-422](https://issues.apache.org/jira/browse/MENFORCER-422) will be migrated to the maven-enforcer-plugin upstream repository in this PR: - apache/maven-enforcer#180
- Fixes quarkusio#24880 This moves the rules to an external rule file to allow reusing enforcer rules in another modules. For more information: https://github.com/gastaldi/enforcer-rules#externalrules PS: The ExternalRules rule is tracked in [MENFORCER-422](https://issues.apache.org/jira/browse/MENFORCER-422) will be migrated to the maven-enforcer-plugin upstream repository in this PR: - apache/maven-enforcer#180
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, thanks a lot, @gastaldi !
Would you like to review, @michael-o ? Otherwise, I could merge. |
Co-authored-by: Peter Palaga <[email protected]>
77c2a95
to
7646940
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beyond those I have no objections. I will leave the merge to your judgement.
- Fixes quarkusio#24880 This moves the rules to an external rule file to allow reusing enforcer rules in another modules. For more information: https://github.com/gastaldi/enforcer-rules#externalrules PS: The ExternalRules rule is tracked in [MENFORCER-422](https://issues.apache.org/jira/browse/MENFORCER-422) will be migrated to the maven-enforcer-plugin upstream repository in this PR: - apache/maven-enforcer#180
Thanks, @gastaldi ! |
@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. |
Thanks for the info @michael-o ! |
- Fixes quarkusio#24880 This moves the rules to an external rule file to allow reusing enforcer rules in another modules. For more information: https://github.com/gastaldi/enforcer-rules#externalrules PS: The ExternalRules rule is tracked in [MENFORCER-422](https://issues.apache.org/jira/browse/MENFORCER-422) will be migrated to the maven-enforcer-plugin upstream repository in this PR: - apache/maven-enforcer#180
- Fixes quarkusio#24880 This moves the rules to an external rule file to allow reusing enforcer rules in another modules. For more information: https://github.com/gastaldi/enforcer-rules#externalrules PS: The ExternalRules rule is tracked in [MENFORCER-422](https://issues.apache.org/jira/browse/MENFORCER-422) will be migrated to the maven-enforcer-plugin upstream repository in this PR: - apache/maven-enforcer#180
- Fixes quarkusio#24880 This moves the rules to an external rule file to allow reusing enforcer rules in another modules. For more information: https://github.com/gastaldi/enforcer-rules#externalrules PS: The ExternalRules rule is tracked in [MENFORCER-422](https://issues.apache.org/jira/browse/MENFORCER-422) will be migrated to the maven-enforcer-plugin upstream repository in this PR: - apache/maven-enforcer#180
- Fixes quarkusio#24880 This moves the rules to an external rule file to allow reusing enforcer rules in another modules. For more information: https://github.com/gastaldi/enforcer-rules#externalrules PS: The ExternalRules rule is tracked in [MENFORCER-422](https://issues.apache.org/jira/browse/MENFORCER-422) will be migrated to the maven-enforcer-plugin upstream repository in this PR: - apache/maven-enforcer#180
- Fixes quarkusio#24880 This moves the rules to an external rule file to allow reusing enforcer rules in another modules. For more information: https://github.com/gastaldi/enforcer-rules#externalrules PS: The ExternalRules rule is tracked in [MENFORCER-422](https://issues.apache.org/jira/browse/MENFORCER-422) will be migrated to the maven-enforcer-plugin upstream repository in this PR: - apache/maven-enforcer#180
- Fixes quarkusio#24880 This moves the rules to an external rule file to allow reusing enforcer rules in another modules. For more information: https://github.com/gastaldi/enforcer-rules#externalrules PS: The ExternalRules rule is tracked in [MENFORCER-422](https://issues.apache.org/jira/browse/MENFORCER-422) will be migrated to the maven-enforcer-plugin upstream repository in this PR: - apache/maven-enforcer#180
- Fixes quarkusio#24880 This moves the rules to an external rule file to allow reusing enforcer rules in another modules. For more information: https://github.com/gastaldi/enforcer-rules#externalrules PS: The ExternalRules rule is tracked in [MENFORCER-422](https://issues.apache.org/jira/browse/MENFORCER-422) will be migrated to the maven-enforcer-plugin upstream repository in this PR: - apache/maven-enforcer#180
- Fixes quarkusio#24880 This moves the rules to an external rule file to allow reusing enforcer rules in another modules. For more information: https://github.com/gastaldi/enforcer-rules#externalrules PS: The ExternalRules rule is tracked in [MENFORCER-422](https://issues.apache.org/jira/browse/MENFORCER-422) will be migrated to the maven-enforcer-plugin upstream repository in this PR: - apache/maven-enforcer#180
- Fixes quarkusio#24880 This moves the rules to an external rule file to allow reusing enforcer rules in another modules. For more information: https://github.com/gastaldi/enforcer-rules#externalrules PS: The ExternalRules rule is tracked in [MENFORCER-422](https://issues.apache.org/jira/browse/MENFORCER-422) will be migrated to the maven-enforcer-plugin upstream repository in this PR: - apache/maven-enforcer#180
Following this checklist to help us incorporate your
contribution quickly and easily:
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.
[MENFORCER-XXX] - Fixes bug in ApproximateQuantiles
,where you replace
MENFORCER-XXX
with the appropriate JIRA issue. Best practiceis to use the JIRA issue title in the pull request title and in the first line of the
commit message.
mvn clean verify
to make sure basic checks pass. A more thorough check willbe performed on your pull request automatically.
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.
I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004
In any other case, please file an Apache Individual Contributor License Agreement.