|
37 | 37 | import org.apache.maven.api.services.xml.XmlWriterRequest; |
38 | 38 | import org.apache.maven.impl.model.DefaultModelProcessor; |
39 | 39 | import org.junit.jupiter.api.Test; |
40 | | -import org.junit.jupiter.api.condition.DisabledOnOs; |
41 | 40 | import org.junit.jupiter.api.io.TempDir; |
42 | 41 |
|
43 | 42 | import static java.util.UUID.randomUUID; |
44 | 43 | import static org.assertj.core.api.Assertions.assertThat; |
45 | 44 | import static org.assertj.core.api.AssertionsForClassTypes.assertThatExceptionOfType; |
46 | 45 | import static org.junit.jupiter.api.Assertions.assertNotNull; |
47 | 46 | import static org.junit.jupiter.api.Assertions.assertThrows; |
48 | | -import static org.junit.jupiter.api.condition.OS.WINDOWS; |
49 | 47 | import static org.mockito.Mockito.mock; |
50 | 48 | import static org.mockito.Mockito.when; |
51 | 49 |
|
52 | | -class DefaultPluginXmlFactoryReadWriteTest { |
| 50 | +class DefaultPluginXmlFactoryTest { |
53 | 51 |
|
54 | 52 | private static final String NAME = "sample-plugin-" + randomUUID(); |
55 | 53 | private static final String SAMPLE_PLUGIN_XML = |
@@ -252,15 +250,11 @@ void locateExistingPomWithFilePathShouldReturnSameFileIfRegularFile() throws IOE |
252 | 250 | } |
253 | 251 |
|
254 | 252 | @Test |
255 | | - @DisabledOnOs( |
256 | | - value = WINDOWS, |
257 | | - disabledReason = "windows related issue https://github.com/apache/maven/pull/2312#issuecomment-2876291814") |
258 | 253 | void readFromUrlParsesPluginDescriptorCorrectly() throws Exception { |
259 | 254 | Path xmlFile = tempDir.resolve("plugin.xml"); |
260 | 255 | Files.write(xmlFile, SAMPLE_PLUGIN_XML.getBytes()); |
261 | | - PluginDescriptor descriptor = defaultPluginXmlFactory.read(XmlReaderRequest.builder() |
262 | | - .inputStream(xmlFile.toUri().toURL().openStream()) |
263 | | - .build()); |
| 256 | + PluginDescriptor descriptor = defaultPluginXmlFactory.read( |
| 257 | + XmlReaderRequest.builder().url(xmlFile.toUri().toURL()).build()); |
264 | 258 | assertThat(descriptor.getName()).isEqualTo(NAME); |
265 | 259 | assertThat(descriptor.getGroupId()).isEqualTo("org.example"); |
266 | 260 | assertThat(descriptor.getArtifactId()).isEqualTo("sample-plugin"); |
|
0 commit comments