%{?scl:%scl_package glassfish-hk2} %{!?scl:%global pkg_name %{name}} %{?java_common_find_provides_and_requires} %global baserelease 2 %global namedreltag %nil %global namedversion %{version}%{?namedreltag} Name: %{?scl_prefix}glassfish-hk2 Version: 2.4.0 Release: 2.%{baserelease}%{?dist} Summary: Hundred Kilobytes Kernel License: CDDL or GPLv2 with exceptions URL: http://hk2.java.net/ Source0: https://github.com/hk2-project/hk2/archive/hk2-parent-%{namedversion}.tar.gz # https://java.net/jira/browse/HK2-250 # 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 Source2: hk2-inhabitant-generator-osgi.bundle Patch0: glassfish-hk2-2.3.0-hk2-utils-osgi_bundle.patch BuildRequires: %{?scl_prefix_maven}maven-local BuildRequires: %{?scl_prefix_java_common}mvn(aopalliance:aopalliance) BuildRequires: %{?scl_prefix}mvn(args4j:args4j) BuildRequires: %{?scl_prefix_maven}mvn(com.google.inject:guice) BuildRequires: %{?scl_prefix_maven}mvn(com.sun.codemodel:codemodel) BuildRequires: %{?scl_prefix_java_common}mvn(javax.el:javax.el-api) BuildRequires: %{?scl_prefix_maven}mvn(javax.enterprise:cdi-api) BuildRequires: %{?scl_prefix_java_common}mvn(javax.inject:javax.inject) BuildRequires: %{?scl_prefix_java_common}mvn(junit:junit) BuildRequires: %{?scl_prefix_maven}mvn(net.java:jvnet-parent:pom:) BuildRequires: %{?scl_prefix_java_common}mvn(org.apache.ant:ant) BuildRequires: %{?scl_prefix_java_common}mvn(org.apache.ant:ant-launcher) BuildRequires: %{?scl_prefix_java_common}mvn(org.apache.bcel:bcel) BuildRequires: %{?scl_prefix_maven}mvn(org.apache.felix:maven-bundle-plugin) BuildRequires: %{?scl_prefix_maven}mvn(org.apache.felix:org.apache.felix.bundlerepository) BuildRequires: %{?scl_prefix_maven}mvn(org.apache.felix:org.osgi.core) BuildRequires: %{?scl_prefix_maven}mvn(org.apache.maven:maven-archiver) BuildRequires: %{?scl_prefix_maven}mvn(org.apache.maven:maven-artifact) BuildRequires: %{?scl_prefix_maven}mvn(org.apache.maven:maven-compat) BuildRequires: %{?scl_prefix_maven}mvn(org.apache.maven:maven-core) BuildRequires: %{?scl_prefix_maven}mvn(org.apache.maven:maven-plugin-api) BuildRequires: %{?scl_prefix_maven}mvn(org.apache.maven.plugins:maven-antrun-plugin) BuildRequires: %{?scl_prefix_maven}mvn(org.apache.maven.plugins:maven-compiler-plugin) BuildRequires: %{?scl_prefix_maven}mvn(org.apache.maven.plugins:maven-plugin-plugin) BuildRequires: %{?scl_prefix_maven}mvn(org.apache.maven.shared:maven-osgi) BuildRequires: %{?scl_prefix_java_common}mvn(org.easymock:easymock:3.3) BuildRequires: %{?scl_prefix_java_common}mvn(org.javassist:javassist) BuildRequires: %{?scl_prefix}mvn(org.jvnet:tiger-types) BuildRequires: %{?scl_prefix}mvn(org.mockito:mockito-core) BuildRequires: %{?scl_prefix_maven}mvn(org.osgi:org.osgi.compendium) BuildRequires: %{?scl_prefix_maven}mvn(org.osgi:org.osgi.core) BuildRequires: %{?scl_prefix_java_common}mvn(org.ow2.asm:asm-all:5) BuildRequires: %{?scl_prefix_maven}mvn(org.testng:testng) Obsoletes: %{name}-apt 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 class-model Summary: Class Model for Hk2 %description class-model Hundred Kilobytes Kernel Class Model. %package configuration Summary: HK2 configuration modules %description configuration Hundred Kilobytes Kernel configuration modules. %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 extras Summary: HK2 extras module %description extras Default implementations for HK2 services. %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 jmx Summary: HK2 JMX module %description jmx Hundred Kilobytes Kernel JMX module. %package locator Summary: HK2 ServiceLocator Default Implementation %description locator Hundred Kilobytes Kernel ServiceLocator Default Implementation. %package locator-extras Summary: HK2 Locator unit tests %description locator-extras Extra unit tests for the HK2 Locator implementation. %package locator-no-proxies Summary: HK2 Locator No Proxy Unit tests %description locator-no-proxies Tests the basic HK2 locator with no proxiable scopes. %package locator-no-proxies2 Summary: HK2 Locator No Proxy Unit tests (2) %description locator-no-proxies2 Tests the basic HK2 locator using AOP proxies. %package maven Summary: HK2 Module system maven support %description maven HK2 Maven plugin for developing. %package metadata-generator Summary: HK2 Metadata Generator %description metadata-generator HK2 Metadata Generator Subsystem. %package osgi Summary: HK2 OSGi Adapter %description osgi HK2 Maven plugin for developing. %package osgi-resource-locator Summary: HK2 OSGi resource locator bundle Obsoletes: %{?scl_prefix}osgi-resource-locator < %{version}-%{release} Provides: %{?scl_prefix}osgi-resource-locator = %{version}-%{release} %description osgi-resource-locator Hundred Kilobytes Kernel - OSGi resource locator bundle. Used by various API providers that rely on META-INF/services mechanism to locate providers. %package runlevel Summary: HK2 Run Level Service %description runlevel Hundred Kilobytes Kernel Run Level Service. %package runlevel-extras Summary: HK2 RunLevel unit tests %description runlevel-extras Extra unit tests for the HK2 RunLevelService implementation. %package testing Summary: Utilities for testing with HK2 %description testing Hundred Kilobytes Kernel Utilities for testing. %package testng Summary: HK2 TestNG runner %description testng A utility for running HK2 under TestNG. %package utils Summary: HK2 Implementation Utilities %description utils Hundred Kilobytes Kernel Implementation Utilities. %package javadoc Summary: Javadoc for %{pkg_name} %description javadoc This package contains javadoc for %{pkg_name}. %prep %{?scl:scl enable %{scl_maven} %{scl} - << "EOF"} set -e -x %setup -q -n hk2-hk2-parent-%{namedversion} # Do not remove test resources find . -name '*.jar' ! -name "gendir.jar" -type f -print -delete find . -name '*.class' -print -delete %patch0 -p0 # Use system libraries %pom_change_dep -r org.glassfish.hk2.external:asm-all-repackaged org.ow2.asm:asm-all:'${asm.version}' %pom_change_dep -r org.glassfish.hk2.external:aopalliance-repackaged aopalliance:aopalliance:'${aopalliance.version}' %pom_change_dep -r org.glassfish.hk2.external:javax.inject javax.inject::'${javax-inject.version}' %pom_change_dep -r org.glassfish.hk2.external:bean-validator org.hibernate:hibernate-validator:'${hibernate-validator.version}' %pom_change_dep -r org.glassfish.hk2.external:bean-validator-cdi org.hibernate:hibernate-validator-cdi:'${hibernate-validator.version}' %pom_change_dep -r org.glassfish.hk2:tiger-types-osgi org.jvnet:tiger-types:'${tiger-types.version}' # class-model hk2-inhabitant-generator hk2-testing/hk2-junitrunner find ./ -name "*.java" -exec sed -i "s/org.glassfish.hk2.external.org.objectweb.asm/org.objectweb.asm/g" {} + # hk2-api hk2-extras %pom_change_dep -r :osgi-resource-locator ::'${project.version}' %pom_remove_plugin :maven-resources-plugin # org.apache.maven.wagon:wagon-webdav-jackrabbit:2.0 %pom_xpath_remove pom:build/pom:extensions %pom_remove_plugin com.googlecode.maven-download-plugin:maven-download-plugin %pom_remove_plugin :maven-site-plugin %pom_remove_plugin :maven-eclipse-plugin %pom_remove_plugin :findbugs-maven-plugin %pom_remove_plugin -r :jacoco-maven-plugin %pom_remove_dep -r :jacoco-maven-plugin %pom_disable_module consolidatedbundle-maven-plugin %pom_disable_module spring-bridge %pom_disable_module persistence hk2-configuration %pom_disable_module hk2 %pom_disable_module external %pom_disable_module examples # Use unavailable: org.ops4j.pax.exam, org.ops4j.pax.url %pom_disable_module osgi-adapter-test osgi/adapter-tests %pom_remove_dep :osgi-adapter-test bom %pom_remove_dep org.ops4j.base: %pom_remove_dep org.ops4j.pax.exam: %pom_remove_dep org.ops4j.pax.tipi: %pom_remove_dep org.ops4j.pax.url: %pom_remove_dep -r org.apache.geronimo.specs:geronimo-atinject_1.0_spec %pom_remove_dep org.junit:com.springsource.org.junit %pom_remove_dep org.osgi:osgi_R4_core # disable tiger-types copy %pom_remove_plugin :maven-dependency-plugin hk2-utils %pom_remove_plugin :maven-dependency-plugin osgi/adapter-tests/sdp-management-bundle %pom_xpath_remove "pom:plugin[pom:artifactId ='maven-surefire-plugin']/pom:configuration" hk2-api %pom_xpath_remove "pom:plugin[pom:artifactId ='maven-surefire-plugin']/pom:configuration" hk2-locator %pom_xpath_set "pom:dependency[pom:groupId ='org.osgi']/pom:artifactId" org.osgi.core hk2-maven %pom_change_dep -r :maven-project :maven-core %pom_add_dep org.apache.maven:maven-compat hk2-maven %pom_change_dep :org.osgi.enterprise org.osgi:org.osgi.compendium:4.2.0 class-model %pom_xpath_set "pom:dependency[pom:groupId ='com.sun']/pom:artifactId" tools hk2-testing/ant %pom_xpath_remove "pom:dependency[pom:groupId ='com.sun']/pom:scope" hk2-testing/ant %pom_xpath_remove "pom:dependency[pom:groupId ='com.sun']/pom:systemPath" hk2-testing/ant %pom_xpath_remove "pom:profiles/pom:profile[pom:id ='mac']" hk2-testing/ant # Unavailable test dep org.assertj:assertj-core:1.4.0 org.uncommons:reportng:jar:1.1.2 %pom_remove_dep -r org.assertj:assertj-core %pom_remove_dep -r org.uncommons:reportng rm -r hk2-testing/hk2-testng/src/test/java/* rm -r hk2-testing/hk2-mockito/src/test/java/* rm -r hk2-testing/hk2-runlevel-extras/src/test/java/* %pom_change_dep -r ant:ant org.apache.ant:ant %pom_change_dep org.easymock:easymock org.easymock:easymock:3.3 %pom_xpath_set "pom:addClasspath" false dependency-verifier mkdir -p hk2/target/classes %pom_remove_plugin :maven-jar-plugin hk2 # Drop pre-existent OSGI manifest file rm -r hk2-inhabitant-generator/src/main/resources/META-INF/MANIFEST.MF %pom_add_plugin org.apache.felix:maven-bundle-plugin:2.3.7 hk2-inhabitant-generator ' maven-plugin bundle-manifest process-classes manifest ' # Add configuration file for osgiversion plugin cp -p %SOURCE2 hk2-inhabitant-generator/osgi.bundle %pom_add_plugin org.glassfish.hk2:osgiversion-maven-plugin:'${project.version}' hk2-inhabitant-generator # Inject manifest file %pom_add_plugin org.apache.maven.plugins:maven-jar-plugin:2.4 hk2-inhabitant-generator " \${project.build.outputDirectory}/META-INF/MANIFEST.MF foo " cp -p %{SOURCE1} LICENSE.txt sed -i 's/\r//' LICENSE.txt %mvn_package ":class-model" class-model %mvn_package ":hk2" hk2 %mvn_package ":hk2-api" api %mvn_package ":hk2-bom" %{pkg_name} %mvn_package ":hk2-core" core %mvn_package ":hk2-parent" %{pkg_name} %mvn_package ":config-generator" configuration %mvn_package ":config-types" configuration %mvn_package ":hk2-config" configuration %mvn_package ":hk2-config-hub-integration" configuration %mvn_package ":hk2-configuration" configuration %mvn_package ":hk2-configuration-integration" configuration %mvn_package ":hk2-configuration-hub" configuration %mvn_package ":hk2-configuration-persistence" configuration %mvn_package ":hk2-property-file" configuration %mvn_package ":hk2-xml-parent" configuration %mvn_package ":hk2-xml" configuration %mvn_package ":hk2-xml-test" configuration %mvn_package ":hk2-xml-dom" configuration %mvn_package ":hk2-dependency-verifier" dependency-verifier %mvn_package ":hk2-dependency-visualizer" dependency-visualizer %mvn_package ":hk2-extras" extras %mvn_package ":hk2-inhabitant-generator" inhabitant-generator %mvn_package ":hk2-jmx" jmx %mvn_package ":hk2-locator" locator %mvn_package ":hk2-locator-extras" locator-extras %mvn_package ":hk2-locator-no-proxies" locator-no-proxies %mvn_package ":hk2-locator-no-proxies2" locator-no-proxies2 %mvn_package ":hk2-maven" maven %mvn_package ":consolidatedbundle-maven-plugin" __noinstall %mvn_package ":osgiversion-maven-plugin" __noinstall %mvn_package ":hk2-metadata-generator-parent" metadata-generator %mvn_package ":hk2-metadata-generator" metadata-generator %mvn_package ":hk2-metadata-generator-test1" metadata-generator %mvn_package ":hk2-runlevel" runlevel %mvn_package ":hk2-runlevel-extras" runlevel-extras %mvn_package ":hk2-utils" utils %mvn_package ":guice-bridge" guice-bridge %mvn_package ":spring-bridge" spring-bridge %mvn_package ":hk2-testing" testing %mvn_package ":hk2-junitrunner" testing %mvn_package ":hk2-ant-test" testing %mvn_package ":hk2-collections-tests" testing %mvn_package ":hk2-mockito" testing %mvn_package ":interceptor-events" testing %mvn_package ":hk2-testng" testng %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 ":no-hk2-bundle" osgi %mvn_package ":sdp-management-bundle" osgi %mvn_package ":test-module-startup" osgi %mvn_package ":osgi-resource-locator" osgi-resource-locator %{?scl:EOF} %build %{?scl:scl enable %{scl_maven} %{scl} - << "EOF"} set -e -x %mvn_build -- -Dmaven.test.failure.ignore=true -DsurefireArgLineExtra="-enableassertions" %{?scl:EOF} %install %{?scl:scl enable %{scl_maven} %{scl} - << "EOF"} set -e -x %mvn_install %{?scl:EOF} %files -f .mfiles-%{pkg_name} %doc README.md %doc LICENSE.txt %files api -f .mfiles-api %doc LICENSE.txt %files class-model -f .mfiles-class-model %doc LICENSE.txt %files configuration -f .mfiles-configuration %doc LICENSE.txt %files core -f .mfiles-core %doc LICENSE.txt %files dependency-verifier -f .mfiles-dependency-verifier %doc LICENSE.txt %files dependency-visualizer -f .mfiles-dependency-visualizer %doc dependency-visualizer/README %doc LICENSE.txt %files extras -f .mfiles-extras %doc LICENSE.txt %files guice-bridge -f .mfiles-guice-bridge %doc LICENSE.txt %files inhabitant-generator -f .mfiles-inhabitant-generator %doc LICENSE.txt %files jmx -f .mfiles-jmx %doc LICENSE.txt %files locator -f .mfiles-locator %doc LICENSE.txt %files locator-extras -f .mfiles-locator-extras %doc hk2-testing/hk2-locator-extras/README.txt %doc LICENSE.txt %files locator-no-proxies -f .mfiles-locator-no-proxies %doc hk2-testing/hk2-locator-no-proxies/README.txt %doc LICENSE.txt %files locator-no-proxies2 -f .mfiles-locator-no-proxies2 %doc hk2-testing/hk2-locator-no-proxies2/README.txt %doc LICENSE.txt %files maven -f .mfiles-maven %doc LICENSE.txt %files metadata-generator -f .mfiles-metadata-generator %doc LICENSE.txt %files osgi -f .mfiles-osgi %doc LICENSE.txt %files osgi-resource-locator -f .mfiles-osgi-resource-locator %doc LICENSE.txt %files runlevel -f .mfiles-runlevel %doc LICENSE.txt %files runlevel-extras -f .mfiles-runlevel-extras %doc hk2-testing/hk2-runlevel-extras/README.txt %doc LICENSE.txt %files testing -f .mfiles-testing %doc LICENSE.txt %files testng -f .mfiles-testng %doc hk2-testing/hk2-testng/README.md %doc LICENSE.txt %files utils -f .mfiles-utils %doc LICENSE.txt %files javadoc -f .mfiles-javadoc %doc LICENSE.txt %changelog * Sat Jul 23 2016 Mat Booth - 2.4.0-2.2 - Build using the easymock3 compat package - Disable unbuildable modules spring-bridge, persistence - Don't package maven plugins * Sat Jul 23 2016 Mat Booth - 2.4.0-2.1 - Auto SCL-ise package for rh-eclipse46 collection * Wed Feb 03 2016 Fedora Release Engineering - 2.4.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Fri Jan 15 2016 gil cattaneo 2.4.0-1 - update to 2.4.0 * Wed Oct 14 2015 gil cattaneo 2.4.0-0.10.b32 - update to 2.4.0-b32 * Wed Aug 19 2015 gil cattaneo 2.4.0-0.9.b31 - fix some commit problems * Tue Aug 18 2015 gil cattaneo 2.4.0-0.8.b31 - update to 2.4.0-b31 * Wed Jun 17 2015 Fedora Release Engineering - 2.4.0-0.7.b25 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Mon Jun 08 2015 gil cattaneo 2.4.0-0.6.b25 - update to 2.4.0-b25 * Wed May 27 2015 gil cattaneo 2.4.0-0.5.b24 - generate hk2-inhabitant-generator OSGi manifest * Mon May 25 2015 gil cattaneo 2.4.0-0.4.b24 - fix failure on directory creation * Mon May 25 2015 gil cattaneo 2.4.0-0.3.b24 - enable javadoc sub package * Mon May 25 2015 gil cattaneo 2.4.0-0.2.b24 - remove empty javadoc sub package * Sat May 23 2015 gil cattaneo 2.4.0-0.1.b24 - update to 2.4.0-b24 * Mon May 04 2015 gil cattaneo 2.3.0-1 - update to 2.3.0 * Fri Feb 27 2015 Michal Srb - 2.1.93-9 - Use mvn()-like BRs * Tue Feb 03 2015 gil cattaneo 2.1.93-8 - introduce license macro * Sat Jun 07 2014 Fedora Release Engineering - 2.1.93-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Fri May 09 2014 Michal Srb - 2.1.93-6 - Remove BR: apt-maven-plugin * Fri Mar 28 2014 Michael Simacek - 2.1.93-5 - Use Requires: java-headless rebuild (#1067528) * Thu Nov 14 2013 gil cattaneo 2.1.93-4 - use objectweb-asm3 * Sat Aug 03 2013 Fedora Release Engineering - 2.1.93-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Wed Jul 10 2013 gil cattaneo 2.1.93-2 - switch to XMvn - minor changes to adapt to current guideline * Tue May 14 2013 gil cattaneo 2.1.93-1 - update to 2.1.93 * Fri Apr 26 2013 gil cattaneo 2.1.92-1 - update to 2.1.92 * Sat Oct 13 2012 gil cattaneo 2.1.37-1 - update to 2.1.37 * Sat Oct 06 2012 gil cattaneo 2.1.35-1 - update to 2.1.35 * Sat Aug 25 2012 gil cattaneo 2.1.34-1 - initial rpm