Skip to content

Commit 6140cbc

Browse files
committed
prepare release 0.19.0
Signed-off-by: Peter Gafert <[email protected]>
1 parent 4b50cec commit 6140cbc

File tree

6 files changed

+79
-14
lines changed

6 files changed

+79
-14
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ framework.
1717
###### Gradle
1818

1919
```
20-
testImplementation 'com.tngtech.archunit:archunit:0.18.0'
20+
testImplementation 'com.tngtech.archunit:archunit:0.19.0'
2121
```
2222

2323
###### Maven
@@ -26,7 +26,7 @@ testImplementation 'com.tngtech.archunit:archunit:0.18.0'
2626
<dependency>
2727
<groupId>com.tngtech.archunit</groupId>
2828
<artifactId>archunit</artifactId>
29-
<version>0.18.0</version>
29+
<version>0.19.0</version>
3030
<scope>test</scope>
3131
</dependency>
3232
```

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ ext {
104104

105105
allprojects {
106106
group = 'com.tngtech.archunit'
107-
version = '0.19.0-SNAPSHOT'
107+
version = '0.19.0'
108108

109109
repositories {
110110
mavenCentral()

docs/_data/navigation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ main:
1010
- title: "User Guide"
1111
url: /userguide/html/000_Index.html
1212
- title: "API"
13-
url: https://javadoc.io/doc/com.tngtech.archunit/archunit/0.18.0
13+
url: https://javadoc.io/doc/com.tngtech.archunit/archunit/0.19.0
1414
- title: "About"
1515
url: /about

docs/_pages/getting-started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ ArchUnit can be obtained from Maven Central.
1515
<dependency>
1616
<groupId>com.tngtech.archunit</groupId>
1717
<artifactId>archunit</artifactId>
18-
<version>0.18.0</version>
18+
<version>0.19.0</version>
1919
<scope>test</scope>
2020
</dependency>
2121
```
2222

