Add OSGi manifest to tck jar
- Install with mvn_install
This commit is contained in:
parent
e3ea6f16fd
commit
a68927fcb6
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,4 @@
|
||||
/atinject-1.tar.xz
|
||||
/LICENSE-2.0.txt
|
||||
/noarch
|
||||
/*.src.rpm
|
||||
|
12
MANIFEST-TCK.MF
Normal file
12
MANIFEST-TCK.MF
Normal file
@ -0,0 +1,12 @@
|
||||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Tck
|
||||
Bundle-SymbolicName: com.google.code.atinject.tck
|
||||
Bundle-Version: 1.0.0
|
||||
Bundle-Vendor: GOOGLE
|
||||
Bundle-RequiredExecutionEnvironment: J2SE-1.5
|
||||
Require-Bundle: org.junit;bundle-version="3.8.2"
|
||||
Export-Package: org.atinject.tck,
|
||||
org.atinject.tck.auto;x-internal:=true,
|
||||
org.atinject.tck.auto.accessories;x-internal:=true
|
||||
Import-Package: javax.inject;version="1.0.0"
|
@ -1,10 +1,10 @@
|
||||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: %bundleName
|
||||
Bundle-Name: Atinject Dependency Injection Annotations
|
||||
Bundle-SymbolicName: javax.inject
|
||||
Bundle-Version: 1.0.0.v20091030
|
||||
Bundle-ClassPath: .
|
||||
Bundle-Vendor: %bundleProvider
|
||||
Bundle-Vendor: Eclipse.org
|
||||
Bundle-Localization: plugin
|
||||
Export-Package: javax.inject;version="1.0.0"
|
||||
Bundle-RequiredExecutionEnvironment: J2SE-1.5
|
||||
|
@ -1,6 +1,6 @@
|
||||
Name: atinject
|
||||
Version: 1
|
||||
Release: 17.20100611svn86%{?dist}
|
||||
Release: 18.20100611svn86%{?dist}
|
||||
Summary: Dependency injection specification for Java (JSR-330)
|
||||
License: ASL 2.0
|
||||
URL: http://code.google.com/p/atinject/
|
||||
@ -13,15 +13,18 @@ BuildArch: noarch
|
||||
# rm -rf atinject-1/{lib,javadoc}/
|
||||
# tar caf atinject-1.tar.xz atinject-1
|
||||
Source0: %{name}-%{version}.tar.xz
|
||||
|
||||
# These manifests based on the ones shipped by eclipse.org
|
||||
Source1: MANIFEST.MF
|
||||
Source2: http://www.apache.org/licenses/LICENSE-2.0.txt
|
||||
Source2: MANIFEST-TCK.MF
|
||||
|
||||
Source3: http://www.apache.org/licenses/LICENSE-2.0.txt
|
||||
|
||||
# Compile with source/target 1.5
|
||||
Patch0: %{name}-target-1.5.patch
|
||||
|
||||
BuildRequires: java-devel
|
||||
BuildRequires: javapackages-local
|
||||
BuildRequires: junit
|
||||
Requires: java-headless
|
||||
|
||||
Provides: javax.inject
|
||||
|
||||
@ -48,55 +51,58 @@ Requires: junit
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
cp %{SOURCE2} LICENSE
|
||||
cp %{SOURCE3} LICENSE
|
||||
ln -s %{_javadir} lib
|
||||
|
||||
%patch0 -p1
|
||||
|
||||
# Fix dep in TCK pom
|
||||
sed -i -e 's/pom\.groupId/project.groupId/' tck-pom.xml
|
||||
|
||||
# J2EE API symlinks
|
||||
%mvn_file :javax.inject atinject javax.inject/atinject
|
||||
|
||||
# TCK sub-package
|
||||
%mvn_file :javax.inject-tck atinject-tck
|
||||
%mvn_package :javax.inject-tck tck
|
||||
|
||||
%build
|
||||
set -e
|
||||
alias rm=:
|
||||
alias xargs=:
|
||||
. ./build.sh
|
||||
|
||||
# Inject OSGi manifest required by Eclipse.
|
||||
jar umf %{SOURCE1} build/dist/*.jar
|
||||
# Inject OSGi manifests required by Eclipse.
|
||||
jar umf %{SOURCE1} build/dist/javax.inject.jar
|
||||
jar umf %{SOURCE2} build/tck/dist/javax.inject-tck.jar
|
||||
|
||||
%mvn_artifact pom.xml build/dist/javax.inject.jar
|
||||
%mvn_artifact tck-pom.xml build/tck/dist/javax.inject-tck.jar
|
||||
|
||||
%install
|
||||
# Maven POMs
|
||||
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
||||
install -p -m 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
|
||||
install -p -m 644 tck-pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}-tck.pom
|
||||
|
||||
# JARs
|
||||
install -d -m 755 %{buildroot}%{_javadir}
|
||||
install -p -m 644 build/dist/*.jar %{buildroot}%{_javadir}/%{name}.jar
|
||||
install -p -m 644 build/tck/dist/*.jar %{buildroot}%{_javadir}/%{name}-tck.jar
|
||||
|
||||
# XMvn metadata
|
||||
%add_maven_depmap
|
||||
%add_maven_depmap JPP-%{name}-tck.pom %{name}-tck.jar -f tck
|
||||
%mvn_install
|
||||
|
||||
# Javadocs
|
||||
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}/tck
|
||||
cp -pr build/javadoc/* %{buildroot}%{_javadocdir}/%{name}
|
||||
cp -pr build/tck/javadoc/* %{buildroot}%{_javadocdir}/%{name}/tck
|
||||
|
||||
# J2EE API symlinks
|
||||
install -d -m 755 %{buildroot}%{_javadir}/javax.inject/
|
||||
ln -sf ../%{name}.jar %{buildroot}%{_javadir}/javax.inject/
|
||||
|
||||
%files -f .mfiles
|
||||
%doc LICENSE
|
||||
%{_javadir}/javax.inject
|
||||
%dir %{_javadir}/javax.inject
|
||||
%dir %{_mavenpomdir}/javax.inject
|
||||
|
||||
%files tck -f .mfiles-tck
|
||||
|
||||
%files javadoc
|
||||
%doc LICENSE
|
||||
%doc %{_javadocdir}/%{name}
|
||||
%{_javadocdir}/atinject
|
||||
|
||||
%changelog
|
||||
* Wed Feb 18 2015 Mat Booth <mat.booth@redhat.com> - 1-18.20100611svn86
|
||||
- Add OSGi manifest to tck jar
|
||||
- Install with mvn_install
|
||||
|
||||
* Mon Jun 09 2014 Michal Srb <msrb@redhat.com> - 1-17.20100611svn86
|
||||
- Apply the "source/target 1.5" patch
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user