Name: glassfish-hk2
Version: 2.1.93
Release: 8%{?dist}
Summary: Hundred Kilobytes Kernel
License: CDDL or GPLv2 with exceptions
URL: http://hk2.java.net/
# svn export https://svn.java.net/svn/hk2~svn/tags/hk2-parent-2.1.93 glassfish-hk2-2.1.93
# find glassfish-hk2-2.1.93 -name '*.jar' -type f -delete
# find glassfish-hk2-2.1.93 -name '*.class' -delete
# tar czf glassfish-hk2-2.1.93-clean-src-svn.tar.gz glassfish-hk2-2.1.93
Source0: glassfish-hk2-2.1.93-clean-src-svn.tar.gz
# wget -O glassfish-LICENSE.txt https://svn.java.net/svn/glassfish~svn/tags/legal-1.1/src/main/resources/META-INF/LICENSE.txt
# glassfish-hk2 package don't include the license file
Source1: glassfish-LICENSE.txt
# disable tiger-types copy
Patch0: glassfish-hk2-2.1.92-hk2-utils-osgi_bundle.patch
BuildRequires: glassfish-master-pom
BuildRequires: jvnet-parent
BuildRequires: args4j
BuildRequires: atinject
BuildRequires: bcel
BuildRequires: bea-stax-api
BuildRequires: cdi-api
BuildRequires: cglib
# BuildRequires: codemodel
BuildRequires: felix-bundlerepository
BuildRequires: felix-osgi-compendium
BuildRequires: felix-osgi-core
BuildRequires: glassfish-jaxb
%if 0
BuildRequires: hibernate-validator >= 5.0.1
%endif
BuildRequires: istack-commons
BuildRequires: junit
BuildRequires: mvn(org.apache.maven:maven-plugin-api)
BuildRequires: mvn(org.apache.maven:maven-project)
BuildRequires: mvn(org.apache.maven:maven-compat)
BuildRequires: mvn(org.apache.maven:maven-core)
BuildRequires: mvn(org.apache.maven:maven-artifact)
BuildRequires: mvn(org.apache.maven:maven-archiver)
BuildRequires: mvn(org.apache.maven.plugins:maven-compiler-plugin)
BuildRequires: mvn(org.apache.maven.shared:maven-osgi)
BuildRequires: objectweb-asm3
BuildRequires: osgi-resource-locator
BuildRequires: tiger-types
BuildRequires: woodstox-core
# test deps
BuildRequires: easymock3
BuildRequires: maven-local
BuildRequires: maven-dependency-plugin
BuildRequires: maven-enforcer-plugin
BuildRequires: maven-plugin-bundle
BuildRequires: maven-plugin-plugin
BuildRequires: maven-resources-plugin
BuildRequires: maven-site-plugin
BuildRequires: maven-source-plugin
BuildArch: noarch
%description
HK2 for Hundred Kilobytes Kernel is an abstraction to
a module subsystem coupled with a simple yet powerful
component model to build server side software.
%package api
Summary: HK2 API module
%description api
Hundred Kilobytes Kernel API module.
%package apt
Summary: HK2 Inhabitants' index generator
%description apt
HK2 Index generator for auto-depends.
%package class-model
Summary: Class Model for Hk2
%description class-model
Hundred Kilobytes Kernel Class Model.
%if 0
%package config
Summary: HK2 configuration module
%description config
Hundred Kilobytes Kernel configuration module.
%endif
%package core
Summary: HK2 core module
%description core
Hundred Kilobytes Kernel core module.
%package dependency-verifier
Summary: HK2 Static Analyser for verifying module dependency
%description dependency-verifier
HK2 Static Analyser for verifying module dependency.
%package dependency-visualizer
Summary: HK2 Tool to visualize the dependencies
%description dependency-visualizer
Tool to visualize the dependencies generated by
HK2's dependency-verifier.
%package guice-bridge
Summary: HK2 Guice Bridge
%description guice-bridge
Hundred Kilobytes Kernel Guice Bridge.
%package inhabitant-generator
Summary: HK2 Inhabitant Generator - maven plugin
%description inhabitant-generator
Hundred Kilobytes Kernel Inhabitant Generator - maven plugin.
%package locator
Summary: HK2 ServiceLocator Default Implementation
%description locator
Hundred Kilobytes Kernel ServiceLocator Default Implementation.
%package maven
Summary: HK2 Module system maven support
%description maven
HK2 Maven plugin for developing.
%package maven-plugins
Summary: HK2 Maven Plugins
%description maven-plugins
This package provides:
* consolidated bundle Maven plugin,
* osgiversion-maven-plugin - Maven Plugin for
computing OSGi versions from Maven versions.
%package osgi
Summary: HK2 OSGi Adapter
%description osgi
HK2 Maven plugin for developing.
%package runlevel
Summary: HK2 Run Level Service
%description runlevel
Hundred Kilobytes Kernel Run Level Service.
%package testing
Summary: Utilities for testing with HK2
%description testing
Hundred Kilobytes Kernel Utilities for testing.
%package utils
Summary: HK2 Implementation Utilities
%description utils
Hundred Kilobytes Kernel Implementation Utilities.
%package javadoc
Summary: Javadoc for %{name}
%description javadoc
This package contains javadoc for %{name}.
%prep
%setup -q -n glassfish-hk2-%{version}
%patch0 -p0
%pom_remove_plugin :maven-eclipse-plugin
%pom_remove_plugin :maven-release-plugin
%pom_disable_module ../external public
# unavailable deps: org.ops4j.pax.exam pax-exam pax-exam-junit pax-exam-container-default pax-exam-junit-extender-impl
%pom_disable_module osgi-adapter-test osgi/adapter-tests
%pom_remove_plugin org.codehaus.mojo:findbugs-maven-plugin
sed -i "s|<artifactId>asm-debug-all</artifactId>|<artifactId>asm-all</artifactId>|" external/asm-all/pom.xml
for d in hk2-inhabitant-generator hk2-locator hk2-testing/hk2-junitrunner;do
%pom_remove_dep org.glassfish.hk2.external:asm-all-repackaged $d
%pom_remove_dep org.glassfish.hk2.external:javax.inject $d
%pom_add_dep asm:asm-all $d
%pom_add_dep javax.inject:javax.inject $d
done
for d in hk2-locator;do
%pom_remove_dep org.glassfish.hk2.external:cglib $d
%pom_add_dep cglib:cglib $d
done
%pom_remove_plugin :maven-assembly-plugin dependency-visualizer
# disable tiger-types copy
%pom_remove_plugin :maven-dependency-plugin hk2-utils
sed -i "s|<artifactId>osgi_R4_core</artifactId>|<artifactId>org.osgi.core</artifactId>|" hk2-maven/pom.xml
sed -i "s|<artifactId>maven-project</artifactId>|<artifactId>maven-core</artifactId>|" hk2-maven/pom.xml
%pom_add_dep org.apache.maven:maven-compat hk2-maven
# hibernate-validator >= 5.0.0.Final
%pom_disable_module ../hk2-config kernel
%if 0
sed -i "s|<groupId>woodstox</groupId>|<groupId>org.codehaus.woodstox</groupId>|" hk2-config/pom.xml
sed -i "s|<artifactId>wstx-asl</artifactId>|<artifactId>woodstox-core-asl</artifactId>|" hk2-config/pom.xml
%pom_remove_dep org.glassfish.hk2.external:bean-validator hk2-config
%pom_xpath_inject "pom:project/pom:dependencies" "
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>5.0.1.Final</version>
</dependency>" hk2-config
%pom_xpath_inject "pom:project/pom:dependencies" "
<dependency>
<groupId>com.googlecode.jtype</groupId>
<artifactId>jtype</artifactId>
<version>0.1.0</version>
</dependency>" hk2-config
%pom_xpath_inject "pom:project/pom:dependencies" "
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<version>1.5.6</version>
</dependency>" hk2-config
%endif
# TODO
# disabled for now.
# depend on hk2-config
%pom_disable_module ../config-generator kernel
%pom_disable_module ../config-types kernel
# org.osgi org.osgi.enterprise 4.2.0
# https://bugzilla.redhat.com/show_bug.cgi?id=809532
#%%pom_remove_dep org.osgi:org.osgi.enterprise class-model
sed -i "s|<artifactId>org.osgi.enterprise|<artifactId>org.osgi.compendium|" class-model/pom.xml
%pom_remove_dep org.glassfish.hk2:config-types hk2
%pom_remove_dep org.glassfish.hk2:devtests bom
%pom_disable_module ../hk2 kernel
%pom_disable_module ../examples kernel
# remove classpath from manifest
sed -i "s|<addClasspath>true</addClasspath>|<addClasspath>false</addClasspath>|" dependency-verifier/pom.xml
# this test fail
# java.security.AccessControlException: access denied ("java.io.FilePermission"
# ".../BUILD/glassfish-hk2-2.1.92/hk2-locator/target/surefire/surefire_4934182316520890420tmp" "read")
# rm -rf hk2-locator/src/test/java/*
%pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId ='maven-surefire-plugin']/pom:configuration" hk2-locator
# TODO required gendir.jar in hk2-inhabitant-generator/src/test/resources
# formed by usage of the following source directory
# examples/ctm/src/main/java/org/glassfish/examples/ctm
# hk2-inhabitant-generator/src/test/java/org/jvnet/hk2/generator/tests
rm -rf hk2-inhabitant-generator/src/test/java/org/jvnet/hk2/generator/tests/
%pom_xpath_set "pom:properties/pom:asm.version" 3
cp -p %{SOURCE1} LICENSE.txt
sed -i 's/\r//' LICENSE.txt
%mvn_package ":hk2-api" api
%mvn_package ":hk2-bom" %{name}
%mvn_package ":hk2-build" %{name}
%mvn_package ":hk2-kernel-parent" %{name}
%mvn_package ":hk2-parent" %{name}
%mvn_package ":hk2-public" %{name}
# TODO config-generator config-types ... hk2
%if 0
%mvn_package ":hk2-config" config
%endif
%mvn_package ":hk2-dependency-verifier" dependency-verifier
%mvn_package ":hk2-dependency-visualizer" dependency-visualizer
%mvn_package ":hk2-inhabitant-generator" inhabitant-generator
%mvn_package ":hk2-locator" locator
%mvn_package ":hk2-maven" maven
%mvn_package ":hk2-runlevel" runlevel
%mvn_package ":hk2-utils" utils
%mvn_package ":class-model" class-model
%mvn_package ":core" core
%mvn_package ":auto-depends-plugin" apt
%mvn_package ":guice-bridge" guice-bridge
%mvn_package ":hk2-testing" testing
%mvn_package ":hk2-junitrunner" testing
%mvn_package ":osgi" osgi
%mvn_package ":osgi-adapter" osgi
%mvn_package ":osgi-adapter-tests-parent" osgi
%mvn_package ":contract-bundle" osgi
%mvn_package ":faux-sdp-bundle" osgi
%mvn_package ":sdp-management-bundle" osgi
%mvn_package ":test-module-startup" osgi
%mvn_package ":consolidatedbundle-maven-plugin" maven-plugins
%mvn_package ":osgiversion-maven-plugin" maven-plugins
%build
# some tests fails for various cause
%mvn_build -- -Dmaven.test.failure.ignore=true
%install
%mvn_install
%if 0
install -m 644 hk2-config/target/hk2-config-%{version}-tests.jar \
%{buildroot}%{_javadir}/%{name}/hk2-config-tests.jar
%endif
%files -f .mfiles-%{name}
%dir %{_javadir}/%{name}
%license LICENSE.txt
%files api -f .mfiles-api
%license LICENSE.txt
%files apt -f .mfiles-apt
%license LICENSE.txt
%files class-model -f .mfiles-class-model
%license LICENSE.txt
%if 0
%files config -f .mfiles-config
%license LICENSE.txt
%endif
%files core -f .mfiles-core
%license LICENSE.txt
%files dependency-verifier -f .mfiles-dependency-verifier
%license LICENSE.txt
%files dependency-visualizer -f .mfiles-dependency-visualizer
%license LICENSE.txt
%files guice-bridge -f .mfiles-guice-bridge
%license LICENSE.txt
%files inhabitant-generator -f .mfiles-inhabitant-generator
%license LICENSE.txt
%files locator -f .mfiles-locator
%license LICENSE.txt
%files maven -f .mfiles-maven
%license LICENSE.txt
%files maven-plugins -f .mfiles-maven-plugins
%license LICENSE.txt
%files osgi -f .mfiles-osgi
%license LICENSE.txt
%files runlevel -f .mfiles-runlevel
%license LICENSE.txt
%files testing -f .mfiles-testing
%license LICENSE.txt
%files utils -f .mfiles-utils
%license LICENSE.txt
%files javadoc -f .mfiles-javadoc
%license LICENSE.txt
%changelog
* Tue Feb 03 2015 gil cattaneo <puntogil@libero.it> 2.1.93-8
- introduce license macro
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.93-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Fri May 09 2014 Michal Srb <msrb@redhat.com> - 2.1.93-6
- Remove BR: apt-maven-plugin
* Fri Mar 28 2014 Michael Simacek <msimacek@redhat.com> - 2.1.93-5
- Use Requires: java-headless rebuild (#1067528)
* Thu Nov 14 2013 gil cattaneo <puntogil@libero.it> 2.1.93-4
- use objectweb-asm3
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.93-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Wed Jul 10 2013 gil cattaneo <puntogil@libero.it> 2.1.93-2
- switch to XMvn
- minor changes to adapt to current guideline
* Tue May 14 2013 gil cattaneo <puntogil@libero.it> 2.1.93-1
- update to 2.1.93
* Fri Apr 26 2013 gil cattaneo <puntogil@libero.it> 2.1.92-1
- update to 2.1.92
* Sat Oct 13 2012 gil cattaneo <puntogil@libero.it> 2.1.37-1
- update to 2.1.37
* Sat Oct 06 2012 gil cattaneo <puntogil@libero.it> 2.1.35-1
- update to 2.1.35
* Sat Aug 25 2012 gil cattaneo <puntogil@libero.it> 2.1.34-1
- initial rpm