Fridrich Strba 2019-03-04 15:22:08 +00:00 committed by Git OBS Bridge
commit c4d6f4a10e
4 changed files with 389 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

3
1.2.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:506d82e40f287678763cc20dc31b9548e8d687af08e589a78de24a269bb4b4c1
size 134934

252
cdi-api-build.xml Normal file
View File

@ -0,0 +1,252 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="cdi-api" default="package" basedir=".">
<!-- ====================================================================== -->
<!-- Build environment properties -->
<!-- ====================================================================== -->
<property file="build.properties"/>
<property name="project.groupId" value="javax.enterprise"/>
<property name="project.artifactId" value="cdi-api"/>
<property name="project.version" value="1.2"/>
<property name="project.name" value="CDI APIs"/>
<property name="project.description" value="APIs for CDI (Contexts and Dependency Injection for Java EE)"/>
<property name="project.url" value="http://cdi-spec.org"/>
<property name="project.license.url" value="http://www.apache.org/licenses/LICENSE-2.0.html"/>
<property name="project.organization.name" value="JBoss by Red Hat, Inc."/>
<property name="project.organization.url" value="http://jboss.org"/>
<property name="bundle.version" value="${project.version}.0"/>
<property name="spec.title" value="JSR-346 Contexts and Dependency Injection for the Java EE platform"/>
<property name="spec.version" value="${project.version}"/>
<property name="compiler.source" value="1.6"/>
<property name="compiler.target" value="${compiler.source}"/>
<property name="build.finalName" value="${project.artifactId}-${project.version}"/>
<property name="build.dir" value="target"/>
<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"/>
<!-- ====================================================================== -->
<!-- Defining classpaths -->
<!-- ====================================================================== -->
<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>
<!-- ====================================================================== -->
<!-- Cleaning up target -->
<!-- ====================================================================== -->
<target name="clean" description="Clean the output directory">
<delete dir="${build.dir}"/>
</target>
<!-- ====================================================================== -->
<!-- Compilation target -->
<!-- ====================================================================== -->
<target name="compile" description="Compile the code">
<mkdir dir="${build.outputDir}"/>
<javac destdir="${build.outputDir}"
nowarn="false"
debug="true"
optimize="false"
deprecation="true"
target="${compiler.target}"
verbose="false"
fork="false"
source="${compiler.source}">
<src>
<pathelement location="${build.srcDir}"/>
</src>
<classpath refid="build.classpath"/>
</javac>
<copy todir="${build.outputDir}">
<fileset dir="${build.resourceDir}"/>
</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 -->
<!-- ====================================================================== -->
<target name="javadoc" description="Generates the Javadoc of the application">
<javadoc sourcepath="${build.srcDir}"
packagenames="*"
destdir="${reporting.outputDirectory}/apidocs"
access="protected"
verbose="false"
version="true"
use="true"
author="true"
splitindex="false"
nodeprecated="false"
nodeprecatedlist="false"
notree="false"
noindex="false"
nohelp="false"
nonavbar="false"
serialwarn="false"
charset="ISO-8859-1"
linksource="false"
breakiterator="false"
source="${compiler.source}"
classpathref="build.classpath"/>
</target>
<!-- ====================================================================== -->
<!-- Package target -->
<!-- ====================================================================== -->
<target name="package" depends="compile,test" description="Package the application">
<jar jarfile="${build.dir}/${build.finalName}.jar"
compress="true"
index="false"
basedir="${build.outputDir}"
excludes="**/package.html">
<manifest>
<attribute name="Bundle-Description" value="${project.description}"/>
<attribute name="Bundle-DocURL" value="${project.organization.url}"/>
<attribute name="Bundle-License" value="${project.license.url}"/>
<attribute name="Bundle-ManifestVersion" value="2"/>
<attribute name="Bundle-Name" value="${project.name}"/>
<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=&quot;1.1&quot;;uses:=&quot;javax.enterprise.inject&quot;,javax.enterprise.context;version=&quot;1.1&quot;;uses:=&quot;javax.inject&quot;,javax.enterprise.context.spi;version=&quot;1.1&quot;,javax.enterprise.event;version=&quot;1.1&quot;;uses:=&quot;javax.enterprise.util&quot;,javax.enterprise.inject;version=&quot;1.1&quot;;uses:=&quot;javax.enterprise.context,javax.enterprise.util,javax.inject&quot;,javax.enterprise.inject.spi;version=&quot;1.1&quot;;uses:=&quot;javax.el,javax.enterprise.context.spi,javax.enterprise.event,javax.enterprise.inject,javax.interceptor&quot;,javax.enterprise.util;version=&quot;1.1&quot;"/>
<attribute name="Implementation-Title" value="${project.name}"/>
<attribute name="Implementation-Version" value="${project.version}"/>
<attribute name="Import-Package" value="javax.el;version=&quot;2.2&quot;,javax.enterprise.context;version=&quot;[1.1,2)&quot;,javax.enterprise.context.spi;version=&quot;[1.1,2)&quot;,javax.enterprise.event;version=&quot;[1.1,2)&quot;,javax.enterprise.inject;version=&quot;[1.1,2)&quot;,javax.enterprise.util;version=&quot;[1.1,2)&quot;,javax.inject;version=&quot;[1.0,2)&quot;,javax.interceptor;version=&quot;[${project.version},2)&quot;"/>
<attribute name="Require-Capability" value="osgi.ee;filter:=&quot;(&amp;(osgi.ee=JavaSE)(version=${compiler.target}))&quot;"/>
<attribute name="Specification-Title" value="${spec.title}"/>
<attribute name="Specification-Version" value="${spec.version}"/>
</manifest>
</jar>
</target>
<!-- ====================================================================== -->
<!-- A dummy target for the package named after the type it creates -->
<!-- ====================================================================== -->
<target name="jar" depends="package" description="Builds the jar for the application"/>
</project>

