restrict-imports-enforcer-rule
restrict-imports-enforcer-rule copied to clipboard
Output results in a scriptable format
Dependency failures might be written in junit xml format to the target folder in order to display such failures in CI environments.
Here is the format apprently used by Jenkins: https://llg.cubic.org/docs/junit/
Draft XML to produce:
<?xml version="1.0" encoding="UTF-8"?>
<testsuite
name="de.skuzzle.TestClassName"
tests="10" <!-- max(ban pattern count, failures found) -->
disabled="0" <!-- Always 0 -->
errors="0" <!-- Always 0 -->
failures="5" <!-- Number of banned imports found in that class. -->
skipped="0" <!-- 0, unless skipFlag is true. In that case its the total number of -->
timestamp="2014-01-21T16:17:18"
>
<testcase
name="de.skuzzle.packagepattern.**" <!-- The matched banned pattern -->
classname="de.skuzzlepackagepattern.Xyz" <!-- The matched class -->
time="0" <!-- Always 0 -->
>
<failure
message="reason" <!-- The reason phrase of the matched group -->
></failure>
</testcase
</testsuite>