Bootstrap Maven as non-modular packages

Resolves: rhbz#1951482
This commit is contained in:
Mikolaj Izdebski 2021-06-08 20:17:56 +02:00
parent 9c99e03497
commit 6af0d46793
4 changed files with 104 additions and 40 deletions

2
.gitignore vendored
View File

@ -5,3 +5,5 @@
/1.1.tar.gz
/1.2.tar.gz
/cdi-2.0.tar.gz
/2.0.1.tar.gz
/2.0.2.tar.gz

View File

@ -0,0 +1,52 @@
From b8570328d6d781b9f7fd96381423c4b3cef352fe Mon Sep 17 00:00:00 2001
From: Marian Koncek <mkoncek@redhat.com>
Date: Wed, 18 Sep 2019 11:54:36 +0200
Subject: [PATCH] Remove dependency on glassfish-el
---
.../enterprise/inject/spi/BeanManager.java | 22 -------------------
1 file changed, 22 deletions(-)
diff --git a/api/src/main/java/javax/enterprise/inject/spi/BeanManager.java b/api/src/main/java/javax/enterprise/inject/spi/BeanManager.java
index 29c62af..b467727 100644
--- a/api/src/main/java/javax/enterprise/inject/spi/BeanManager.java
+++ b/api/src/main/java/javax/enterprise/inject/spi/BeanManager.java
@@ -17,8 +17,6 @@
package javax.enterprise.inject.spi;
-import javax.el.ELResolver;
-import javax.el.ExpressionFactory;
import javax.enterprise.context.ContextNotActiveException;
import javax.enterprise.context.spi.Context;
import javax.enterprise.context.spi.Contextual;
@@ -415,26 +413,6 @@ public interface BeanManager {
*/
public Context getContext(Class<? extends Annotation> scopeType);
- /**
- * Returns a {@link javax.el.ELResolver} that resolves beans by EL name.
- *
- * @return the {@link javax.el.ELResolver}
- */
- public ELResolver getELResolver();
-
- /**
- * Returns a wrapper {@link javax.el.ExpressionFactory} that delegates {@link javax.el.MethodExpression} and
- * {@link javax.el.ValueExpression} creation to the given {@link javax.el.ExpressionFactory}. When a Unified EL expression
- * is evaluated using a {@link javax.el.MethodExpression} or {@link javax.el.ValueExpression} returned by the wrapper
- * {@link javax.el.ExpressionFactory}, the container handles destruction of objects with scope
- * {@link javax.enterprise.context.Dependent}.
- *
- *
- * @param expressionFactory the {@link javax.el.ExpressionFactory} to wrap
- * @return the wrapped {@link javax.el.ExpressionFactory}
- */
- public ExpressionFactory wrapExpressionFactory(ExpressionFactory expressionFactory);
-
/**
* Obtain an {@link AnnotatedType} that may be used to read the annotations of the given class or interface.
*
--
2.21.0

View File

@ -1,69 +1,65 @@
%global srcname cdi
# Workaround for rhbz#1969370: __bootstrap macro is not defined in
# CentOS Stream, See https://bugzilla.redhat.com/1969370
%global __bootstrap ~bootstrap
%bcond_without bootstrap
Name: cdi-api
Version: 2.0
Version: 2.0.2
Release: 3%{?dist}
Summary: Contexts and Dependency Injection API
Summary: CDI API
License: ASL 2.0
URL: https://github.com/eclipse-ee4j/cdi
Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz
BuildArch: noarch
Source0: https://github.com/eclipse-ee4j/cdi/archive/%{version}.tar.gz
Patch1: 0001-Remove-dependency-on-glassfish-el.patch
BuildRequires: maven-local
BuildRequires: mvn(jakarta.interceptor:jakarta.interceptor-api)
BuildRequires: mvn(javax.el:javax.el-api)
BuildRequires: mvn(javax.inject:javax.inject)
%if %{with bootstrap}
BuildRequires: javapackages-bootstrap
%else
BuildRequires: %{?module_prefix}mvn(jakarta.inject:jakarta.inject-api)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.jboss.weld:weld-parent:pom:)
BuildRequires: mvn(org.testng:testng)
%endif
%description
APIs for JSR-299: Contexts and Dependency Injection for Java EE
%package javadoc
Summary: Javadoc for %{name}
%description javadoc
This package contains the API documentation for %{name}.
%{?javadoc_package}
%prep
%autosetup -n %{srcname}-%{version} -p1
%setup -q -n cdi-%{version}
# do not build specification documentation
%pom_remove_parent
%pom_remove_parent api
%pom_disable_module spec
%pom_remove_plugin -r :maven-javadoc-plugin
# do not install useless parent POM
%mvn_package javax.enterprise:cdi-spec __noinstall
# use new jakarta interceptors coordinates
%pom_change_dep :javax.interceptor-api jakarta.interceptor:jakarta.interceptor-api api
%pom_remove_dep :jakarta.el-api api
%pom_remove_dep :jakarta.interceptor-api api
rm -rf api/src/main/java/javax/enterprise/{context/,inject/spi/,inject/se/,inject/Model.java,inject/New.java}
%mvn_alias :jakarta.enterprise.cdi-api javax.enterprise:cdi-api
%build
%mvn_build
%mvn_build -f
%install
%mvn_install
%files -f .mfiles
%license spec/src/main/asciidoc/license-asl2.asciidoc
%license spec/src/main/asciidoc/license-jcp-final.asciidoc
%doc spec/src/main/asciidoc/cdi-spec.asciidoc
%files javadoc -f .mfiles-javadoc
%license spec/src/main/asciidoc/license-asl2.asciidoc
%license spec/src/main/asciidoc/license-jcp-final.asciidoc
%doc README.md
%license LICENSE.txt
%changelog
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 2.0-3
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Tue Jun 08 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.0.2-3
- Bootstrap Maven for CentOS Stream 9
* Mon May 17 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.0.2-2
- Bootstrap build
- Non-bootstrap build
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
@ -77,12 +73,27 @@ This package contains the API documentation for %{name}.
* Fri Jul 10 2020 Jiri Vanek <jvanek@redhat.com> - 1.2-13
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
* Sat May 16 2020 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.0.2-1
- Update to upstream version 2.0.2
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Sat Jan 25 2020 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.0.1-3
- Build with OpenJDK 8
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.0.1-2
- Mass rebuild for javapackages-tools 201902
* Wed Sep 18 2019 Marian Koncek <mkoncek@redhat.com> - 2.0.1-1
- Update to upstream version 2.0.1
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.2-9
- Mass rebuild for javapackages-tools 201901
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
@ -186,4 +197,3 @@ This package contains the API documentation for %{name}.
* Mon Feb 20 2012 Marek Goldmann <mgoldman@redhat.com> 1.0-1.SP4
- Initial packaging

View File

@ -1 +1 @@
SHA512 (cdi-2.0.tar.gz) = 770ffdc31e20d465302678d2d7a0e7e5c26f3d981348cc732574d475f53f2ae96eba4190f495dc5e2c915777febd544d60a85fb318d8c962c4d4bff14a88bf6a
SHA512 (2.0.2.tar.gz) = 90c942115a6835ce0f8b69aa9722198d6615d7b5b09fbd4260b2f89196895d674d7acd22c15499e7d17e7345d8ed78ce0e40c99a9a04915245641ca47c23b6c2