From 6fb49b16ec4070bfeb6b20026b60f05918daac15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mari=C3=A1n=20Kon=C4=8Dek?= Date: Mon, 30 Jan 2023 11:15:26 +0100 Subject: [PATCH] Initial build Related: rhbz#2161586 --- .fmf/version | 1 + .gitignore | 1 + gating.yaml | 7 +++++ jakarta-activation2.spec | 65 ++++++++++++++++++++++++++++++++++++++++ plans/Smoke.java | 15 ++++++++++ plans/smoke.fmf | 17 +++++++++++ sources | 1 + 7 files changed, 107 insertions(+) create mode 100644 .fmf/version create mode 100644 gating.yaml create mode 100644 jakarta-activation2.spec create mode 100644 plans/Smoke.java create mode 100644 plans/smoke.fmf create mode 100644 sources diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/.gitignore b/.gitignore index e69de29..0e11a95 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/jaf-2.1.1.tar.gz diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..f1bb5dd --- /dev/null +++ b/gating.yaml @@ -0,0 +1,7 @@ +--- !Policy +product_versions: + - rhel-9 +decision_contexts: + - osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/jakarta-activation2.spec b/jakarta-activation2.spec new file mode 100644 index 0000000..ae0bfa2 --- /dev/null +++ b/jakarta-activation2.spec @@ -0,0 +1,65 @@ +Name: jakarta-activation2 +Version: 2.1.1 +Release: 1%{?dist} +Summary: Jakarta Activation API +# spec is licensed under (EPL-2.0 and GPLv2 with exceptions) but is not shipped +License: BSD +URL: https://jakartaee.github.io/jaf-api/ +BuildArch: noarch + +Source0: https://github.com/eclipse-ee4j/jaf/archive/%{version}/jaf-%{version}.tar.gz + +BuildRequires: maven-local +BuildRequires: mvn(junit:junit) +BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) +BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin) +BuildRequires: mvn(org.apache.maven.plugins:maven-source-plugin) +BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) + +%description +Jakarta Activation lets you take advantage of standard services to: +determine the type of an arbitrary piece of data; encapsulate access to +it; discover the operations available on it; and instantiate the +appropriate bean to perform the operation(s). + +%package javadoc +Summary: Javadoc for %{name} + +%description javadoc +This package contains javadoc for %{name}. + +%prep +%setup -q -n jaf-api-%{version} + +pushd api +%pom_remove_parent + +# remove custom doclet configuration +%pom_remove_plugin :maven-javadoc-plugin + +%pom_remove_plugin -r :buildnumber-maven-plugin +%pom_remove_plugin -r :maven-enforcer-plugin + +%mvn_compat_version jakarta*: 2 %{version} 2.1.0 2.0.1 2.0.0 +popd + +%build +pushd api +%mvn_build +popd + +%install +pushd api +%mvn_install +popd + +%files -f api/.mfiles +%doc README.md +%license LICENSE.md NOTICE.md + +%files javadoc -f api/.mfiles-javadoc +%license LICENSE.md NOTICE.md + +%changelog +* Tue Jan 17 2023 Marian Koncek - 2.1.1-1 +- Initial build diff --git a/plans/Smoke.java b/plans/Smoke.java new file mode 100644 index 0000000..44333b8 --- /dev/null +++ b/plans/Smoke.java @@ -0,0 +1,15 @@ +import jakarta.activation.DataHandler; +import jakarta.activation.DataSource; +import jakarta.activation.MimeType; +import jakarta.activation.MimeTypeParseException; + +public class Smoke +{ + public static void main(String[] args) + { + System.out.println(DataHandler.class.getCanonicalName()); + System.out.println(DataSource.class.getCanonicalName()); + System.out.println(MimeType.class.getCanonicalName()); + System.out.println(MimeTypeParseException.class.getCanonicalName()); + } +} diff --git a/plans/smoke.fmf b/plans/smoke.fmf new file mode 100644 index 0000000..47841a4 --- /dev/null +++ b/plans/smoke.fmf @@ -0,0 +1,17 @@ +summary: Basic smoke test +prepare: + how: install + package: + - java-1.8.0-openjdk-devel + - xmvn-tools +discover: + how: shell + tests: + - name: /smoke/classpath-import + test: | + CLASSPATH+=":$(xmvn-resolve jakarta.activation:jakarta.activation-api:2)" + export CLASSPATH + /usr/lib/jvm/java-1.8.0-openjdk/bin/javac plans/Smoke.java + /usr/lib/jvm/java-1.8.0-openjdk/bin/java -cp "${CLASSPATH}:plans" Smoke +execute: + how: tmt diff --git a/sources b/sources new file mode 100644 index 0000000..24e348f --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (jaf-2.1.1.tar.gz) = 95dd5b6696cf3ec66ce843334375740057c37dc5b4503173f607c95bd6020e8d0b8f87ec13b6d9be4d397096300cc0acb323b5700ad7ff0428a178272c1da41f