111
cdi-api.spec Normal file
View File

@ -0,0 +1,111 @@
#
# spec file for package cdi-api
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%bcond_with tests
%global namedreltag .NOTHING
%global namedversion %{version}%{?namedreltag}
%bcond_without asciidoc
Name: cdi-api
Version: 1.2
Release: 0
Summary: CDI API
License: Apache-2.0
Group: Development/Libraries/Java
URL: http://seamframework.org/Weld
Source0: https://github.com/cdi-spec/cdi/archive/%{version}.tar.gz
Source1: %{name}-build.xml
BuildRequires: ant
BuildRequires: atinject
BuildRequires: fdupes
BuildRequires: glassfish-el-api
BuildRequires: javapackages-local
BuildRequires: jboss-interceptors-1.2-api
BuildArch: noarch
%if %{with asciidoc}
BuildRequires: asciidoc
BuildRequires: python3-Pygments
%endif
%description
APIs for JSR-299: Contexts and Dependency Injection for Java EE
%package javadoc
Summary: Javadoc for %{name}
Group: Development/Libraries/Java
%description javadoc
This package contains the API documentation for %{name}.
%prep
%setup -q -n cdi-%{version}
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" api
%pom_remove_parent api
%build
mkdir -p lib
build-jar-repository -s lib glassfish-el-api jboss-interceptors-1.2-api javax.inject
pushd api
%ant \
%if %{without tests}
-Dtest.skip=true \
%endif
jar javadoc
popd
%if %{with asciidoc}
cd spec/src/main/doc
asciidoc -n -b html5 -a toc2 -a toclevels=3 -a pygments -f html5.conf -o cdi-spec.html cdi-spec.asciidoc
asciidoc -n -b html5 -a toc2 -a toclevels=3 -a pygments -f html5.conf -o license-asl2.html license-asl2.asciidoc
asciidoc -n -b html5 -a toc2 -a toclevels=3 -a pygments -f html5.conf -o license-jcp.html license-jcp.asciidoc
%global adoc html
%else
%global adoc asciidoc
%endif
%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
# 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 -a "javax.interceptor:javax.interceptor-api,org.jboss.spec.javax.interceptor:jboss-interceptors-api_1.2_spec"
# javadoc
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/
%fdupes -s %{buildroot}%{_javadocdir}
popd
%files -f api/.mfiles
%doc spec/src/main/doc/cdi-spec.%{adoc}
%license spec/src/main/doc/license-asl2.%{adoc}
%license spec/src/main/doc/license-jcp.%{adoc}
%{_javadir}/javax.enterprise.inject
%files javadoc
%license spec/src/main/doc/license-asl2.%{adoc}
%license spec/src/main/doc/license-jcp.%{adoc}
%{_javadocdir}/%{name}
%changelog