build: remove unused archunit dependency
This commit is contained in:
@@ -243,6 +243,18 @@ class MavenModuleProfileTest {
|
||||
.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
|
||||
void productionDocsDoNotAdvertiseMemorySessionStore() throws Exception {
|
||||
String runbook = Files.readString(repositoryRoot()
|
||||
@@ -489,11 +501,19 @@ class MavenModuleProfileTest {
|
||||
}
|
||||
|
||||
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"))) {
|
||||
return files
|
||||
.filter(Files::isRegularFile)
|
||||
.filter(path -> path.toString().endsWith(".java"))
|
||||
.filter(path -> !path.toString().contains("/src/test/"))
|
||||
.filter(path -> includeTests || !path.toString().contains("/src/test/"))
|
||||
.anyMatch(path -> {
|
||||
try {
|
||||
return Files.readString(path).contains(token);
|
||||
|
||||
7
pom.xml
7
pom.xml
@@ -152,7 +152,6 @@
|
||||
<junit.version>5.11.3</junit.version>
|
||||
<assertj.version>3.26.3</assertj.version>
|
||||
<mockito.version>5.14.2</mockito.version>
|
||||
<archunit.version>1.3.0</archunit.version>
|
||||
<testcontainers.version>1.20.3</testcontainers.version>
|
||||
</properties>
|
||||
|
||||
@@ -376,12 +375,6 @@
|
||||
<version>${mockito.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.tngtech.archunit</groupId>
|
||||
<artifactId>archunit-junit5</artifactId>
|
||||
<version>${archunit.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user