Skip to content

Commit 171d6d4

Browse files
committed
Fix tabs/whitespaces in readme
1 parent 0ed8848 commit 171d6d4

File tree

1 file changed

+77
-78
lines changed

1 file changed

+77
-78
lines changed

README.md

Lines changed: 77 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,77 @@
1-
[![Build Status](https://travis-ci.org/andrena/no-package-cycles-enforcer-rule.svg)](https://travis-ci.org/andrena/no-package-cycles-enforcer-rule)
2-
3-
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.
4-
5-
Usage: Add the following plugin to your POM:
6-
7-
```xml
8-
<plugin>
9-
<artifactId>maven-enforcer-plugin</artifactId>
10-
<version>1.4.1</version>
11-
<dependencies>
12-
<dependency>
13-
<groupId>de.andrena.tools.nopackagecycles</groupId>
14-
<artifactId>no-package-cycles-enforcer-rule</artifactId>
15-
<version>1.0.9</version>
16-
</dependency>
17-
</dependencies>
18-
<executions>
19-
<execution>
20-
<id>enforce-no-package-cycles</id>
21-
<goals>
22-
<goal>enforce</goal>
23-
</goals>
24-
<phase>test</phase>
25-
<configuration>
26-
<rules>
27-
<NoPackageCyclesRule implementation="de.andrena.tools.nopackagecycles.NoPackageCyclesRule" />
28-
</rules>
29-
</configuration>
30-
</execution>
31-
</executions>
32-
</plugin>
33-
```
34-
35-
If you want to exclude tests from cycle checking, you can use the parameter `includeTests` which is set to true by default:
36-
```xml
37-
...
38-
<rules>
39-
<NoPackageCyclesRule implementation="de.andrena.tools.nopackagecycles.NoPackageCyclesRule">
40-
<includeTests>false</includeTests>
41-
</NoPackageCyclesRule>
42-
</rules>
43-
...
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!**
49-
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-
...
72-
```
73-
74-
75-
See also:
76-
* 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.
77-
* [JDepend](https://github.com/clarkware/jdepend), the library being used to detect package cycles.
78-
* 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).
1+
[![Build Status](https://travis-ci.org/andrena/no-package-cycles-enforcer-rule.svg)](https://travis-ci.org/andrena/no-package-cycles-enforcer-rule)
2+
3+
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.
4+
5+
Usage: Add the following plugin to your POM:
6+
7+
```xml
8+
<plugin>
9+
<artifactId>maven-enforcer-plugin</artifactId>
10+
<version>1.4.1</version>
11+
<dependencies>
12+
<dependency>
13+
<groupId>de.andrena.tools.nopackagecycles</groupId>
14+
<artifactId>no-package-cycles-enforcer-rule</artifactId>
15+
<version>1.0.9</version>
16+
</dependency>
17+
</dependencies>
18+
<executions>
19+
<execution>
20+
<id>enforce-no-package-cycles</id>
21+
<goals>
22+
<goal>enforce</goal>
23+
</goals>
24+
<phase>test</phase>
25+
<configuration>
26+
<rules>
27+
<NoPackageCyclesRule implementation="de.andrena.tools.nopackagecycles.NoPackageCyclesRule" />
28+
</rules>
29+
</configuration>
30+
</execution>
31+
</executions>
32+
</plugin>
33+
```
34+
35+
If you want to exclude tests from cycle checking, you can use the parameter `includeTests` which is set to true by default:
36+
```xml
37+
...
38+
<rules>
39+
<NoPackageCyclesRule implementation="de.andrena.tools.nopackagecycles.NoPackageCyclesRule">
40+
<includeTests>false</includeTests>
41+
</NoPackageCyclesRule>
42+
</rules>
43+
...
44+
```
45+
46+
If you want to exclude packages or restrict check to certain packages only, you can use `includedPackages` or `excludedPackages`:
47+
**:warning: only use this, if there is no other way! Once there are exceptions, the connection between those excluded packages
48+
will grow stronger and stronger, without notice!**
49+
```xml
50+
...
51+
<rules>
52+
<NoPackageCyclesRule implementation="de.andrena.tools.nopackagecycles.NoPackageCyclesRule">
53+
<includedPackages>
54+
<includedPackage>myapp.code.good</includedPackage>
55+
</includedPackages>
56+
</NoPackageCyclesRule>
57+
</rules>
58+
...
59+
```
60+
61+
```xml
62+
...
63+
<rules>
64+
<NoPackageCyclesRule implementation="de.andrena.tools.nopackagecycles.NoPackageCyclesRule">
65+
<excludedPackages>
66+
<excludedPackage>myapp.code.bad</excludedPackage>
67+
</excludedPackages>
68+
</NoPackageCyclesRule>
69+
</rules>
70+
...
71+
```
72+
73+
74+
See also:
75+
* 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.
76+
* [JDepend](https://github.com/clarkware/jdepend), the library being used to detect package cycles.
77+
* 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)