This commit is contained in:
parent
2e77405ed5
commit
f00e25b928
38
0001-Remove-dependency-on-glassfish-el.patch
Normal file
38
0001-Remove-dependency-on-glassfish-el.patch
Normal file
@ -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<? extends Annotation> 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.
|
||||
*
|
4
_service
4
_service
@ -1,9 +1,9 @@
|
||||
<services>
|
||||
<service name="tar_scm" mode="disabled">
|
||||
<param name="scm">git</param>
|
||||
<param name="url">git://github.com/cdi-spec/cdi</param>
|
||||
<param name="url">https://github.com/cdi-spec/cdi</param>
|
||||
<param name="revision">1.2</param>
|
||||
<param name="versionformat">1.2</param>
|
||||
<param name="versionformat">@PARENT_TAG@</param>
|
||||
<param name="include">api</param>
|
||||
</service>
|
||||
<service name="recompress" mode="disabled">
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f38b66047deaf0f79004f41b68be1dbbe2061d8e94a42401b93f9c911484f14f
|
||||
size 46560
|
||||
oid sha256:c8a60a1c5591edecbd50796462ffae66fc5994bd2a3789a03e829903f45552fc
|
||||
size 46596
|
||||
|
@ -32,10 +32,7 @@
|
||||
<property name="build.outputDir" value="${build.dir}/classes"/>
|
||||
<property name="build.srcDir" value="src/main/java"/>
|
||||
<property name="build.resourceDir" value="src/main/resources"/>
|
||||
<property name="build.testOutputDir" value="${build.dir}/test-classes"/>
|
||||
<property name="build.testDir" value="src/test/java"/>
|
||||
<property name="build.testResourceDir" value="src/test/resources"/>
|
||||
<property name="test.reports" value="${build.dir}/test-reports"/>
|
||||
|
||||
<property name="reporting.outputDirectory" value="${build.dir}/site"/>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
@ -44,16 +41,6 @@
|
||||
|
||||
<path id="build.classpath">
|
||||
<fileset dir="lib">
|
||||
<!-- javax.el-api-3.0.0 jboss-interceptors-api_1.2_spec-1.0.0
|
||||
javax.inject-1 -->
|
||||
<include name="**/*"/>
|
||||
</fileset>
|
||||
</path>
|
||||
<path id="build.test.classpath">
|
||||
<fileset dir="lib">
|
||||
<!-- javax.el-api-3.0.0 jboss-interceptors-api_1.2_spec-1.0.0
|
||||
javax.inject-1.jar testng-5.10-jdk15 jcommander-1.64
|
||||
snakeyaml-1.17 base64coder commons-codec -->
|
||||
<include name="**/*"/>
|
||||
</fileset>
|
||||
</path>
|
||||
@ -91,100 +78,6 @@
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Test-compilation target -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="compile-tests"
|
||||
depends="compile"
|
||||
description="Compile the test code"
|
||||
unless="test.skip">
|
||||
<mkdir dir="${build.testOutputDir}"/>
|
||||
<javac destdir="${build.testOutputDir}"
|
||||
nowarn="false"
|
||||
debug="true"
|
||||
optimize="false"
|
||||
deprecation="true"
|
||||
target="${compiler.target}"
|
||||
verbose="false"
|
||||
fork="false"
|
||||
source="${compiler.source}">
|
||||
<src>
|
||||
<pathelement location="${build.testDir}"/>
|
||||
</src>
|
||||
<classpath>
|
||||
<path refid="build.test.classpath"/>
|
||||
<pathelement location="${build.outputDir}"/>
|
||||
</classpath>
|
||||
</javac>
|
||||
<copy todir="${build.testOutputDir}">
|
||||
<fileset dir="${build.testResourceDir}"/>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Run all tests -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="test"
|
||||
depends="compile-tests, junit-missing"
|
||||
unless="junit.skipped"
|
||||
description="Run the test cases">
|
||||
<mkdir dir="${test.reports}"/>
|
||||
<junit printSummary="yes" haltonerror="true" haltonfailure="true" fork="true" dir=".">
|
||||
<sysproperty key="basedir" value="."/>
|
||||
<formatter type="xml"/>
|
||||
<formatter type="plain" usefile="false"/>
|
||||
<classpath>
|
||||
<path refid="build.test.classpath"/>
|
||||
<pathelement location="${build.outputDir}"/>
|
||||
<pathelement location="${build.testOutputDir}"/>
|
||||
</classpath>
|
||||
<batchtest todir="${test.reports}" unless="test">
|
||||
<fileset dir="${build.testDir}">
|
||||
<include name="**/Test*.java"/>
|
||||
<include name="**/*Test.java"/>
|
||||
<include name="**/*TestCase.java"/>
|
||||
<exclude name="**/*Abstract*Test.java"/>
|
||||
</fileset>
|
||||
</batchtest>
|
||||
<batchtest todir="${test.reports}" if="test">
|
||||
<fileset dir="${build.testDir}">
|
||||
<include name="**/${test}.java"/>
|
||||
<exclude name="**/*Abstract*Test.java"/>
|
||||
</fileset>
|
||||
</batchtest>
|
||||
</junit>
|
||||
</target>
|
||||
|
||||
<target name="test-junit-present">
|
||||
<available classname="junit.framework.Test" property="junit.present" classpathref="build.test.classpath"/>
|
||||
</target>
|
||||
|
||||
<target name="test-junit-status"
|
||||
depends="test-junit-present">
|
||||
<condition property="junit.missing">
|
||||
<and>
|
||||
<isfalse value="${junit.present}"/>
|
||||
<isfalse value="${test.skip}"/>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="junit.skipped">
|
||||
<or>
|
||||
<isfalse value="${junit.present}"/>
|
||||
<istrue value="${test.skip}"/>
|
||||
</or>
|
||||
</condition>
|
||||
</target>
|
||||
|
||||
<target name="junit-missing"
|
||||
depends="test-junit-status"
|
||||
if="junit.missing">
|
||||
<echo>=================================== WARNING ===================================</echo>
|
||||
<echo> JUnit is not present in the test classpath or your $ANT_HOME/lib directory. Tests not executed.</echo>
|
||||
<echo>===============================================================================</echo>
|
||||
</target>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Javadoc target -->
|
||||
<!-- ====================================================================== -->
|
||||
@ -217,7 +110,7 @@
|
||||
<!-- Package target -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="package" depends="compile,test" description="Package the application">
|
||||
<target name="package" depends="compile" description="Package the application">
|
||||
<jar jarfile="${build.dir}/${build.finalName}.jar"
|
||||
compress="true"
|
||||
index="false"
|
||||
@ -232,10 +125,10 @@
|
||||
<attribute name="Bundle-SymbolicName" value="${project.groupId}.${project.artifactId}"/>
|
||||
<attribute name="Bundle-Vendor" value="${project.organization.name}"/>
|
||||
<attribute name="Bundle-Version" value="${bundle.version}"/>
|
||||
<attribute name="Export-Package" value="javax.decorator;version="1.1";uses:="javax.enterprise.inject",javax.enterprise.context;version="1.1";uses:="javax.inject",javax.enterprise.context.spi;version="1.1",javax.enterprise.event;version="1.1";uses:="javax.enterprise.util",javax.enterprise.inject;version="1.1";uses:="javax.enterprise.context,javax.enterprise.util,javax.inject",javax.enterprise.inject.spi;version="1.1";uses:="javax.el,javax.enterprise.context.spi,javax.enterprise.event,javax.enterprise.inject,javax.interceptor",javax.enterprise.util;version="1.1""/>
|
||||
<attribute name="Export-Package" value="javax.decorator;version="1.1";uses:="javax.enterprise.inject",javax.enterprise.event;version="1.1";uses:="javax.enterprise.util",javax.enterprise.inject;version="1.1";uses:="javax.enterprise.util,javax.inject",javax.enterprise.util;version="1.1""/>
|
||||
<attribute name="Implementation-Title" value="${project.name}"/>
|
||||
<attribute name="Implementation-Version" value="${project.version}"/>
|
||||
<attribute name="Import-Package" value="javax.el;version="2.2",javax.enterprise.context;version="[1.1,2)",javax.enterprise.context.spi;version="[1.1,2)",javax.enterprise.event;version="[1.1,2)",javax.enterprise.inject;version="[1.1,2)",javax.enterprise.util;version="[1.1,2)",javax.inject;version="[1.0,2)",javax.interceptor;version="[${project.version},2)""/>
|
||||
<attribute name="Import-Package" value="javax.enterprise.inject;version="[1.1,2)",javax.enterprise.util;version="[1.1,2)",javax.inject;version="[1.0,2)""/>
|
||||
<attribute name="Require-Capability" value="osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=${compiler.target}))""/>
|
||||
<attribute name="Specification-Title" value="${spec.title}"/>
|
||||
<attribute name="Specification-Version" value="${spec.version}"/>
|
||||
|
25
cdi-api.spec
25
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
|
||||
|
Loading…
Reference in New Issue
Block a user