This maven plugin is responsible to print out metrics referring counts blank lines, comment lines, and physical lines of source code in many programming languages.
Using AlDanial/cloc project as base.
Please download and build the source to be able to use it
To run the plugin you must have perl
installed and it must be in $PATH
mvn com.vvezani:cloc-maven-plugin:0.1.1-SNAPSHOT:analyze
To use the plugin integrated in your build - execute the analyze
goal as follows:
<plugin>
<groupId>com.vvezani</groupId>
<artifactId>cloc-maven-plugin</artifactId>
<version>0.1.1-SNAPSHOT</version>
<executions>
<execution>
<!-- whatever phase you want -->
<phase>compile</phase>
<goals>
<goal>analyze</goal>
</goals>
</execution>
</executions>
</plugin>
Result:
[INFO] --- cloc-maven-plugin:0.1.1-SNAPSHOT:analyze (default) @ springboot-redis-cache ---
38 text files.
37 unique files.
14 files ignored.
github.com/AlDanial/cloc v 1.80 T=0.18 s (136.2 files/s, 86820.7 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
XML 10 0 0 1735
Java 9 75 4 255
Bourne Shell 1 31 60 195
DOS Batch 1 32 0 129
Maven 1 6 0 68
Markdown 1 22 0 34
YAML 1 1 0 9
-------------------------------------------------------------------------------
SUM: 25 1002 1355 13578
-------------------------------------------------------------------------------
You can use parameters to further customize the plugin execution
<configuration>
<excludeDirs>
<!-- this param is a list -->
<param1>src/main/test</param1>
</excludeDirs>
</configuration>
mvn clean test
We use SemVer for versioning. For the versions available, see the tags on this repository.
- Vitor Vezani - Initial work - vvezani
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details
- Parameters support
- Windows support
- Tests