# It's extremely hard (lots of dependencies) to package weld, so just including binaries here
%global pkg_version 3.1.9
%global weld_version %{pkg_version}.Final
Name: weld-se
Version: %{pkg_version}
Release: 0.1%{?dist}
Summary: Weld SE (Uber Jar)
License: ASL 2.0
URL: https://weld.cdi-spec.org
Source0: https://repo1.maven.org/maven2/org/jboss/weld/se/weld-se-shaded/%{weld_version}/weld-se-shaded-%{weld_version}.jar
Source1: https://repo1.maven.org/maven2/org/jboss/weld/se/weld-se-shaded/%{weld_version}/weld-se-shaded-%{weld_version}.pom
Source2: https://www.apache.org/licenses/LICENSE-2.0.txt
BuildArch: noarch
BuildRequires: java-11-openjdk-devel
BuildRequires: maven-local
Provides: mvn(org.jboss.weld.se:weld-se-core) = %{weld_version}
Provides: mvn(org.jboss.weld.se:weld-se-core:pom:) = %{weld_version}
Requires: (java-headless or java-11-headless)
Requires: javapackages-filesystem
%description
%{name} bundles all the bits of Weld and CDI required for Java SE.
%prep
cp %{SOURCE0} .
cp %{SOURCE1} pom.xml
cp %{SOURCE2} .
%pom_remove_parent
%pom_xpath_inject pom:project "%{weld_version}"
%mvn_file org.jboss.weld.se:weld-se-shaded %{name}
%build
%mvn_artifact pom.xml %{name}-shaded-%{weld_version}.jar
%install
%mvn_install
%files -f .mfiles
%license LICENSE-2.0.txt
%changelog
* Tue Jan 21 2025 Jean-Louis Dupond - 3.1.9-0.1
- Update to upstream 3.1.9
- Use the shaded jar to build.
- Move to mvn packaging
* Mon Mar 21 2022 Martin Perina - 2.3.5-0.1
- Initial RPM release
- Just bundled JAR due to high number of build dependencies