Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gastaldi/enforcer-rules
A Maven Enforcer Rule that allows reusing Enforcer Rules by reading rule descriptor files
https://github.com/gastaldi/enforcer-rules
Last synced: 5 days ago
JSON representation
A Maven Enforcer Rule that allows reusing Enforcer Rules by reading rule descriptor files
- Host: GitHub
- URL: https://github.com/gastaldi/enforcer-rules
- Owner: gastaldi
- License: apache-2.0
- Created: 2022-08-10T18:40:08.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-05T18:39:09.000Z (over 2 years ago)
- Last Synced: 2024-11-08T09:47:37.548Z (about 2 months ago)
- Language: Java
- Homepage:
- Size: 88.9 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Enforcer Rules
## ExternalRules
An Enforcer Rule that allows reusing Enforcer Rules by reading rule descriptor filesThis rule supports rule descriptors to allow reusing enforcer rules as maven dependencies
See https://issues.apache.org/jira/browse/MENFORCER-422 for more detail
### Usage
Add the following to your pom.xml:
```xml
org.apache.maven.plugins
maven-enforcer-plugin
3.1.0
com.github.gastaldi
enforcer-rules
0.0.1
enforce
classpath:enforcer-rules/my-rules.xml
enforce
```
In the example above `classpath:enforcer-rules/my-rules.xml` is an XML file in `enforcer-rules/my-rules.xml` existing in the plugin dependencies.
The `enforcer-rules/my-rules.xml` has the following content:
```xml
11
[3.6.2,)
org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec
jakarta.xml.bind:jakarta.xml.bind-api:*:*:test
```
Heavily based on https://maven.apache.org/plugins/maven-assembly-plugin/examples/sharing-descriptors.html