You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by el...@apache.org on 2023/07/10 10:54:05 UTC
[maven-javadoc-plugin] branch MJAVADOC-762 created (now 7c8424a2)
This is an automated email from the ASF dual-hosted git repository.
elharo pushed a change to branch MJAVADOC-762
in repository https://gitbox.apache.org/repos/asf/maven-javadoc-plugin.git
at 7c8424a2 don't share state between tests
This branch includes the following new commits:
new 7c8424a2 don't share state between tests
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[maven-javadoc-plugin] 01/01: don't share state between tests
Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
elharo pushed a commit to branch MJAVADOC-762
in repository https://gitbox.apache.org/repos/asf/maven-javadoc-plugin.git
commit 7c8424a281471786adfe092cbfad74e0f02cca56
Author: Elliotte Rusty Harold <el...@ibiblio.org>
AuthorDate: Mon Jul 10 06:53:58 2023 -0400
don't share state between tests
---
.../maven/plugins/javadoc/JavadocReportTest.java | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java b/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java
index d8c836b8..1b615291 100644
--- a/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java
+++ b/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java
@@ -77,9 +77,6 @@ public class JavadocReportTest extends AbstractMojoTestCase {
public static final String OPTIONS_UMLAUT_ENCODING = "Options Umlaut Encoding ö ä ü ß";
- /** flag to copy repo only one time */
- private static boolean TEST_REPO_CREATED = false;
-
private Path unit;
private File localRepo;
@@ -98,6 +95,13 @@ public class JavadocReportTest extends AbstractMojoTestCase {
createTestRepo();
}
+ @Override
+ protected void tearDown() throws Exception {
+ deleteDirectory(localRepo);
+
+ super.tearDown();
+ }
+
private JavadocReport lookupMojo(Path testPom) throws Exception {
JavadocReport mojo = (JavadocReport) lookupMojo("javadoc", testPom.toFile());
@@ -121,10 +125,6 @@ public class JavadocReportTest extends AbstractMojoTestCase {
* @throws IOException if any
*/
private void createTestRepo() throws IOException {
- if (TEST_REPO_CREATED) {
- return;
- }
-
localRepo.mkdirs();
// ----------------------------------------------------------------------
@@ -145,7 +145,7 @@ public class JavadocReportTest extends AbstractMojoTestCase {
// ----------------------------------------------------------------------
// commons-attributes-compiler
- // http://www.tullmann.org/pat/taglets/
+ // https://www.tullmann.org/pat/taglets/
// ----------------------------------------------------------------------
sourceDir = unit.resolve("taglet-test/artifact-taglet");
@@ -180,8 +180,6 @@ public class JavadocReportTest extends AbstractMojoTestCase {
file.delete();
}
}
-
- TEST_REPO_CREATED = true;
}
/**