Skip to content

Commit

Permalink
prepare release 0.19.0
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Gafert <[email protected]>
  • Loading branch information
codecholeric committed May 30, 2021
1 parent 4b50cec commit 6140cbc
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 14 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ framework.
###### Gradle

```
testImplementation 'com.tngtech.archunit:archunit:0.18.0'
testImplementation 'com.tngtech.archunit:archunit:0.19.0'
```

###### Maven
Expand All @@ -26,7 +26,7 @@ testImplementation 'com.tngtech.archunit:archunit:0.18.0'
<dependency>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit</artifactId>
<version>0.18.0</version>
<version>0.19.0</version>
<scope>test</scope>
</dependency>
```
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ ext {

allprojects {
group = 'com.tngtech.archunit'
version = '0.19.0-SNAPSHOT'
version = '0.19.0'

repositories {
mavenCentral()
Expand Down
2 changes: 1 addition & 1 deletion docs/_data/navigation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ main:
- title: "User Guide"
url: /userguide/html/000_Index.html
- title: "API"
url: https://javadoc.io/doc/com.tngtech.archunit/archunit/0.18.0
url: https://javadoc.io/doc/com.tngtech.archunit/archunit/0.19.0
- title: "About"
url: /about
4 changes: 2 additions & 2 deletions docs/_pages/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ ArchUnit can be obtained from Maven Central.
<dependency>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit</artifactId>
<version>0.18.0</version>
<version>0.19.0</version>
<scope>test</scope>
</dependency>
```

#### Gradle
```groovy
dependencies {
testImplementation 'com.tngtech.archunit:archunit:0.18.0'
testImplementation 'com.tngtech.archunit:archunit:0.19.0'
}
```

Expand Down
8 changes: 8 additions & 0 deletions docs/_posts/2021-05-30-release-v0.19.0.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
layout: splash
title: "New release of ArchUnit (v0.19.0)"
date: 2021-05-30 12:00:00
categories: news release
---

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").
73 changes: 65 additions & 8 deletions docs/userguide/html/000_Index.html
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@
<div id="header">
<h1>ArchUnit User Guide</h1>
<div class="details">
<span id="revnumber">version 0.18.0</span>
<span id="revnumber">version 0.19.0</span>
</div>
<div id="toc" class="toc2">
<div id="toctitle">Table of Contents</div>
Expand Down Expand Up @@ -530,6 +530,7 @@ <h1>ArchUnit User Guide</h1>
<li><a href="#_overriding_configuration">10.1. Overriding configuration</a></li>
<li><a href="#_configuring_the_resolution_behavior">10.2. Configuring the Resolution Behavior</a></li>
<li><a href="#_md5_sums_of_classes">10.3. MD5 Sums of Classes</a></li>
<li><a href="#_custom_error_messages">10.4. Custom Error Messages</a></li>
</ul>
</li>
</ul>
Expand Down Expand Up @@ -615,7 +616,7 @@ <h3 id="_junit_4"><a class="anchor" href="#_junit_4"></a>2.1. JUnit 4</h3>
<pre class="highlightjs highlight nowrap"><code data-lang="xml" class="language-xml hljs">&lt;dependency&gt;
&lt;groupId&gt;com.tngtech.archunit&lt;/groupId&gt;
&lt;artifactId&gt;archunit-junit4&lt;/artifactId&gt;
&lt;version&gt;0.18.0&lt;/version&gt;
&lt;version&gt;0.19.0&lt;/version&gt;
&lt;scope&gt;test&lt;/scope&gt;
&lt;/dependency&gt;</code></pre>
</div>
Expand All @@ -624,7 +625,7 @@ <h3 id="_junit_4"><a class="anchor" href="#_junit_4"></a>2.1. JUnit 4</h3>
<div class="title">build.gradle</div>
<div class="content">
<pre class="highlightjs highlight nowrap"><code class="language-none hljs">dependencies {
testImplementation 'com.tngtech.archunit:archunit-junit4:0.18.0'
testImplementation 'com.tngtech.archunit:archunit-junit4:0.19.0'
}</code></pre>
</div>
</div>
Expand All @@ -645,7 +646,7 @@ <h3 id="_junit_5"><a class="anchor" href="#_junit_5"></a>2.2. JUnit 5</h3>
<pre class="highlightjs highlight nowrap"><code data-lang="xml" class="language-xml hljs">&lt;dependency&gt;
&lt;groupId&gt;com.tngtech.archunit&lt;/groupId&gt;
&lt;artifactId&gt;archunit-junit5&lt;/artifactId&gt;
&lt;version&gt;0.18.0&lt;/version&gt;
&lt;version&gt;0.19.0&lt;/version&gt;
&lt;scope&gt;test&lt;/scope&gt;
&lt;/dependency&gt;</code></pre>
</div>
Expand All @@ -654,7 +655,7 @@ <h3 id="_junit_5"><a class="anchor" href="#_junit_5"></a>2.2. JUnit 5</h3>
<div class="title">build.gradle</div>
<div class="content">
<pre class="highlightjs highlight nowrap"><code class="language-none hljs">dependencies {
testImplementation 'com.tngtech.archunit:archunit-junit5:0.18.0'
testImplementation 'com.tngtech.archunit:archunit-junit5:0.19.0'
}</code></pre>
</div>
</div>
Expand All @@ -671,7 +672,7 @@ <h3 id="_other_test_frameworks"><a class="anchor" href="#_other_test_frameworks"
<pre class="highlightjs highlight nowrap"><code data-lang="xml" class="language-xml hljs">&lt;dependency&gt;
&lt;groupId&gt;com.tngtech.archunit&lt;/groupId&gt;
&lt;artifactId&gt;archunit&lt;/artifactId&gt;
&lt;version&gt;0.18.0&lt;/version&gt;
&lt;version&gt;0.19.0&lt;/version&gt;
&lt;scope&gt;test&lt;/scope&gt;
&lt;/dependency&gt;</code></pre>
</div>
Expand All @@ -680,7 +681,7 @@ <h3 id="_other_test_frameworks"><a class="anchor" href="#_other_test_frameworks"
<div class="title">build.gradle</div>
<div class="content">
<pre class="highlightjs highlight nowrap"><code class="language-none hljs">dependencies {
testImplementation 'com.tngtech.archunit:archunit:0.18.0'
testImplementation 'com.tngtech.archunit:archunit:0.19.0'
}</code></pre>
</div>
</div>
Expand Down Expand Up @@ -2125,6 +2126,14 @@ <h4 id="_configuration"><a class="anchor" href="#_configuration"></a>8.5.2. Conf
<pre class="highlightjs highlight nowrap"><code class="language-none hljs">-Darchunit.freeze.store.default.allowStoreCreation=true</code></pre>
</div>
</div>
<div class="paragraph">
<p>It is also possible to allow all violations to be "refrozen", i.e. the store will just be updated
with the current state, and the reported result will be success. Thus, it is effectively the same behavior
as if all rules would never have been frozen.
This can e.g. make sense, because current violations are consciously accepted and should be added to the store,
or because the format of some violations has changed. The respective property to allow refreezing
all current violations is <code>freeze.refreeze=true</code>, where the default is <code>false</code>.</p>
</div>
</div>
<div class="sect3">
<h4 id="_extension"><a class="anchor" href="#_extension"></a>8.5.3. Extension</h4>
Expand Down Expand Up @@ -2525,7 +2534,7 @@ <h4 id="_controlling_the_import"><a class="anchor" href="#_controlling_the_impor
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight nowrap"><code data-lang="java" class="language-java hljs">@AnalyzeClasses(packages = {"com.myapp.subone", "com.myapp.subone"})</code></pre>
<pre class="highlightjs highlight nowrap"><code data-lang="java" class="language-java hljs">@AnalyzeClasses(packages = {"com.myapp.subone", "com.myapp.subtwo"})</code></pre>
</div>
</div>
<div class="paragraph">
Expand Down Expand Up @@ -2782,6 +2791,54 @@ <h3 id="_md5_sums_of_classes"><a class="anchor" href="#_md5_sums_of_classes"></a
</div>
</div>
</div>
<div class="sect2">
<h3 id="_custom_error_messages"><a class="anchor" href="#_custom_error_messages"></a>10.4. Custom Error Messages</h3>
<div class="paragraph">
<p>You can configure a custom format to display the failures of a rule.</p>
</div>
<div class="paragraph">
<p>First Supply a custom implementation of</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight nowrap"><code data-lang="java" class="language-java hljs">com.tngtech.archunit.lang.FailureDisplayFormat</code></pre>
</div>
</div>
<div class="paragraph">
<p>Then configure it</p>
</div>
<div class="listingblock">
<div class="title">archunit.properties</div>
<div class="content">
<pre class="highlightjs highlight nowrap"><code class="language-none hljs">failureDisplayFormat=some.pkg.MyCustomFailureDisplayFormat</code></pre>
</div>
</div>
<div class="paragraph">
<p>One example would be to shorten the fully qualified class names in failure messages:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight nowrap"><code data-lang="java" class="language-java hljs">private static class SimpleClassNameFailureFormat implements FailureDisplayFormat {
@Override
public String formatFailure(HasDescription rule, FailureMessages failureMessages, Priority priority) {
String failureDetails = failureMessages.stream()
.map(message -&gt; message.replaceAll("&lt;(?:\\w+\\.)+([A-Z][^&gt;]*)&gt;", "&lt;$1&gt;"))
.collect(joining(lineSeparator()));

return String.format("Architecture Violation [Priority: %s] - Rule '%s' was violated (%s):%n%s",
priority.asString(), rule.getDescription(), failureMessages.getInformationAboutNumberOfViolations(), failureDetails);
}
}</code></pre>
</div>
</div>
<div class="paragraph">
<p>Note that due to the free format how violation texts can be composed,
in particular by custom predicates and conditions,
there is at the moment no more sophisticated way than plain text parsing.
Users can tailor this to their specific environments where they know
which sorts of failure formats can appear in practice.</p>
</div>
</div>
</div>
</div>
</div>
Expand Down

0 comments on commit 6140cbc

Please sign in to comment.