build: remove unused archunit dependency
This commit is contained in:
@@ -243,6 +243,18 @@ class MavenModuleProfileTest {
|
|||||||
.isFalse();
|
.isFalse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void buildSurfaceDoesNotManageArchUnitWhenThereAreNoArchitectureTests() throws Exception {
|
||||||
|
Document pom = rootPom();
|
||||||
|
|
||||||
|
assertThat(hasProjectProperty(pom, "archunit.version"))
|
||||||
|
.isFalse();
|
||||||
|
assertThat(hasDependency(pom, "com.tngtech.archunit", "archunit-junit5"))
|
||||||
|
.isFalse();
|
||||||
|
assertThat(javaSourcesContain("import com.tngtech." + "archunit"))
|
||||||
|
.isFalse();
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void productionDocsDoNotAdvertiseMemorySessionStore() throws Exception {
|
void productionDocsDoNotAdvertiseMemorySessionStore() throws Exception {
|
||||||
String runbook = Files.readString(repositoryRoot()
|
String runbook = Files.readString(repositoryRoot()
|
||||||
@@ -489,11 +501,19 @@ class MavenModuleProfileTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static boolean productionJavaContains(String token) throws Exception {
|
private static boolean productionJavaContains(String token) throws Exception {
|
||||||
|
return javaSourcesContain(token, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean javaSourcesContain(String token) throws Exception {
|
||||||
|
return javaSourcesContain(token, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean javaSourcesContain(String token, boolean includeTests) throws Exception {
|
||||||
try (Stream<Path> files = Files.walk(repositoryRoot().resolve("modules"))) {
|
try (Stream<Path> files = Files.walk(repositoryRoot().resolve("modules"))) {
|
||||||
return files
|
return files
|
||||||
.filter(Files::isRegularFile)
|
.filter(Files::isRegularFile)
|
||||||
.filter(path -> path.toString().endsWith(".java"))
|
.filter(path -> path.toString().endsWith(".java"))
|
||||||
.filter(path -> !path.toString().contains("/src/test/"))
|
.filter(path -> includeTests || !path.toString().contains("/src/test/"))
|
||||||
.anyMatch(path -> {
|
.anyMatch(path -> {
|
||||||
try {
|
try {
|
||||||
return Files.readString(path).contains(token);
|
return Files.readString(path).contains(token);
|
||||||
|
|||||||
7
pom.xml
7
pom.xml
@@ -152,7 +152,6 @@
|
|||||||
<junit.version>5.11.3</junit.version>
|
<junit.version>5.11.3</junit.version>
|
||||||
<assertj.version>3.26.3</assertj.version>
|
<assertj.version>3.26.3</assertj.version>
|
||||||
<mockito.version>5.14.2</mockito.version>
|
<mockito.version>5.14.2</mockito.version>
|
||||||
<archunit.version>1.3.0</archunit.version>
|
|
||||||
<testcontainers.version>1.20.3</testcontainers.version>
|
<testcontainers.version>1.20.3</testcontainers.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
@@ -376,12 +375,6 @@
|
|||||||
<version>${mockito.version}</version>
|
<version>${mockito.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.tngtech.archunit</groupId>
|
|
||||||
<artifactId>archunit-junit5</artifactId>
|
|
||||||
<version>${archunit.version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user