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
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
import org.apache.maven.project.inheritance.AbstractProjectInheritanceTestCase;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.OS;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.condition.OS.WINDOWS;

/**
* A test which demonstrates maven's recursive inheritance where
Expand Down Expand Up @@ -64,7 +64,7 @@ class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
// ----------------------------------------------------------------------

@Test
@DisabledOnOs(OS.WINDOWS) // need to investigate why it fails on windows
@DisabledOnOs(value = WINDOWS, disabledReason = "need to investigate why it fails on windows")
void testProjectInheritance() throws Exception {
File localRepo = getLocalRepositoryPath();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,16 @@
import org.apache.maven.cling.executor.embedded.EmbeddedMavenExecutor;
import org.apache.maven.cling.executor.forked.ForkedMavenExecutor;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.io.CleanupMode;
import org.junit.jupiter.api.io.TempDir;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.condition.OS.WINDOWS;

public abstract class MavenExecutorTestSupport {
@Timeout(15)
Expand All @@ -63,7 +64,9 @@ void mvnenc(
System.out.println(Files.readString(cwd.resolve(logfile)));
}

@Disabled("JUnit on Windows fails to clean up as mvn3 seems does not close log file properly")
@DisabledOnOs(
value = WINDOWS,
disabledReason = "JUnit on Windows fails to clean up as mvn3 does not close log file properly")
@Timeout(15)
@Test
void dump3(
Expand Down Expand Up @@ -126,7 +129,9 @@ void version() throws Exception {
mavenVersion(mvn4ExecutorRequestBuilder().build()));
}

@Disabled("JUnit on Windows fails to clean up as mvn3 seems does not close log file properly")
@DisabledOnOs(
value = WINDOWS,
disabledReason = "JUnit on Windows fails to clean up as mvn3 does not close log file properly")
@Timeout(15)
@Test
void defaultFs3x(@TempDir(cleanup = CleanupMode.ON_SUCCESS) Path tempDir) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,16 @@
import org.apache.maven.api.services.xml.XmlWriterException;
import org.apache.maven.api.services.xml.XmlWriterRequest;
import org.apache.maven.impl.model.DefaultModelProcessor;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.io.TempDir;

import static java.util.UUID.randomUUID;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.AssertionsForClassTypes.assertThatExceptionOfType;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.condition.OS.WINDOWS;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

Expand Down Expand Up @@ -251,7 +252,9 @@ void locateExistingPomWithFilePathShouldReturnSameFileIfRegularFile() throws IOE
}

@Test
@Disabled("maybe bug in JUnit, as MS-DOS only https://github.com/apache/maven/pull/2312#issuecomment-2876291814")
@DisabledOnOs(
value = WINDOWS,
disabledReason = "windows related issue https://github.com/apache/maven/pull/2312#issuecomment-2876291814")
void readFromUrlParsesPluginDescriptorCorrectly() throws Exception {
Path xmlFile = tempDir.resolve("plugin.xml");
Files.write(xmlFile, SAMPLE_PLUGIN_XML.getBytes());
Expand Down