Skip to content

Commit 0ed8848

Browse files
Use recent version of plugin in README, document new inclusions/exclusions
1 parent 888c9aa commit 0ed8848

File tree

1 file changed

+29
-2
lines changed

1 file changed

+29
-2
lines changed

README.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Usage: Add the following plugin to your POM:
1212
<dependency>
1313
<groupId>de.andrena.tools.nopackagecycles</groupId>
1414
<artifactId>no-package-cycles-enforcer-rule</artifactId>
15-
<version>1.0.8</version>
15+
<version>1.0.9</version>
1616
</dependency>
1717
</dependencies>
1818
<executions>
@@ -32,7 +32,7 @@ Usage: Add the following plugin to your POM:
3232
</plugin>
3333
```
3434

35-
If you want to exclude tests from cycle checking you can use the parameter `includeTests` which is set to true by default:
35+
If you want to exclude tests from cycle checking, you can use the parameter `includeTests` which is set to true by default:
3636
```xml
3737
...
3838
<rules>
@@ -41,7 +41,34 @@ If you want to exclude tests from cycle checking you can use the parameter `incl
4141
</NoPackageCyclesRule>
4242
</rules>
4343
...
44+
```
45+
46+
If you want to exclude packages or restrict check to certain packages only, you can use `includedPackages` or `excludedPackages`:
47+
48+
**:warning: only use this, if there is no other way! Once there are exceptions, the connection between those excluded packages will grow stronger and stronger, without notice!**
4449

50+
```xml
51+
...
52+
<rules>
53+
<NoPackageCyclesRule implementation="de.andrena.tools.nopackagecycles.NoPackageCyclesRule">
54+
<includedPackages>
55+
<includedPackage>myapp.code.good</includedPackage>
56+
</includedPackages>
57+
</NoPackageCyclesRule>
58+
</rules>
59+
...
60+
```
61+
62+
```xml
63+
...
64+
<rules>
65+
<NoPackageCyclesRule implementation="de.andrena.tools.nopackagecycles.NoPackageCyclesRule">
66+
<excludedPackages>
67+
<excludedPackage>myapp.code.bad</excludedPackage>
68+
</excludedPackages>
69+
</NoPackageCyclesRule>
70+
</rules>
71+
...
4572
```
4673

4774

0 commit comments

Comments
 (0)