Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: 2 days ago
JSON representation

A Maven Enforcer Rule that allows reusing Enforcer Rules by reading rule descriptor files

Awesome Lists containing this project

README

        

# Enforcer Rules

## ExternalRules
An Enforcer Rule that allows reusing Enforcer Rules by reading rule descriptor files

This 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