2323
#### Gradle
2424
```groovy
2525
dependencies {
26-
testImplementation 'com.tngtech.archunit:archunit:0.18.0'
26+
testImplementation 'com.tngtech.archunit:archunit:0.19.0'
2727
}
2828
```
2929

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
layout: splash
3+
title: "New release of ArchUnit (v0.19.0)"
4+
date: 2021-05-30 12:00:00
5+
categories: news release
6+
---
7+
8+
A new release of ArchUnit (v0.19.0) is out. For details see [the release on GitHub](https://github.com/TNG/ArchUnit/releases/tag/v0.19.0 "ArchUnit v0.19.0 on GitHub").

docs/userguide/html/000_Index.html

Lines changed: 65 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@
449449
<div id="header">
450450
<h1>ArchUnit User Guide</h1>
451451
<div class="details">
452-
<span id="revnumber">version 0.18.0</span>
452+
<span id="revnumber">version 0.19.0</span>
453453
</div>
454454
<div id="toc" class="toc2">
455455
<div id="toctitle">Table of Contents</div>
@@ -530,6 +530,7 @@ <h1>ArchUnit User Guide</h1>
530530
<li><a href="#_overriding_configuration">10.1. Overriding configuration</a></li>
531531
<li><a href="#_configuring_the_resolution_behavior">10.2. Configuring the Resolution Behavior</a></li>
532532
<li><a href="#_md5_sums_of_classes">10.3. MD5 Sums of Classes</a></li>
533+
<li><a href="#_custom_error_messages">10.4. Custom Error Messages</a></li>
533534
</ul>
534535
</li>
535536
</ul>
@@ -615,7 +616,7 @@ <h3 id="_junit_4"><a class="anchor" href="#_junit_4"></a>2.1. JUnit 4</h3>
615616
<pre class="highlightjs highlight nowrap"><code data-lang="xml" class="language-xml hljs">&lt;dependency&gt;
616617
&lt;groupId&gt;com.tngtech.archunit&lt;/groupId&gt;
617618
&lt;artifactId&gt;archunit-junit4&lt;/artifactId&gt;
618-
&lt;version&gt;0.18.0&lt;/version&gt;
619+
&lt;version&gt;0.19.0&lt;/version&gt;
619620
&lt;scope&gt;test&lt;/scope&gt;
620621
&lt;/dependency&gt;</code></pre>
621622
</div>
@@ -624,7 +625,7 @@ <h3 id="_junit_4"><a class="anchor" href="#_junit_4"></a>2.1. JUnit 4</h3>
624625
<div class="title">build.gradle</div>
625626
<div class="content">
626627
<pre class="highlightjs highlight nowrap"><code class="language-none hljs">dependencies {
627-
testImplementation 'com.tngtech.archunit:archunit-junit4:0.18.0'
628+
testImplementation 'com.tngtech.archunit:archunit-junit4:0.19.0'
628629
}</code></pre>
629630
</div>
630631
</div>
@@ -645,7 +646,7 @@ <h3 id="_junit_5"><a class="anchor" href="#_junit_5"></a>2.2. JUnit 5</h3>
645646
<pre class="highlightjs highlight nowrap"><code data-lang="xml" class="language-xml hljs">&lt;dependency&gt;
646647
&lt;groupId&gt;com.tngtech.archunit&lt;/groupId&gt;
647648
&lt;artifactId&gt;archunit-junit5&lt;/artifactId&gt;
648-
&lt;version&gt;0.18.0&lt;/version&gt;
649+
&lt;version&gt;0.19.0&lt;/version&gt;
649650
&lt;scope&gt;test&lt;/scope&gt;
650651
&lt;/dependency&gt;</code></pre>
651652
</div>
@@ -654,7 +655,7 @@ <h3 id="_junit_5"><a class="anchor" href="#_junit_5"></a>2.2. JUnit 5</h3>
654655
<div class="title">build.gradle</div>
655656
<div class="content">
656657
<pre class="highlightjs highlight nowrap"><code class="language-none hljs">dependencies {
657-
testImplementation 'com.tngtech.archunit:archunit-junit5:0.18.0'
658+
testImplementation 'com.tngtech.archunit:archunit-junit5:0.19.0'
658659
}</code></pre>
659660
</div>
660661
</div>
@@ -671,7 +672,7 @@ <h3 id="_other_test_frameworks"><a class="anchor" href="#_other_test_frameworks"
671672
<pre class="highlightjs highlight nowrap"><code data-lang="xml" class="language-xml hljs">&lt;dependency&gt;
672673
&lt;groupId&gt;com.tngtech.archunit&lt;/groupId&gt;
673674
&lt;artifactId&gt;archunit&lt;/artifactId&gt;
674-
&lt;version&gt;0.18.0&lt;/version&gt;
675+
&lt;version&gt;0.19.0&lt;/version&gt;
675676
&lt;scope&gt;test&lt;/scope&gt;
676677
&lt;/dependency&gt;</code></pre>
677678
</div>
@@ -680,7 +681,7 @@ <h3 id="_other_test_frameworks"><a class="anchor" href="#_other_test_frameworks"
680681
<div class="title">build.gradle</div>
681682
<div class="content">
682683
<pre class="highlightjs highlight nowrap"><code class="language-none hljs">dependencies {
683-
testImplementation 'com.tngtech.archunit:archunit:0.18.0'
684+
testImplementation 'com.tngtech.archunit:archunit:0.19.0'
684685
}</code></pre>
685686
</div>
686687
</div>
@@ -2125,6 +2126,14 @@ <h4 id="_configuration"><a class="anchor" href="#_configuration"></a>8.5.2. Conf
21252126
<pre class="highlightjs highlight nowrap"><code class="language-none hljs">-Darchunit.freeze.store.default.allowStoreCreation=true</code></pre>
21262127
</div>
21272128
</div>
2129+
<div class="paragraph">
2130+
<p>It is also possible to allow all violations to be "refrozen", i.e. the store will just be updated
2131+
with the current state, and the reported result will be success. Thus, it is effectively the same behavior
2132+
as if all rules would never have been frozen.
2133+
This can e.g. make sense, because current violations are consciously accepted and should be added to the store,
2134+
or because the format of some violations has changed. The respective property to allow refreezing
2135+
all current violations is <code>freeze.refreeze=true</code>, where the default is <code>false</code>.</p>
2136+
</div>
21282137
</div>
21292138
<div class="sect3">
21302139
<h4 id="_extension"><a class="anchor" href="#_extension"></a>8.5.3. Extension</h4>
@@ -2525,7 +2534,7 @@ <h4 id="_controlling_the_import"><a class="anchor" href="#_controlling_the_impor
25252534
</div>
25262535
<div class="listingblock">
25272536
<div class="content">
2528-
<pre class="highlightjs highlight nowrap"><code data-lang="java" class="language-java hljs">@AnalyzeClasses(packages = {"com.myapp.subone", "com.myapp.subone"})</code></pre>
2537+
<pre class="highlightjs highlight nowrap"><code data-lang="java" class="language-java hljs">@AnalyzeClasses(packages = {"com.myapp.subone", "com.myapp.subtwo"})</code></pre>
25292538
</div>
25302539
</div>
25312540
<div class="paragraph">
@@ -2782,6 +2791,54 @@ <h3 id="_md5_sums_of_classes"><a class="anchor" href="#_md5_sums_of_classes"></a
27822791
</div>
27832792
</div>
27842793
</div>
2794+
<div class="sect2">
2795+
<h3 id="_custom_error_messages"><a class="anchor" href="#_custom_error_messages"></a>10.4. Custom Error Messages</h3>
2796+
<div class="paragraph">
2797+
<p>You can configure a custom format to display the failures of a rule.</p>
2798+
</div>
2799+
<div class="paragraph">
2800+
<p>First Supply a custom implementation of</p>
2801+
</div>
2802+
<div class="listingblock">
2803+
<div class="content">
2804+
<pre class="highlightjs highlight nowrap"><code data-lang="java" class="language-java hljs">com.tngtech.archunit.lang.FailureDisplayFormat</code></pre>
2805+
</div>
2806+
</div>
2807+
<div class="paragraph">
2808+
<p>Then configure it</p>
2809+
</div>
2810+
<div class="listingblock">
2811+
<div class="title">archunit.properties</div>
2812+
<div class="content">
2813+
<pre class="highlightjs highlight nowrap"><code class="language-none hljs">failureDisplayFormat=some.pkg.MyCustomFailureDisplayFormat</code></pre>
2814+
</div>
2815+
</div>
2816+
<div class="paragraph">
2817+
<p>One example would be to shorten the fully qualified class names in failure messages:</p>
2818+
</div>
2819+
<div class="listingblock">
2820+
<div class="content">
2821+
<pre class="highlightjs highlight nowrap"><code data-lang="java" class="language-java hljs">private static class SimpleClassNameFailureFormat implements FailureDisplayFormat {
2822+
@Override
2823+
public String formatFailure(HasDescription rule, FailureMessages failureMessages, Priority priority) {
2824+
String failureDetails = failureMessages.stream()
2825+
.map(message -&gt; message.replaceAll("&lt;(?:\\w+\\.)+([A-Z][^&gt;]*)&gt;", "&lt;$1&gt;"))
2826+
.collect(joining(lineSeparator()));
2827+
2828+
return String.format("Architecture Violation [Priority: %s] - Rule '%s' was violated (%s):%n%s",
2829+
priority.asString(), rule.getDescription(), failureMessages.getInformationAboutNumberOfViolations(), failureDetails);
2830+
}
2831+
}</code></pre>
2832+
</div>
2833+
</div>
2834+
<div class="paragraph">
2835+
<p>Note that due to the free format how violation texts can be composed,
2836+
in particular by custom predicates and conditions,
2837+
there is at the moment no more sophisticated way than plain text parsing.
2838+
Users can tailor this to their specific environments where they know
2839+
which sorts of failure formats can appear in practice.</p>
2840+
</div>
2841+
</div>
27852842
</div>
27862843
</div>
27872844
</div>

0 commit comments

Comments
 (0)