Skip to content

Commit c915223

Browse files
Introduce headlines
1 parent 3764439 commit c915223

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
# no-package-cycles-enforcer-rule
2+
13
[![Build Status](https://travis-ci.org/andrena/no-package-cycles-enforcer-rule.svg)](https://travis-ci.org/andrena/no-package-cycles-enforcer-rule)
24

5+
## Documentation
6+
37
This Maven Enforcer Rule checks your project for package cycles. It fails the build if any package cycle is found, showing you the packages and classes involved in the cycle.
48

59
Usage: Add the following plugin to your POM:
@@ -32,6 +36,8 @@ Usage: Add the following plugin to your POM:
3236
</plugin>
3337
```
3438

39+
### Include test classes
40+
3541
If you want to exclude tests from cycle checking, you can use the parameter `includeTests` which is set to true by default:
3642
```xml
3743
...
@@ -43,6 +49,8 @@ If you want to exclude tests from cycle checking, you can use the parameter `inc
4349
...
4450
```
4551

52+
### Restrict scope
53+
4654
If you want to exclude packages or restrict check to certain packages only, you can use `includedPackages` or `excludedPackages`:
4755
**:warning: only use this, if there is no other way! Once there are exceptions, the connection between those excluded packages
4856
will grow stronger and stronger, without notice!**
@@ -70,8 +78,8 @@ will grow stronger and stronger, without notice!**
7078
...
7179
```
7280

81+
## See also
7382

74-
See also:
7583
* The original version by Daniel Seidewitz on [Stackoverflow](http://stackoverflow.com/questions/3416547/maven-jdepend-fail-build-with-cycles). Improved by showing all packages afflicted with cycles and the corresponding classes importing the conflicting packages.
7684
* [JDepend](https://github.com/clarkware/jdepend), the library being used to detect package cycles.
7785
* For more information about package cycles, see ["The Acyclic Dependencies Principle" by Robert C. Martin (Page 6)](http://www.objectmentor.com/resources/articles/granularity.pdf).

0 commit comments

Comments
 (0)