Sync from SUSE:SLFO:Main open-test-reporting revision ca648b8603c33432e232a88d4c3d055f
This commit is contained in:
commit
fe581ea5f5
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
263
0001-Java-8-compatibility.patch
Normal file
263
0001-Java-8-compatibility.patch
Normal file
@ -0,0 +1,263 @@
|
||||
From ac129f1392ab200ec0d9832168cb90dae2fcb6c8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
|
||||
Date: Fri, 26 Apr 2024 15:57:53 +0200
|
||||
Subject: [PATCH] Java 8 compatibility
|
||||
|
||||
---
|
||||
.../reporting/cli/ConvertCommand.java | 4 +--
|
||||
.../reporting/cli/ValidateCommand.java | 11 ++++---
|
||||
.../tooling/converter/DefaultConverter.java | 25 +++++++-------
|
||||
.../tooling/validator/DefaultValidator.java | 33 +++++++++++--------
|
||||
.../tooling/validator/ValidationResult.java | 3 +-
|
||||
5 files changed, 42 insertions(+), 34 deletions(-)
|
||||
|
||||
diff --git a/cli/src/main/java/org/opentest4j/reporting/cli/ConvertCommand.java b/cli/src/main/java/org/opentest4j/reporting/cli/ConvertCommand.java
|
||||
index 7c12f32..f478514 100644
|
||||
--- a/cli/src/main/java/org/opentest4j/reporting/cli/ConvertCommand.java
|
||||
+++ b/cli/src/main/java/org/opentest4j/reporting/cli/ConvertCommand.java
|
||||
@@ -38,8 +38,8 @@ public class ConvertCommand implements Callable<Integer> {
|
||||
|
||||
@Override
|
||||
public Integer call() throws Exception {
|
||||
- var targetFile = eventsXml.resolveSibling("hierarchy.xml");
|
||||
- var converter = new DefaultConverter();
|
||||
+ Path targetFile = eventsXml.resolveSibling("hierarchy.xml");
|
||||
+ DefaultConverter converter = new DefaultConverter();
|
||||
converter.convert(eventsXml, targetFile);
|
||||
LOG.info("Converted {} to {}", eventsXml, targetFile);
|
||||
return 0;
|
||||
diff --git a/cli/src/main/java/org/opentest4j/reporting/cli/ValidateCommand.java b/cli/src/main/java/org/opentest4j/reporting/cli/ValidateCommand.java
|
||||
index 03f5615..82b3289 100644
|
||||
--- a/cli/src/main/java/org/opentest4j/reporting/cli/ValidateCommand.java
|
||||
+++ b/cli/src/main/java/org/opentest4j/reporting/cli/ValidateCommand.java
|
||||
@@ -27,6 +27,7 @@ import picocli.CommandLine.Parameters;
|
||||
|
||||
import java.net.URI;
|
||||
import java.nio.file.Path;
|
||||
+import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
@@ -45,7 +46,7 @@ public class ValidateCommand implements Callable<Integer> {
|
||||
List<Path> xmlFiles;
|
||||
|
||||
@Option(names = "--catalog")
|
||||
- List<Path> catalogs = List.of();
|
||||
+ List<Path> catalogs = Arrays.asList();
|
||||
|
||||
@Override
|
||||
public Integer call() {
|
||||
@@ -53,9 +54,9 @@ public class ValidateCommand implements Callable<Integer> {
|
||||
}
|
||||
|
||||
private boolean validateAll() {
|
||||
- var validator = new DefaultValidator(catalogs.stream().map(Path::toUri).toArray(URI[]::new));
|
||||
+ Validator validator = new DefaultValidator(catalogs.stream().map(Path::toUri).toArray(URI[]::new));
|
||||
boolean allValid = true;
|
||||
- for (var xmlFile : xmlFiles) {
|
||||
+ for (Path xmlFile : xmlFiles) {
|
||||
allValid &= validate(validator, xmlFile);
|
||||
}
|
||||
return allValid;
|
||||
@@ -63,9 +64,9 @@ public class ValidateCommand implements Callable<Integer> {
|
||||
|
||||
private boolean validate(Validator validator, Path xmlFile) {
|
||||
try {
|
||||
- var validationResult = validator.validate(xmlFile);
|
||||
+ ValidationResult validationResult = validator.validate(xmlFile);
|
||||
logValidationMessages(validationResult);
|
||||
- var errors = validationResult.count(ERROR);
|
||||
+ long errors = validationResult.count(ERROR);
|
||||
if (errors == 0) {
|
||||
LOG.info("Valid: {}", xmlFile);
|
||||
return true;
|
||||
diff --git a/tooling/src/main/java/org/opentest4j/reporting/tooling/converter/DefaultConverter.java b/tooling/src/main/java/org/opentest4j/reporting/tooling/converter/DefaultConverter.java
|
||||
index 05135f7..9283a5c 100644
|
||||
--- a/tooling/src/main/java/org/opentest4j/reporting/tooling/converter/DefaultConverter.java
|
||||
+++ b/tooling/src/main/java/org/opentest4j/reporting/tooling/converter/DefaultConverter.java
|
||||
@@ -39,17 +39,17 @@ import javax.xml.transform.stream.StreamResult;
|
||||
import java.nio.file.Path;
|
||||
import java.time.Duration;
|
||||
import java.time.Instant;
|
||||
+import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.function.BiPredicate;
|
||||
import java.util.function.IntFunction;
|
||||
+import java.util.stream.Collectors;
|
||||
import java.util.stream.IntStream;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
-import static java.util.stream.Collectors.toList;
|
||||
-import static java.util.stream.Collectors.toUnmodifiableSet;
|
||||
import static javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING;
|
||||
import static javax.xml.XMLConstants.XMLNS_ATTRIBUTE;
|
||||
import static javax.xml.XMLConstants.XMLNS_ATTRIBUTE_NS_URI;
|
||||
@@ -70,7 +70,7 @@ public class DefaultConverter implements Converter {
|
||||
|
||||
private static final Set<String> EVENT_ONLY_ATTRIBUTES = Stream.of(Event.ID, Event.TIME, Started.PARENT_ID) //
|
||||
.map(QualifiedName::getSimpleName) //
|
||||
- .collect(toUnmodifiableSet());
|
||||
+ .collect(Collectors.collectingAndThen(Collectors.toSet(), Collections::unmodifiableSet));
|
||||
|
||||
@Override
|
||||
public void convert(Path eventsXmlFile, Path hierarchicalXmlFile) throws Exception {
|
||||
@@ -182,7 +182,7 @@ public class DefaultConverter implements Converter {
|
||||
private void moveChildrenToEnd(Element targetElement) {
|
||||
stream(targetElement.getChildNodes()) //
|
||||
.filter(child -> CHILD_NODE_NAME.equals(child.getNodeName())) //
|
||||
- .collect(toList()) // avoid concurrent modification
|
||||
+ .collect(Collectors.toList()) // avoid concurrent modification
|
||||
.forEach(child -> {
|
||||
targetElement.removeChild(child);
|
||||
targetElement.appendChild(child);
|
||||
@@ -201,14 +201,15 @@ public class DefaultConverter implements Converter {
|
||||
|
||||
private void mergeChildren(Node sourceElement, Node targetElement) {
|
||||
stream(sourceElement.getChildNodes()) //
|
||||
- .forEach(sourceChild -> findNode(targetElement.getChildNodes(), sourceChild.getNodeName()) //
|
||||
- .ifPresentOrElse( //
|
||||
- existingNode -> copyChildren(sourceChild, existingNode), //
|
||||
- () -> {
|
||||
- Node targetChild = sourceChild.cloneNode(true);
|
||||
- targetElement.getOwnerDocument().adoptNode(targetChild);
|
||||
- targetElement.appendChild(targetChild);
|
||||
- }));
|
||||
+ .forEach(sourceChild -> {
|
||||
+ Optional<Node> existingNode = findNode(targetElement.getChildNodes(), sourceChild.getNodeName());
|
||||
+ existingNode.ifPresent(existing -> copyChildren(sourceChild, existing));
|
||||
+ if (!existingNode.isPresent()) {
|
||||
+ Node targetChild = sourceChild.cloneNode(true);
|
||||
+ targetElement.getOwnerDocument().adoptNode(targetChild);
|
||||
+ targetElement.appendChild(targetChild);
|
||||
+ }
|
||||
+ });
|
||||
}
|
||||
|
||||
private Optional<Node> findNode(NodeList nodes, String name) {
|
||||
diff --git a/tooling/src/main/java/org/opentest4j/reporting/tooling/validator/DefaultValidator.java b/tooling/src/main/java/org/opentest4j/reporting/tooling/validator/DefaultValidator.java
|
||||
index 5e5b204..8ed4d05 100644
|
||||
--- a/tooling/src/main/java/org/opentest4j/reporting/tooling/validator/DefaultValidator.java
|
||||
+++ b/tooling/src/main/java/org/opentest4j/reporting/tooling/validator/DefaultValidator.java
|
||||
@@ -37,12 +37,16 @@ import java.io.Reader;
|
||||
import java.net.URI;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
+import java.util.AbstractMap;
|
||||
import java.util.ArrayList;
|
||||
+import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
+import java.util.stream.Collectors;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
import static javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI;
|
||||
+import javax.xml.catalog.CatalogFeatures;
|
||||
import static javax.xml.catalog.CatalogManager.catalogResolver;
|
||||
import static org.opentest4j.reporting.tooling.validator.Severity.ERROR;
|
||||
import static org.opentest4j.reporting.tooling.validator.Severity.WARNING;
|
||||
@@ -52,11 +56,12 @@ import static org.opentest4j.reporting.tooling.validator.Severity.WARNING;
|
||||
*/
|
||||
public class DefaultValidator implements Validator {
|
||||
|
||||
- private static final Map<Namespace, String> SCHEMAS = Map.of( //
|
||||
- Namespace.REPORTING_EVENTS, "/org/opentest4j/reporting/schema/events.xsd", //
|
||||
- Namespace.REPORTING_HIERARCHY, "/org/opentest4j/reporting/schema/hierarchy.xsd", //
|
||||
- Namespace.REPORTING_CORE, "/org/opentest4j/reporting/schema/core.xsd", //
|
||||
- Namespace.REPORTING_JAVA, "/org/opentest4j/reporting/schema/java.xsd");
|
||||
+ private static final Map<Namespace, String> SCHEMAS = Arrays.asList(
|
||||
+ new AbstractMap.SimpleEntry<Namespace, String>(Namespace.REPORTING_EVENTS, "/org/opentest4j/reporting/schema/events.xsd"),
|
||||
+ new AbstractMap.SimpleEntry<Namespace, String>(Namespace.REPORTING_HIERARCHY, "/org/opentest4j/reporting/schema/hierarchy.xsd"),
|
||||
+ new AbstractMap.SimpleEntry<Namespace, String>(Namespace.REPORTING_CORE, "/org/opentest4j/reporting/schema/core.xsd"),
|
||||
+ new AbstractMap.SimpleEntry<Namespace, String>(Namespace.REPORTING_JAVA, "/org/opentest4j/reporting/schema/java.xsd")
|
||||
+ ).stream().collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
||||
|
||||
private final SchemaFactory schemaFactory = SchemaFactory.newInstance(W3C_XML_SCHEMA_NS_URI);
|
||||
private final CatalogResolver catalogResolver;
|
||||
@@ -67,13 +72,13 @@ public class DefaultValidator implements Validator {
|
||||
* @param catalogs for resolving references to XML schemas
|
||||
*/
|
||||
public DefaultValidator(URI... catalogs) {
|
||||
- var features = CatalogFeatures.builder().with(Feature.RESOLVE, "continue").build();
|
||||
+ CatalogFeatures features = CatalogFeatures.builder().with(Feature.RESOLVE, "continue").build();
|
||||
this.catalogResolver = catalogResolver(features, catalogs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ValidationResult validate(Path xmlFile) {
|
||||
- try (var in = Files.newInputStream(xmlFile)) {
|
||||
+ try (InputStream in = Files.newInputStream(xmlFile)) {
|
||||
return validateSafely(xmlFile, new StreamSource(in));
|
||||
}
|
||||
catch (Exception e) {
|
||||
@@ -82,13 +87,13 @@ public class DefaultValidator implements Validator {
|
||||
}
|
||||
|
||||
private ValidationResult validateSafely(Path xmlFile, Source source) throws SAXException, IOException {
|
||||
- var errorHandler = new CollectingErrorHandler(xmlFile);
|
||||
+ CollectingErrorHandler errorHandler = new CollectingErrorHandler(xmlFile);
|
||||
validate(source, errorHandler);
|
||||
return errorHandler.toValidationResult();
|
||||
}
|
||||
|
||||
private void validate(Source source, ErrorHandler errorHandler) throws SAXException, IOException {
|
||||
- var validator = schemaFactory.newSchema().newValidator();
|
||||
+ javax.xml.validation.Validator validator = schemaFactory.newSchema().newValidator();
|
||||
validator.setResourceResolver(createResourceResolver());
|
||||
validator.setErrorHandler(errorHandler);
|
||||
validator.validate(source);
|
||||
@@ -97,14 +102,14 @@ public class DefaultValidator implements Validator {
|
||||
private LSResourceResolver createResourceResolver() {
|
||||
return (type, namespaceURI, publicId, systemId, baseURI) -> {
|
||||
if (namespaceURI != null) {
|
||||
- var namespace = Namespace.of(namespaceURI);
|
||||
+ Namespace namespace = Namespace.of(namespaceURI);
|
||||
if (SCHEMAS.containsKey(namespace)) {
|
||||
LSInputImpl input = new LSInputImpl();
|
||||
input.setPublicId(publicId);
|
||||
- var schema = SCHEMAS.get(namespace);
|
||||
+ String schema = SCHEMAS.get(namespace);
|
||||
input.setSystemId(requireNonNull(Namespace.class.getResource(schema)).toExternalForm());
|
||||
input.setBaseURI(baseURI);
|
||||
- var stream = Namespace.class.getResourceAsStream(schema);
|
||||
+ InputStream stream = Namespace.class.getResourceAsStream(schema);
|
||||
input.setCharacterStream(new InputStreamReader(requireNonNull(stream)));
|
||||
return input;
|
||||
}
|
||||
@@ -227,8 +232,8 @@ public class DefaultValidator implements Validator {
|
||||
}
|
||||
|
||||
private void addValidationMessage(Severity severity, SAXParseException e) {
|
||||
- var path = e.getSystemId() == null ? xmlFile.toString() : e.getSystemId();
|
||||
- var location = new Location(path, e.getLineNumber(), e.getColumnNumber());
|
||||
+ String path = e.getSystemId() == null ? xmlFile.toString() : e.getSystemId();
|
||||
+ Location location = new Location(path, e.getLineNumber(), e.getColumnNumber());
|
||||
messages.add(new ValidationMessage(severity, location, e.getMessage()));
|
||||
}
|
||||
|
||||
diff --git a/tooling/src/main/java/org/opentest4j/reporting/tooling/validator/ValidationResult.java b/tooling/src/main/java/org/opentest4j/reporting/tooling/validator/ValidationResult.java
|
||||
index 01e9352..ea650b0 100644
|
||||
--- a/tooling/src/main/java/org/opentest4j/reporting/tooling/validator/ValidationResult.java
|
||||
+++ b/tooling/src/main/java/org/opentest4j/reporting/tooling/validator/ValidationResult.java
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.opentest4j.reporting.tooling.validator;
|
||||
|
||||
+import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
@@ -30,7 +31,7 @@ public class ValidationResult implements Iterable<ValidationMessage> {
|
||||
private final List<ValidationMessage> messages;
|
||||
|
||||
ValidationResult(List<ValidationMessage> messages) {
|
||||
- this.messages = List.copyOf(messages);
|
||||
+ this.messages = new ArrayList<ValidationMessage>(messages);
|
||||
}
|
||||
|
||||
/**
|
||||
--
|
||||
2.44.0
|
||||
|
BIN
open-test-reporting-build.tar.xz
(Stored with Git LFS)
Normal file
BIN
open-test-reporting-build.tar.xz
(Stored with Git LFS)
Normal file
Binary file not shown.
66
open-test-reporting-cli-0.1.0-M2.pom
Normal file
66
open-test-reporting-cli-0.1.0-M2.pom
Normal file
@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<!-- This module was also published with a richer model, Gradle metadata, -->
|
||||
<!-- which should be used instead. Do not delete the following line which -->
|
||||
<!-- is to indicate to Gradle or any Gradle module metadata file consumer -->
|
||||
<!-- that they should prefer consuming it instead. -->
|
||||
<!-- do_not_remove: published-with-gradle-metadata -->
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.opentest4j.reporting</groupId>
|
||||
<artifactId>open-test-reporting-cli</artifactId>
|
||||
<version>0.1.0-M2</version>
|
||||
<name>open-test-reporting-cli</name>
|
||||
<description>Module "cli" of open-test-reporting</description>
|
||||
<url>https://github.com/ota4j-team/open-test-reporting</url>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>The Apache License, Version 2.0</name>
|
||||
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
</license>
|
||||
</licenses>
|
||||
<developers>
|
||||
<developer>
|
||||
<id>marcphilipp</id>
|
||||
<name>Marc Philipp</name>
|
||||
<email>marc@junit.org</email>
|
||||
</developer>
|
||||
</developers>
|
||||
<scm>
|
||||
<connection>scm:git:git://github.com/ota4j-team/open-test-reporting.git</connection>
|
||||
<developerConnection>scm:git:git://github.com/ota4j-team/open-test-reporting.git</developerConnection>
|
||||
<url>https://github.com/ota4j-team/open-test-reporting</url>
|
||||
</scm>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.opentest4j.reporting</groupId>
|
||||
<artifactId>open-test-reporting-events</artifactId>
|
||||
<version>0.1.0-M2</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.opentest4j.reporting</groupId>
|
||||
<artifactId>open-test-reporting-tooling</artifactId>
|
||||
<version>0.1.0-M2</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>info.picocli</groupId>
|
||||
<artifactId>picocli</artifactId>
|
||||
<version>4.7.5</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>2.0.13</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-slf4j-impl</artifactId>
|
||||
<version>2.23.1</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
42
open-test-reporting-events-0.1.0-M2.pom
Normal file
42
open-test-reporting-events-0.1.0-M2.pom
Normal file
@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<!-- This module was also published with a richer model, Gradle metadata, -->
|
||||
<!-- which should be used instead. Do not delete the following line which -->
|
||||
<!-- is to indicate to Gradle or any Gradle module metadata file consumer -->
|
||||
<!-- that they should prefer consuming it instead. -->
|
||||
<!-- do_not_remove: published-with-gradle-metadata -->
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.opentest4j.reporting</groupId>
|
||||
<artifactId>open-test-reporting-events</artifactId>
|
||||
<version>0.1.0-M2</version>
|
||||
<name>open-test-reporting-events</name>
|
||||
<description>Module "events" of open-test-reporting</description>
|
||||
<url>https://github.com/ota4j-team/open-test-reporting</url>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>The Apache License, Version 2.0</name>
|
||||
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
</license>
|
||||
</licenses>
|
||||
<developers>
|
||||
<developer>
|
||||
<id>marcphilipp</id>
|
||||
<name>Marc Philipp</name>
|
||||
<email>marc@junit.org</email>
|
||||
</developer>
|
||||
</developers>
|
||||
<scm>
|
||||
<connection>scm:git:git://github.com/ota4j-team/open-test-reporting.git</connection>
|
||||
<developerConnection>scm:git:git://github.com/ota4j-team/open-test-reporting.git</developerConnection>
|
||||
<url>https://github.com/ota4j-team/open-test-reporting</url>
|
||||
</scm>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.opentest4j.reporting</groupId>
|
||||
<artifactId>open-test-reporting-schema</artifactId>
|
||||
<version>0.1.0-M2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
34
open-test-reporting-schema-0.1.0-M2.pom
Normal file
34
open-test-reporting-schema-0.1.0-M2.pom
Normal file
@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<!-- This module was also published with a richer model, Gradle metadata, -->
|
||||
<!-- which should be used instead. Do not delete the following line which -->
|
||||
<!-- is to indicate to Gradle or any Gradle module metadata file consumer -->
|
||||
<!-- that they should prefer consuming it instead. -->
|
||||
<!-- do_not_remove: published-with-gradle-metadata -->
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.opentest4j.reporting</groupId>
|
||||
<artifactId>open-test-reporting-schema</artifactId>
|
||||
<version>0.1.0-M2</version>
|
||||
<name>open-test-reporting-schema</name>
|
||||
<description>Module "schema" of open-test-reporting</description>
|
||||
<url>https://github.com/ota4j-team/open-test-reporting</url>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>The Apache License, Version 2.0</name>
|
||||
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
</license>
|
||||
</licenses>
|
||||
<developers>
|
||||
<developer>
|
||||
<id>marcphilipp</id>
|
||||
<name>Marc Philipp</name>
|
||||
<email>marc@junit.org</email>
|
||||
</developer>
|
||||
</developers>
|
||||
<scm>
|
||||
<connection>scm:git:git://github.com/ota4j-team/open-test-reporting.git</connection>
|
||||
<developerConnection>scm:git:git://github.com/ota4j-team/open-test-reporting.git</developerConnection>
|
||||
<url>https://github.com/ota4j-team/open-test-reporting</url>
|
||||
</scm>
|
||||
</project>
|
48
open-test-reporting-tooling-0.1.0-M2.pom
Normal file
48
open-test-reporting-tooling-0.1.0-M2.pom
Normal file
@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<!-- This module was also published with a richer model, Gradle metadata, -->
|
||||
<!-- which should be used instead. Do not delete the following line which -->
|
||||
<!-- is to indicate to Gradle or any Gradle module metadata file consumer -->
|
||||
<!-- that they should prefer consuming it instead. -->
|
||||
<!-- do_not_remove: published-with-gradle-metadata -->
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.opentest4j.reporting</groupId>
|
||||
<artifactId>open-test-reporting-tooling</artifactId>
|
||||
<version>0.1.0-M2</version>
|
||||
<name>open-test-reporting-tooling</name>
|
||||
<description>Module "tooling" of open-test-reporting</description>
|
||||
<url>https://github.com/ota4j-team/open-test-reporting</url>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>The Apache License, Version 2.0</name>
|
||||
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
</license>
|
||||
</licenses>
|
||||
<developers>
|
||||
<developer>
|
||||
<id>marcphilipp</id>
|
||||
<name>Marc Philipp</name>
|
||||
<email>marc@junit.org</email>
|
||||
</developer>
|
||||
</developers>
|
||||
<scm>
|
||||
<connection>scm:git:git://github.com/ota4j-team/open-test-reporting.git</connection>
|
||||
<developerConnection>scm:git:git://github.com/ota4j-team/open-test-reporting.git</developerConnection>
|
||||
<url>https://github.com/ota4j-team/open-test-reporting</url>
|
||||
</scm>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.opentest4j.reporting</groupId>
|
||||
<artifactId>open-test-reporting-schema</artifactId>
|
||||
<version>0.1.0-M2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.opentest4j.reporting</groupId>
|
||||
<artifactId>open-test-reporting-events</artifactId>
|
||||
<version>0.1.0-M2</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
14
open-test-reporting.changes
Normal file
14
open-test-reporting.changes
Normal file
@ -0,0 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat May 4 00:57:01 UTC 2024 - Anton Shvetz <shvetz.anton@gmail.com>
|
||||
|
||||
- JPMS: Add the Automatic-Module-Name attribute to the manifests
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 29 11:55:18 UTC 2024 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- The binaries are compatible with java 1.8
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 26 18:22:31 UTC 2024 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Initial packaging of version 0.1.0-M2
|
147
open-test-reporting.spec
Normal file
147
open-test-reporting.spec
Normal file
@ -0,0 +1,147 @@
|
||||
#
|
||||
# spec file for package open-test-reporting
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%global basever 0.1.0
|
||||
%global milestone M2
|
||||
%global filever %{basever}-%{milestone}
|
||||
# The automatic requires would be java-headless >= 9, but the
|
||||
# binaries are java 8 compatible
|
||||
%define __requires_exclude java-headless
|
||||
Name: open-test-reporting
|
||||
Version: %{basever}~%{milestone}
|
||||
Release: 0
|
||||
Summary: Language-agnostic test reporting format and tooling
|
||||
License: Apache-2.0
|
||||
Group: Development/Libraries/Java
|
||||
URL: https://github.com/ota4j-team/%{name}
|
||||
Source0: https://github.com/ota4j-team/%{name}/archive/refs/tags/r%{filever}.tar.gz
|
||||
Source1: %{name}-build.tar.xz
|
||||
Source10: https://repo1.maven.org/maven2/org/opentest4j/reporting/%{name}-cli/%{filever}/%{name}-cli-%{filever}.pom
|
||||
Source11: https://repo1.maven.org/maven2/org/opentest4j/reporting/%{name}-events/%{filever}/%{name}-events-%{filever}.pom
|
||||
Source12: https://repo1.maven.org/maven2/org/opentest4j/reporting/%{name}-schema/%{filever}/%{name}-schema-%{filever}.pom
|
||||
Source13: https://repo1.maven.org/maven2/org/opentest4j/reporting/%{name}-tooling/%{filever}/%{name}-tooling-%{filever}.pom
|
||||
Patch0: 0001-Java-8-compatibility.patch
|
||||
BuildRequires: ant
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: java-devel >= 9
|
||||
BuildRequires: javapackages-local >= 6
|
||||
BuildRequires: picocli
|
||||
BuildRequires: slf4j
|
||||
Requires: java-headless >= 1.8
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
Test reporting formats that are agnostic of testing framework
|
||||
and programming language.
|
||||
|
||||
%package cli
|
||||
Summary: Module 'cli' of %{name}
|
||||
Group: Development/Libraries/Java
|
||||
Requires: java-headless >= 1.8
|
||||
|
||||
%description cli
|
||||
Test reporting formats that are agnostic of testing framework
|
||||
and programming language.
|
||||
This package contains the module 'cli'.
|
||||
|
||||
%package events
|
||||
Summary: Module 'events' of %{name}
|
||||
Group: Development/Libraries/Java
|
||||
Requires: java-headless >= 1.8
|
||||
|
||||
%description events
|
||||
Test reporting formats that are agnostic of testing framework
|
||||
and programming language.
|
||||
This package contains the module 'events'
|
||||
|
||||
%package schema
|
||||
Summary: Module 'schema' of %{name}
|
||||
Group: Development/Libraries/Java
|
||||
Requires: java-headless >= 1.8
|
||||
|
||||
%description schema
|
||||
Test reporting formats that are agnostic of testing framework
|
||||
and programming language.
|
||||
This package contains the module 'schema'.
|
||||
|
||||
%package tooling
|
||||
Summary: Module 'tooling' of %{name}
|
||||
Group: Development/Libraries/Java
|
||||
Requires: java-headless >= 9
|
||||
|
||||
%description tooling
|
||||
Test reporting formats that are agnostic of testing framework
|
||||
and programming language.
|
||||
This package contains the module 'tooling'.
|
||||
|
||||
%package javadoc
|
||||
Summary: Javadoc for %{name}
|
||||
Group: Documentation/HTML
|
||||
|
||||
%description javadoc
|
||||
This package contains the API documentation for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-r%{filever} -a1
|
||||
%patch -P 0 -p1
|
||||
cp %{SOURCE10} cli/pom.xml
|
||||
cp %{SOURCE11} events/pom.xml
|
||||
cp %{SOURCE12} schema/pom.xml
|
||||
cp %{SOURCE13} tooling/pom.xml
|
||||
mkdir -p lib
|
||||
|
||||
%pom_change_dep :log4j-slf4j-impl : cli '
|
||||
<optional>true</optional>'
|
||||
|
||||
%build
|
||||
build-jar-repository -s lib picocli/picocli slf4j/api
|
||||
|
||||
%{ant} package javadoc
|
||||
|
||||
%install
|
||||
install -d -m 0755 %{buildroot}%{_javadir}/%{name}
|
||||
install -d -m 0755 %{buildroot}%{_mavenpomdir}/%{name}
|
||||
install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
|
||||
for module in schema events tooling cli; do
|
||||
# jars
|
||||
install -p -m 0644 ${module}/target/%{name}-${module}.jar %{buildroot}%{_javadir}/%{name}/${module}.jar
|
||||
#pom
|
||||
%{mvn_install_pom} ${module}/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/${module}.pom
|
||||
%add_maven_depmap %{name}/${module}.pom %{name}/${module}.jar -f ${module}
|
||||
# javadoc
|
||||
cp -r ${module}/target/site/apidocs %{buildroot}%{_javadocdir}/%{name}/${module}
|
||||
done
|
||||
|
||||
%fdupes -s %{buildroot}%{_javadocdir}
|
||||
|
||||
%files cli -f .mfiles-cli
|
||||
%license LICENSE.md
|
||||
|
||||
%files events -f .mfiles-events
|
||||
%license LICENSE.md
|
||||
|
||||
%files schema -f .mfiles-schema
|
||||
%license LICENSE.md
|
||||
|
||||
%files tooling -f .mfiles-tooling
|
||||
%license LICENSE.md
|
||||
|
||||
%files javadoc
|
||||
%{_javadocdir}/%{name}
|
||||
|
||||
%changelog
|
BIN
r0.1.0-M2.tar.gz
(Stored with Git LFS)
Normal file
BIN
r0.1.0-M2.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user