-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Use ExternalRules enforcer rule #27294
Conversation
1a8aaed
to
c254ac3
Compare
6320bd2
to
839e53b
Compare
This comment has been minimized.
This comment has been minimized.
839e53b
to
e750bf8
Compare
This comment has been minimized.
This comment has been minimized.
e750bf8
to
c9ebaa3
Compare
This comment has been minimized.
This comment has been minimized.
c9ebaa3
to
f1d0fdd
Compare
This comment has been minimized.
This comment has been minimized.
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.
Nice. I added two comments. Can we discuss them?
<!-- | ||
Supported Maven versions, interpreted as a version range (Also defined in build-parent) | ||
--> | ||
<supported-maven-versions>[3.6.2,)</supported-maven-versions> |
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.
I'm not sure it makes sense to define this one here. Rationale: the supported Maven version really depends on the project you are currently building and Quarkus has nothing to do with it.
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.
I see, isn't that important for our Maven plugins?
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.
I'd be interested to get <supported-maven-versions>
in Camel Quarkus. I think there will inevitably be entries in this rules file that we won't be wanting to enforce. A XSLT pre-filtering will solve all such issues.
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.
What if we split the rules into several files (one for each rule type)?
e.g.
quarkus-require-java-version.xml
;quarkus-require-maven-version.xml
;quarkus-banned-dependencies.xml
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.
What if we split the rules into several files
Hm... how do I get notified that there is a new rule file?
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.
We could still have a quarkus-default.xml
with <enforcerRules>
to each of these individual files which if you use it you don't need to bother about new rule files.
<rules> | ||
<dependencyConvergence/> | ||
<requireJavaVersion> | ||
<version>[${maven.compiler.release},)</version> |
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.
Same for this one. I think I would refrain from adding it here.
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.
I am not 100% sure about this to be honest. If not here, I'd expect that at least this rule would need to be included in each project, which may lead to values that are not expected in Quarkus (eg. Extensions being compiled/released using Java 17+ instead of 11)
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.
Same as above: I'd be interested to get <supported-maven-versions>
in Camel Quarkus.
f2903f9
to
27a6be3
Compare
This comment has been minimized.
This comment has been minimized.
3a41508
to
84e77da
Compare
This comment has been minimized.
This comment has been minimized.
84e77da
to
1220162
Compare
This comment has been minimized.
This comment has been minimized.
<!-- | ||
Supported Maven versions, interpreted as a version range (Also defined in build-parent) | ||
--> | ||
<supported-maven-versions>[3.6.2,)</supported-maven-versions> |
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.
If we move this to the global parent pom, wouldn't it be available everywhere?
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.
What global parent pom are you talking about? quarkus-enforcer-rules
has jboss-parent
as the parent because it's an independent project
...nt-projects/enforcer-rules/src/main/resources/enforcer-rules/quarkus-banned-dependencies.xml
Show resolved
Hide resolved
- 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
1220162
to
ce2b969
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.
I'll deal with adapting the Jakarta script.
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 and will be migrated to the maven-enforcer-plugin upstream
repository in this PR: