Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:1.4.1'
testImplementation 'com.tngtech.archunit:archunit:1.4.2'
```

###### Maven
Expand All @@ -26,7 +26,7 @@ testImplementation 'com.tngtech.archunit:archunit:1.4.1'
<dependency>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit</artifactId>
<version>1.4.1</version>
<version>1.4.2</version>
<scope>test</scope>
</dependency>
```
Expand Down
4 changes: 2 additions & 2 deletions archunit-maven-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ def repositoryUrls = [
releases : 'https://nexus.int.tngtech.com/repository/maven-releases'
],
sonatype: [
snapshots: 'https://oss.sonatype.org/content/repositories/snapshots',
releases : 'https://oss.sonatype.org/content/repositories/releases'
snapshots: 'https://central.sonatype.com/repository/maven-snapshots',
releases : 'https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/'
]
]
def createRepositoriesTag = { repoUrls ->
Expand Down
2 changes: 2 additions & 0 deletions build-steps/release/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ nexusPublishing {
packageGroup = 'com.tngtech'
repositories {
sonatype {
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
username = findProperty("sonatypeUsername")
password = findProperty("sonatypePassword")
}
Expand Down
16 changes: 12 additions & 4 deletions build-steps/release/test-release.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,22 @@ task testRelease() {
text = text.replace('mavenCentral()', '''
mavenCentral()
maven {
url "https://oss.sonatype.org/content/repositories/staging/"
credentials {
username project.getProperty('sonatypeUsername')
password project.getProperty('sonatypePassword')
url "https://central.sonatype.com/api/v1/publisher/deployments/download/"
credentials(HttpHeaderCredentials) {
name = "Authorization"
value = "Bearer " + (project.getProperty('sonatypeUsername') + ":" + project.getProperty('sonatypePassword')).bytes.encodeBase64()
}
authentication {
header(HttpHeaderAuthentication)
}
Comment on lines +12 to 19
Copy link
Copy Markdown
Member Author

@hankem hankem Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That (set up following Manually Testing a Deployment Bundle) didn't work yet:

> Task :testRelease

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':example-plain:compileTestJava'.
> Could not resolve all files for configuration ':example-plain:testCompileClasspath'.
   > Could not resolve com.tngtech.archunit:archunit:1.4.2.
     Required by:
         project :example-plain
      > Could not resolve com.tngtech.archunit:archunit:1.4.2.
         > Could not get resource 'https://central.sonatype.com/api/v1/publisher/deployments/download/com/tngtech/archunit/archunit/1.4.2/archunit-1.4.2.pom'.
            > Could not GET 'https://central.sonatype.com/api/v1/publisher/deployments/download/com/tngtech/archunit/archunit/1.4.2/archunit-1.4.2.pom'.
               > Read timed out

Copy link
Copy Markdown
Member Author

@hankem hankem Apr 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It did work after configuring a high systemProp.org.gradle.internal.http.socketTimeout.
(Downloading via curl was quite slow, too.)

}''')
}
}

def configureHttpSocketTimeout = {
new File(testReleaseDir, 'gradle.properties') << 'systemProp.org.gradle.internal.http.socketTimeout=600000\n'
}

def testExampleProject = { String exampleProjectName ->
List<String> testClassNames = fileTree(new File(testReleaseDir, exampleProjectName)) {
include '**/*Test.java'
Expand Down Expand Up @@ -47,6 +54,7 @@ task testRelease() {
updateArchUnitExampleVersion(testReleaseDir)

configureStagingRepository()
configureHttpSocketTimeout()

testExampleProject('example-plain')
testExampleProject('example-junit4')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,25 @@ ext.getExpectedPomFileContent = {

task checkUploadedArtifacts {
doLast {
def tngRepoId = project.findProperty('tngRepoId') ?: rootProject.closeSonatypeStagingRepository.stagingRepositoryId.get()
def rootUrl = "https://oss.sonatype.org/service/local/repositories/${tngRepoId}/content/com/tngtech/archunit"

def createArtifactUrl = { String artifactId ->
"${rootUrl}/${artifactId}/${version}/${artifactId}-${version}"
def getArtifact = { String artifactId, String fullEnding ->
def repositoryUrl = 'https://central.sonatype.com/api/v1/publisher/deployments/download'
def artifactUrl = "$repositoryUrl/com/tngtech/archunit/$artifactId/$version/$artifactId-$version$fullEnding"
def connection = new URL(artifactUrl).openConnection()
def token = (project.getProperty('sonatypeUsername') + ':' + project.getProperty('sonatypePassword')).bytes.encodeBase64()
connection.setRequestProperty("Authorization", "Bearer $token")
return connection.inputStream
}

def getUploadedFile = { String artifactId, String ending, String suffix ->
def fullEnding = (!suffix.isEmpty() ? "-${suffix}" : '') + ".${ending}"
def tempDir = Files.createTempDirectory('release-check').toFile()
File result = new File(tempDir, "${artifactId}${fullEnding}")
result.bytes = new URL("${createArtifactUrl(artifactId)}${fullEnding}").bytes
result.bytes = getArtifact(artifactId, fullEnding).bytes
result
}

def getUploadedPomFileContent = {
new URL("${createArtifactUrl(project.name)}.pom").text.stripIndent()
getArtifact(project.name, ".pom").text.stripIndent()
}

def checkPom = {
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/1.4.1
url: https://javadoc.io/doc/com.tngtech.archunit/archunit/1.4.2
- 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>1.4.1</version>
<version>1.4.2</version>
<scope>test</scope>
</dependency>
```

#### Gradle
```groovy
dependencies {
testImplementation 'com.tngtech.archunit:archunit:1.4.1'
testImplementation 'com.tngtech.archunit:archunit:1.4.2'
}
```

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

A new release of ArchUnit (v1.4.2) is out. For details see [the release on GitHub](https://github.com/TNG/ArchUnit/releases/tag/v1.4.2 "ArchUnit v1.4.2 on GitHub").
14 changes: 7 additions & 7 deletions docs/userguide/html/000_Index.html
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@
<div id="header">
<h1>ArchUnit User Guide</h1>
<div class="details">
<span id="revnumber">version 1.4.1</span>
<span id="revnumber">version 1.4.2</span>
</div>
<div id="toc" class="toc2">
<div id="toctitle">Table of Contents</div>
Expand Down Expand Up @@ -619,7 +619,7 @@ <h3 id="_junit_4"><a class="anchor" href="#_junit_4"></a>2.1. JUnit 4</h3>
<pre class="highlightjs highlight nowrap"><code class="language-xml hljs" data-lang="xml">&lt;dependency&gt;
&lt;groupId&gt;com.tngtech.archunit&lt;/groupId&gt;
&lt;artifactId&gt;archunit-junit4&lt;/artifactId&gt;
&lt;version&gt;1.4.1&lt;/version&gt;
&lt;version&gt;1.4.2&lt;/version&gt;
&lt;scope&gt;test&lt;/scope&gt;
&lt;/dependency&gt;</code></pre>
</div>
Expand All @@ -628,7 +628,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:1.4.1'
testImplementation 'com.tngtech.archunit:archunit-junit4:1.4.2'
}</code></pre>
</div>
</div>
Expand All @@ -649,7 +649,7 @@ <h3 id="_junit_5"><a class="anchor" href="#_junit_5"></a>2.2. JUnit 5</h3>
<pre class="highlightjs highlight nowrap"><code class="language-xml hljs" data-lang="xml">&lt;dependency&gt;
&lt;groupId&gt;com.tngtech.archunit&lt;/groupId&gt;
&lt;artifactId&gt;archunit-junit5&lt;/artifactId&gt;
&lt;version&gt;1.4.1&lt;/version&gt;
&lt;version&gt;1.4.2&lt;/version&gt;
&lt;scope&gt;test&lt;/scope&gt;
&lt;/dependency&gt;</code></pre>
</div>
Expand All @@ -658,7 +658,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:1.4.1'
testImplementation 'com.tngtech.archunit:archunit-junit5:1.4.2'
}</code></pre>
</div>
</div>
Expand All @@ -675,7 +675,7 @@ <h3 id="_other_test_frameworks"><a class="anchor" href="#_other_test_frameworks"
<pre class="highlightjs highlight nowrap"><code class="language-xml hljs" data-lang="xml">&lt;dependency&gt;
&lt;groupId&gt;com.tngtech.archunit&lt;/groupId&gt;
&lt;artifactId&gt;archunit&lt;/artifactId&gt;
&lt;version&gt;1.4.1&lt;/version&gt;
&lt;version&gt;1.4.2&lt;/version&gt;
&lt;scope&gt;test&lt;/scope&gt;
&lt;/dependency&gt;</code></pre>
</div>
Expand All @@ -684,7 +684,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:1.4.1'
testImplementation 'com.tngtech.archunit:archunit:1.4.2'
}</code></pre>
</div>
</div>
Expand Down