From f00e25b9288ec932963504d82273a5c508fc3e7858f54d2b2cafd79bd927529c Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Sat, 2 Apr 2022 17:54:35 +0000 Subject: [PATCH 1/5] OBS-URL: https://build.opensuse.org/package/show/Java:packages/cdi-api?expand=0&rev=13 --- 0001-Remove-dependency-on-glassfish-el.patch | 38 ++++++ _service | 4 +- cdi-1.2.tar.xz | 4 +- cdi-api-build.xml | 115 +------------------ cdi-api.spec | 25 ++-- 5 files changed, 55 insertions(+), 131 deletions(-) create mode 100644 0001-Remove-dependency-on-glassfish-el.patch diff --git a/0001-Remove-dependency-on-glassfish-el.patch b/0001-Remove-dependency-on-glassfish-el.patch new file mode 100644 index 0000000..4f03760 --- /dev/null +++ b/0001-Remove-dependency-on-glassfish-el.patch @@ -0,0 +1,38 @@ +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 96ba6ae..e3faacd 100644 +--- a/api/src/main/java/javax/enterprise/inject/spi/BeanManager.java ++++ b/api/src/main/java/javax/enterprise/inject/spi/BeanManager.java +@@ -22,8 +22,6 @@ import java.lang.reflect.Type; + import java.util.List; + import java.util.Set; + +-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; +@@ -407,24 +405,6 @@ public interface BeanManager { + */ + public Context getContext(Class scopeType); + +- /** +- * Returns a {@link javax.el.ELResolver} that resolves beans by EL name. +- */ +- 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. + * diff --git a/_service b/_service index 14d0456..c636389 100644 --- a/_service +++ b/_service @@ -1,9 +1,9 @@ git - git://github.com/cdi-spec/cdi + https://github.com/cdi-spec/cdi 1.2 - 1.2 + @PARENT_TAG@ api diff --git a/cdi-1.2.tar.xz b/cdi-1.2.tar.xz index 4aeffec..7553d2a 100644 --- a/cdi-1.2.tar.xz +++ b/cdi-1.2.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f38b66047deaf0f79004f41b68be1dbbe2061d8e94a42401b93f9c911484f14f -size 46560 +oid sha256:c8a60a1c5591edecbd50796462ffae66fc5994bd2a3789a03e829903f45552fc +size 46596 diff --git a/cdi-api-build.xml b/cdi-api-build.xml index ec27bc4..d72cde7 100644 --- a/cdi-api-build.xml +++ b/cdi-api-build.xml @@ -32,10 +32,7 @@ - - - - + @@ -44,16 +41,6 @@ - - - - - - - @@ -91,100 +78,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - =================================== WARNING =================================== - JUnit is not present in the test classpath or your $ANT_HOME/lib directory. Tests not executed. - =============================================================================== - - @@ -217,7 +110,7 @@ - + - + - + diff --git a/cdi-api.spec b/cdi-api.spec index a3634bf..b43a4da 100644 --- a/cdi-api.spec +++ b/cdi-api.spec @@ -16,27 +16,22 @@ # -%bcond_with tests Name: cdi-api Version: 1.2 Release: 0 Summary: Contexts and Dependency Injection for Java EE License: Apache-2.0 Group: Development/Libraries/Java -URL: http://seamframework.org/Weld -# sh create-tarball.sh %%{version} +URL: https://seamframework.org/Weld Source0: cdi-%{version}.tar.xz Source1: %{name}-build.xml Source2: http://www.apache.org/licenses/LICENSE-2.0.txt +Patch0: 0001-Remove-dependency-on-glassfish-el.patch BuildRequires: ant BuildRequires: atinject BuildRequires: fdupes -BuildRequires: glassfish-el-api BuildRequires: javapackages-local -BuildRequires: jboss-interceptors-1.2-api -Requires: mvn(javax.el:javax.el-api) Requires: mvn(javax.inject:javax.inject) -Requires: mvn(org.jboss.spec.javax.interceptor:jboss-interceptors-api_1.2_spec) BuildArch: noarch %description @@ -50,13 +45,15 @@ Group: Documentation/HTML This package contains the API documentation for %{name}. %prep -%setup -qn cdi-%{version} +%setup -q -n cdi-%{version} +%patch0 -p1 pushd api/ cp %{SOURCE1} build.xml cp %{SOURCE2} LICENSE -# Use newer version of interceptors API -%pom_change_dep "javax.interceptor:javax.interceptor-api" "org.jboss.spec.javax.interceptor:jboss-interceptors-api_1.2_spec" +%pom_remove_dep :javax.el-api +%pom_remove_dep :javax.interceptor-api +rm -rf src/main/java/javax/enterprise/{context/,inject/spi/,inject/se/,inject/Model.java,inject/New.java} %pom_remove_parent popd @@ -64,12 +61,8 @@ popd %build pushd api/ mkdir -p lib -build-jar-repository -s lib glassfish-el-api jboss-interceptors-1.2-api javax.inject -%{ant} \ -%if %{without tests} - -Dtest.skip=true \ -%endif - jar javadoc +build-jar-repository -s lib javax.inject +%{ant} jar javadoc popd %install From 413a84a65be401808251ee896865355a6831f7327d68be41d9e7249101642bb6 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Sun, 3 Apr 2022 11:14:44 +0000 Subject: [PATCH 2/5] OBS-URL: https://build.opensuse.org/package/show/Java:packages/cdi-api?expand=0&rev=14 --- cdi-api-build.xml | 4 ++-- cdi-api.spec | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/cdi-api-build.xml b/cdi-api-build.xml index d72cde7..8034b0c 100644 --- a/cdi-api-build.xml +++ b/cdi-api-build.xml @@ -125,10 +125,10 @@ - + - + diff --git a/cdi-api.spec b/cdi-api.spec index b43a4da..34838bc 100644 --- a/cdi-api.spec +++ b/cdi-api.spec @@ -31,7 +31,9 @@ BuildRequires: ant BuildRequires: atinject BuildRequires: fdupes BuildRequires: javapackages-local +BuildRequires: jboss-interceptors-1.2-api Requires: mvn(javax.inject:javax.inject) +Requires: mvn(org.jboss.spec.javax.interceptor:jboss-interceptors-api_1.2_spec) BuildArch: noarch %description @@ -52,8 +54,9 @@ cp %{SOURCE1} build.xml cp %{SOURCE2} LICENSE %pom_remove_dep :javax.el-api -%pom_remove_dep :javax.interceptor-api -rm -rf src/main/java/javax/enterprise/{context/,inject/spi/,inject/se/,inject/Model.java,inject/New.java} + +# Use newer version of interceptors API +%pom_change_dep "javax.interceptor:javax.interceptor-api" "org.jboss.spec.javax.interceptor:jboss-interceptors-api_1.2_spec" %pom_remove_parent popd @@ -61,7 +64,7 @@ popd %build pushd api/ mkdir -p lib -build-jar-repository -s lib javax.inject +build-jar-repository -s lib javax.inject jboss-interceptors-1.2-api %{ant} jar javadoc popd From 4b5966980b1d7063338b1aab70e8c1adf273e5b104dbc280ba9050ee868fc47b Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Sun, 3 Apr 2022 11:23:14 +0000 Subject: [PATCH 3/5] OBS-URL: https://build.opensuse.org/package/show/Java:packages/cdi-api?expand=0&rev=15 --- 0001-Remove-dependency-on-glassfish-el.patch | 24 +++++++++++--- _service | 4 ++- cdi-1.2.tar.xz | 3 -- cdi-2.0.2.tar.xz | 3 ++ cdi-api-build.xml | 34 +++++++------------- cdi-api.spec | 34 ++++++++------------ 6 files changed, 50 insertions(+), 52 deletions(-) delete mode 100644 cdi-1.2.tar.xz create mode 100644 cdi-2.0.2.tar.xz diff --git a/0001-Remove-dependency-on-glassfish-el.patch b/0001-Remove-dependency-on-glassfish-el.patch index 4f03760..fe88f77 100644 --- a/0001-Remove-dependency-on-glassfish-el.patch +++ b/0001-Remove-dependency-on-glassfish-el.patch @@ -1,22 +1,33 @@ +From b8570328d6d781b9f7fd96381423c4b3cef352fe Mon Sep 17 00:00:00 2001 +From: Marian Koncek +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 96ba6ae..e3faacd 100644 +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 -@@ -22,8 +22,6 @@ import java.lang.reflect.Type; - import java.util.List; - import java.util.Set; +@@ -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; -@@ -407,24 +405,6 @@ public interface BeanManager { +@@ -415,26 +413,6 @@ public interface BeanManager { */ public Context getContext(Class scopeType); - /** - * Returns a {@link javax.el.ELResolver} that resolves beans by EL name. +- * +- * @return the {@link javax.el.ELResolver} - */ - public ELResolver getELResolver(); - @@ -36,3 +47,6 @@ index 96ba6ae..e3faacd 100644 /** * Obtain an {@link AnnotatedType} that may be used to read the annotations of the given class or interface. * +-- +2.21.0 + diff --git a/_service b/_service index c636389..46abc1c 100644 --- a/_service +++ b/_service @@ -2,9 +2,11 @@ git https://github.com/cdi-spec/cdi - 1.2 + 2.0.2 @PARENT_TAG@ api + LICENSE.txt + README.md *.tar diff --git a/cdi-1.2.tar.xz b/cdi-1.2.tar.xz deleted file mode 100644 index 7553d2a..0000000 --- a/cdi-1.2.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c8a60a1c5591edecbd50796462ffae66fc5994bd2a3789a03e829903f45552fc -size 46596 diff --git a/cdi-2.0.2.tar.xz b/cdi-2.0.2.tar.xz new file mode 100644 index 0000000..0919c62 --- /dev/null +++ b/cdi-2.0.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:84f34e2344d0fe01aa23dd7835189380dc9dfa012fede35458658775b606f8ac +size 66452 diff --git a/cdi-api-build.xml b/cdi-api-build.xml index 8034b0c..a3403ea 100644 --- a/cdi-api-build.xml +++ b/cdi-api-build.xml @@ -8,22 +8,16 @@ - - - - - - - + + + + + + - - + + - - - - - @@ -122,16 +116,12 @@ - + - - - - - + + + - - diff --git a/cdi-api.spec b/cdi-api.spec index 34838bc..1b8e656 100644 --- a/cdi-api.spec +++ b/cdi-api.spec @@ -17,7 +17,7 @@ Name: cdi-api -Version: 1.2 +Version: 2.0.2 Release: 0 Summary: Contexts and Dependency Injection for Java EE License: Apache-2.0 @@ -25,7 +25,6 @@ Group: Development/Libraries/Java URL: https://seamframework.org/Weld Source0: cdi-%{version}.tar.xz Source1: %{name}-build.xml -Source2: http://www.apache.org/licenses/LICENSE-2.0.txt Patch0: 0001-Remove-dependency-on-glassfish-el.patch BuildRequires: ant BuildRequires: atinject @@ -49,17 +48,13 @@ This package contains the API documentation for %{name}. %prep %setup -q -n cdi-%{version} %patch0 -p1 -pushd api/ -cp %{SOURCE1} build.xml -cp %{SOURCE2} LICENSE - -%pom_remove_dep :javax.el-api +cp %{SOURCE1} api/build.xml # Use newer version of interceptors API -%pom_change_dep "javax.interceptor:javax.interceptor-api" "org.jboss.spec.javax.interceptor:jboss-interceptors-api_1.2_spec" +%pom_change_dep "jakarta.interceptor:jakarta.interceptor-api" "org.jboss.spec.javax.interceptor:jboss-interceptors-api_1.2_spec" api -%pom_remove_parent -popd +%pom_remove_parent api +%pom_remove_dep :jakarta.el-api api %build pushd api/ @@ -69,27 +64,24 @@ build-jar-repository -s lib javax.inject jboss-interceptors-1.2-api popd %install -pushd api/ # jar install -dm 0755 %{buildroot}%{_javadir}/%{name} -install -dm 0755 %{buildroot}%{_javadir}/javax.enterprise.inject -install -pm 0644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}/%{name}.jar -ln -sf ../%{name}/%{name}.jar %{buildroot}%{_javadir}/javax.enterprise.inject/%{name}.jar +install -pm 0644 api/target/jakarta.enterprise.cdi-api-%{version}.jar %{buildroot}%{_javadir}/%{name}/jakarta.enterprise.cdi-api.jar # pom install -dm 0755 %{buildroot}%{_mavenpomdir}/%{name} -install -pm 0644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}/%{name}.pom -%add_maven_depmap %{name}/%{name}.pom %{name}/%{name}.jar +install -pm 0644 api/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/jakarta.enterprise.cdi-api.pom +%add_maven_depmap %{name}/jakarta.enterprise.cdi-api.pom %{name}/jakarta.enterprise.cdi-api.jar -a "javax.enterprise:cdi-api" # javadoc install -dm 0755 %{buildroot}%{_javadocdir}/%{name} -cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/ -popd +cp -pr api/target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/ %fdupes -s %{buildroot}%{_javadocdir} -%files -f api/.mfiles -%license api/LICENSE -%{_javadir}/javax.enterprise.inject +%files -f .mfiles +%license LICENSE.txt +%doc README.md %files javadoc %{_javadocdir}/%{name} +%license LICENSE.txt %changelog From 01e7bdc3545004278e6ce350b125cd7249bef5fa4db69c8d0f229f052c978d64 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Sun, 3 Apr 2022 11:31:13 +0000 Subject: [PATCH 4/5] OBS-URL: https://build.opensuse.org/package/show/Java:packages/cdi-api?expand=0&rev=16 --- cdi-api.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cdi-api.spec b/cdi-api.spec index 1b8e656..245b3a9 100644 --- a/cdi-api.spec +++ b/cdi-api.spec @@ -66,17 +66,21 @@ popd %install # jar install -dm 0755 %{buildroot}%{_javadir}/%{name} -install -pm 0644 api/target/jakarta.enterprise.cdi-api-%{version}.jar %{buildroot}%{_javadir}/%{name}/jakarta.enterprise.cdi-api.jar +install -pm 0644 api/target/jakarta.enterprise.cdi-api-%{version}.jar %{buildroot}%{_javadir}/%{name}/%{name}.jar +install -dm 0755 %{buildroot}%{_javadir}/javax.enterprise.inject +ln -sf ../%{name}/%{name}.jar %{buildroot}%{_javadir}/javax.enterprise.inject/%{name}.jar + # pom install -dm 0755 %{buildroot}%{_mavenpomdir}/%{name} -install -pm 0644 api/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/jakarta.enterprise.cdi-api.pom -%add_maven_depmap %{name}/jakarta.enterprise.cdi-api.pom %{name}/jakarta.enterprise.cdi-api.jar -a "javax.enterprise:cdi-api" +install -pm 0644 api/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/%{name}.pom +%add_maven_depmap %{name}/%{name}.pom %{name}/%{name}.jar -a "javax.enterprise:cdi-api" # javadoc install -dm 0755 %{buildroot}%{_javadocdir}/%{name} cp -pr api/target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/ %fdupes -s %{buildroot}%{_javadocdir} %files -f .mfiles +%{_javadir}/javax.enterprise.inject %license LICENSE.txt %doc README.md From 4713e123bd6d7e3d807bb713edb0a76ec4ee2ee61bd9bdf4514a7a33351c2136 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Mon, 4 Apr 2022 04:32:26 +0000 Subject: [PATCH 5/5] OBS-URL: https://build.opensuse.org/package/show/Java:packages/cdi-api?expand=0&rev=17 --- cdi-api.changes | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cdi-api.changes b/cdi-api.changes index 03e4484..06b4204 100644 --- a/cdi-api.changes +++ b/cdi-api.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Apr 4 04:30:33 UTC 2022 - Fridrich Strba + +- Update to upsteam release 2.0.2 +- Added patch: + * 0001-Remove-dependency-on-glassfish-el.patch + + patch out the two el wrapper functions that are unused + ------------------------------------------------------------------- Sun Mar 20 19:41:42 UTC 2022 - Fridrich Strba