Sync from SUSE:SLFO:Main jakarta-inject revision 69507052417b0e0cf6a005af1a65b9bb

This commit is contained in:
Adrian Schröter 2024-06-14 17:29:07 +02:00
commit b9cdd5becf
5 changed files with 251 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

BIN
2.0.1.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

140
jakarta-inject-build.xml Normal file
View File

@ -0,0 +1,140 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="jakarta.inject-api" default="package" basedir=".">
<!-- ====================================================================== -->
<!-- Build environment properties -->
<!-- ====================================================================== -->
<property file="build.properties"/>
<property name="project.groupId" value="jakarta.inject"/>
<property name="project.artifactId" value="jakarta.inject-api"/>
<property name="project.version" value="2.0.1"/>
<property name="spec.version" value="2.0"/>
<property name="compiler.release" value="8"/>
<property name="compiler.source" value="1.${compiler.release}"/>
<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.outputDirJava9" value="${build.outputDir}/META-INF/versions/9"/>
<property name="build.srcDir" value="src/main/java"/>
<property name="build.srcDirJava9" value="src/main/java9"/>
<property name="build.resourceDir" value="."/>
<property name="reporting.outputDirectory" value="${build.dir}/site"/>
<!-- ====================================================================== -->
<!-- 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"
release="${compiler.release}"
target="${compiler.target}"
verbose="false"
fork="false"
source="${compiler.source}">
<src>
<pathelement location="${build.srcDir}"/>
</src>
<exclude name="**/module-info.java"/>
</javac>
<!-- compile the module-info.java -->
<javac destdir="${build.outputDir}"
nowarn="false"
debug="true"
encoding="utf-8"
optimize="false"
deprecation="true"
release="9"
verbose="false"
fork="false">
<src>
<pathelement location="${build.srcDir}"/>
</src>
<include name="**/module-info.java"/>
</javac>
<mkdir dir="${build.outputDir}/META-INF"/>
<copy todir="${build.outputDir}/META-INF">
<fileset dir="${build.resourceDir}">
<include name="LICENSE.txt"/>
<include name="NOTICE.md"/>
</fileset>
</copy>
</target>
<!-- ====================================================================== -->
<!-- Javadoc target -->
<!-- ====================================================================== -->
<target name="javadoc" description="Generates the Javadoc of the application">
<javadoc sourcepath="${build.srcDir}"
packagenames="*"
destdir="${reporting.outputDirectory}/apidocs"
access="protected"
source="${compiler.source}"
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"/>
</target>
<!-- ====================================================================== -->
<!-- Package target -->
<!-- ====================================================================== -->
<target name="package" depends="compile" 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="Jakarta Dependency Injection"/>
<attribute name="Bundle-DocURL" value="https://www.eclipse.org"/>
<attribute name="Bundle-License" value="http://www.apache.org/licenses/LICENSE-2.0.txt"/>
<attribute name="Bundle-ManifestVersion" value="2"/>
<attribute name="Bundle-Name" value="Jakarta Dependency Injection"/>
<attribute name="Bundle-SymbolicName" value="${project.groupId}.${project.artifactId}"/>
<attribute name="Bundle-Vendor" value="Eclipse Foundation"/>
<attribute name="Bundle-Version" value="${project.version}"/>
<attribute name="Export-Package" value="jakarta.inject;version=&quot;${project.version}&quot;"/>
<attribute name="Implementation-Version" value="${spec.version}"/>
<attribute name="JavaPackages-ArtifactId" value="${project.artifactId}"/>
<attribute name="JavaPackages-GroupId" value="${project.groupId}"/>
<attribute name="JavaPackages-Version" value="${project.version}"/>
<attribute name="Require-Capability" value="osgi.ee;filter:=&quot;(&amp;(osgi.ee=JavaSE)(version=${compiler.target}))&quot;"/>
</manifest>
</jar>
</target>
</project>

9
jakarta-inject.changes Normal file
View File

@ -0,0 +1,9 @@
-------------------------------------------------------------------
Tue Jun 11 07:03:48 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Fix bundle manifest
-------------------------------------------------------------------
Fri Jun 7 17:07:24 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Initial packaging of version 2.0.1

76
jakarta-inject.spec Normal file
View File

@ -0,0 +1,76 @@
#
# spec file for package jakarta-inject
#
# Copyright (c) 2024 SUSE LLC
#
# 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/
#
Name: jakarta-inject
Version: 2.0.1
Release: 0
Summary: Dependency injection specification for Java (JSR-330)
License: Apache-2.0
URL: https://github.com/jakartaee/inject/
Source0: https://github.com/jakartaee/inject/archive/%{version}.tar.gz
Source1: %{name}-build.xml
BuildRequires: ant
BuildRequires: fdupes
BuildRequires: java-devel >= 1.8
BuildRequires: javapackages-local >= 6
Obsoletes: %{name}-tck
BuildArch: noarch
%description
This package specifies a means for obtaining objects in such a way as
to maximize reusability, testability and maintainability compared to
traditional approaches such as constructors, factories, and service
locators (e.g., JNDI). This process, known as dependency injection, is
beneficial to most nontrivial applications.
%package javadoc
Summary: Javadoc for %{name}
Group: Documentation/HTML
%description javadoc
This package contains the API documentation for %{name}.
%prep
%setup -q -n inject-%{version}
cp %{SOURCE1} build.xml
%build
%{ant} package javadoc
%install
# jars
install -dm 755 %{buildroot}%{_javadir}
install -m 0644 target/jakarta.inject-api-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
# pom
install -dm 755 %{buildroot}%{_mavenpomdir}
%{mvn_install_pom} pom.xml %{buildroot}%{_mavenpomdir}/%{name}.pom
%add_maven_depmap %{name}.pom %{name}.jar
# javadoc
install -dm 755 %{buildroot}%{_javadocdir}/%{name}
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
%files -f .mfiles
%license LICENSE.txt NOTICE.md
%files javadoc
%{_javadocdir}/%{name}
%changelog