diff --git a/dokka-integration-tests/maven/src/integrationTest/kotlin/org/jetbrains/dokka/it/maven/BiojavaIntegrationTest.kt b/dokka-integration-tests/maven/src/integrationTest/kotlin/org/jetbrains/dokka/it/maven/BiojavaIntegrationTest.kt index ba808ea2abd..a3ad2636fbc 100644 --- a/dokka-integration-tests/maven/src/integrationTest/kotlin/org/jetbrains/dokka/it/maven/BiojavaIntegrationTest.kt +++ b/dokka-integration-tests/maven/src/integrationTest/kotlin/org/jetbrains/dokka/it/maven/BiojavaIntegrationTest.kt @@ -17,6 +17,12 @@ class BiojavaIntegrationTest : AbstractIntegrationTest(), TestOutputCopier { private val mavenBinaryFile: File = File(checkNotNull(System.getenv("MVN_BINARY_PATH"))) override val projectOutputLocation: File by lazy { File(projectDir, "biojava-core/target/dokkaJavadoc") } + private val localSettingsXml: File by lazy { + projectDir.resolve("local-settings.xml").apply { + writeText(createSettingsXml()) + } + } + @BeforeTest fun prepareProjectFiles() { val bioJavaDir = File("projects", "biojava") @@ -36,7 +42,7 @@ class BiojavaIntegrationTest : AbstractIntegrationTest(), TestOutputCopier { .command( mavenBinaryFile.absolutePath, "dokka:javadoc", - "--settings", "local-settings.xml", + "--settings", localSettingsXml.invariantSeparatorsPath, "-pl", "biojava-core", "\"-Ddokka_version=$currentDokkaVersion\"", diff --git a/dokka-integration-tests/maven/src/integrationTest/kotlin/org/jetbrains/dokka/it/maven/MavenIntegrationTest.kt b/dokka-integration-tests/maven/src/integrationTest/kotlin/org/jetbrains/dokka/it/maven/MavenIntegrationTest.kt index e975d238845..8ba93780fdf 100644 --- a/dokka-integration-tests/maven/src/integrationTest/kotlin/org/jetbrains/dokka/it/maven/MavenIntegrationTest.kt +++ b/dokka-integration-tests/maven/src/integrationTest/kotlin/org/jetbrains/dokka/it/maven/MavenIntegrationTest.kt @@ -16,6 +16,12 @@ class MavenIntegrationTest : AbstractIntegrationTest() { private val mavenBinaryFile: File = File(checkNotNull(System.getenv("MVN_BINARY_PATH"))) + private val localSettingsXml: File by lazy { + projectDir.resolve("local-settings.xml").apply { + writeText(createSettingsXml()) + } + } + @BeforeTest fun prepareProjectFiles() { val templateProjectDir = File("projects", "it-maven") @@ -29,7 +35,6 @@ class MavenIntegrationTest : AbstractIntegrationTest() { if (customResourcesDir.exists() && customResourcesDir.isDirectory) { customResourcesDir.copyRecursively(File(projectDir, "customResources"), overwrite = true) } - projectDir.resolve("local-settings.xml").writeText(createSettingsXml()) } @Test @@ -40,7 +45,7 @@ class MavenIntegrationTest : AbstractIntegrationTest() { "dokka:help", "-U", "-e", - "--settings", "local-settings.xml", + "--settings", localSettingsXml.invariantSeparatorsPath, ) .start() .awaitProcessResult() @@ -68,7 +73,7 @@ class MavenIntegrationTest : AbstractIntegrationTest() { "dokka:dokka", "-U", "-e", - "--settings", "local-settings.xml", + "--settings", localSettingsXml.invariantSeparatorsPath, ).start().awaitProcessResult() diagnosticAsserts(result) @@ -123,7 +128,7 @@ class MavenIntegrationTest : AbstractIntegrationTest() { "dokka:javadoc", "-U", "-e", - "--settings", "local-settings.xml", + "--settings", localSettingsXml.invariantSeparatorsPath, ).start().awaitProcessResult() diagnosticAsserts(result) @@ -151,7 +156,7 @@ class MavenIntegrationTest : AbstractIntegrationTest() { "dokka:javadocJar", "-U", "-e", - "--settings", "local-settings.xml", + "--settings", localSettingsXml.invariantSeparatorsPath, ).start().awaitProcessResult() diagnosticAsserts(result) diff --git a/dokka-integration-tests/maven/src/integrationTest/kotlin/org/jetbrains/dokka/it/maven/settingsXml.kt b/dokka-integration-tests/maven/src/integrationTest/kotlin/org/jetbrains/dokka/it/maven/settingsXml.kt index c3eb5f3cc99..c98b7f3735f 100644 --- a/dokka-integration-tests/maven/src/integrationTest/kotlin/org/jetbrains/dokka/it/maven/settingsXml.kt +++ b/dokka-integration-tests/maven/src/integrationTest/kotlin/org/jetbrains/dokka/it/maven/settingsXml.kt @@ -13,15 +13,15 @@ import java.nio.file.Paths /** Create `settings.xml` file contents, with the custom dev Maven repos. */ @Language("xml") fun createSettingsXml(): String { - /** file-based Maven repositories that contains the Dokka dependencies */ + /** file-based Maven repositories that contain Dokka dependencies */ val projectLocalMavenDirs: List by systemProperty { it.split(":").map(Paths::get) } val repos = projectLocalMavenDirs.withIndex().joinToString("\n\n") {(i, path) -> /* language=xml */ """ - + dev-repo-$i ${path.toUri().toASCIIString()} - + """.trimIndent() } @@ -30,9 +30,9 @@ fun createSettingsXml(): String { maven-dev - + $repos - +