69ffcb
# Conditionals to help breaking eclipse <-> xbean dependency cycle
69ffcb
# when bootstrapping for new architectures
69ffcb
%bcond_without equinox
69ffcb
%bcond_without groovy
69ffcb
%bcond_without spring
69ffcb
69ffcb
Name:           xbean
69ffcb
Version:        4.8
69ffcb
Release:        1%{?dist}
69ffcb
Summary:        Java plugin based web server
69ffcb
License:        ASL 2.0
69ffcb
URL:            http://geronimo.apache.org/xbean/
69ffcb
BuildArch:      noarch
69ffcb
69ffcb
Source0:        http://repo2.maven.org/maven2/org/apache/%{name}/%{name}/%{version}/%{name}-%{version}-source-release.zip
69ffcb
69ffcb
# Compatibility with Eclipse Luna (rhbz#1087461)
69ffcb
Patch1:         0002-Port-to-Eclipse-Luna-OSGi.patch
69ffcb
Patch2:         0003-Port-to-QDox-2.0.patch
69ffcb
69ffcb
BuildRequires:  maven-local
69ffcb
BuildRequires:  mvn(commons-logging:commons-logging-api)
69ffcb
BuildRequires:  mvn(log4j:log4j:1.2.12)
69ffcb
BuildRequires:  mvn(org.apache.felix:maven-bundle-plugin)
69ffcb
BuildRequires:  mvn(org.apache.maven.plugins:maven-source-plugin)
69ffcb
BuildRequires:  mvn(org.osgi:org.osgi.core)
69ffcb
BuildRequires:  mvn(org.ow2.asm:asm)
69ffcb
BuildRequires:  mvn(org.ow2.asm:asm-commons)
69ffcb
BuildRequires:  mvn(org.slf4j:slf4j-api)
69ffcb
69ffcb
%if %{with equinox}
69ffcb
BuildRequires:  mvn(org.eclipse:osgi)
69ffcb
%endif
69ffcb
69ffcb
%if %{with groovy}
69ffcb
BuildRequires:  mvn(org.codehaus.groovy:groovy-all)
69ffcb
%endif
69ffcb
69ffcb
%if %{with spring}
69ffcb
BuildRequires:  mvn(ant:ant)
69ffcb
BuildRequires:  mvn(commons-logging:commons-logging)
69ffcb
BuildRequires:  mvn(com.thoughtworks.qdox:qdox)
69ffcb
BuildRequires:  mvn(org.apache.maven:maven-archiver)
69ffcb
BuildRequires:  mvn(org.apache.maven:maven-artifact)
69ffcb
BuildRequires:  mvn(org.apache.maven:maven-plugin-api)
69ffcb
BuildRequires:  mvn(org.apache.maven:maven-project)
69ffcb
BuildRequires:  mvn(org.apache.maven.plugins:maven-antrun-plugin)
69ffcb
BuildRequires:  mvn(org.apache.maven.plugins:maven-plugin-plugin)
69ffcb
BuildRequires:  mvn(org.codehaus.plexus:plexus-archiver)
69ffcb
BuildRequires:  mvn(org.codehaus.plexus:plexus-utils)
69ffcb
BuildRequires:  mvn(org.springframework:spring-beans)
69ffcb
BuildRequires:  mvn(org.springframework:spring-context)
69ffcb
BuildRequires:  mvn(org.springframework:spring-web)
69ffcb
%endif
69ffcb
69ffcb
%description
69ffcb
The goal of XBean project is to create a plugin based server
69ffcb
analogous to Eclipse being a plugin based IDE. XBean will be able to
69ffcb
discover, download and install server plugins from an Internet based
69ffcb
repository. In addition, we include support for multiple IoC systems,
69ffcb
support for running with no IoC system, JMX without JMX code,
69ffcb
lifecycle and class loader management, and a rock solid Spring
69ffcb
integration.
69ffcb
69ffcb
%if %{with spring}
69ffcb
# For now blueprint module fails to compile. Disable it.
69ffcb
%if 0
69ffcb
%package        blueprint
69ffcb
Summary:        Schema-driven namespace handler for Apache Aries Blueprint
69ffcb
69ffcb
%description    blueprint
69ffcb
This package provides %{summary}.
69ffcb
%endif
69ffcb
69ffcb
%package        classloader
69ffcb
Summary:        A flexibie multi-parent classloader
69ffcb
69ffcb
%description    classloader
69ffcb
This package provides %{summary}.
69ffcb
69ffcb
%package        spring
69ffcb
Summary:        Schema-driven namespace handler for spring contexts
69ffcb
Requires:       %{name} = %{version}-%{release}
69ffcb
69ffcb
%description    spring
69ffcb
This package provides %{summary}.
69ffcb
69ffcb
%package        -n maven-%{name}-plugin
69ffcb
Summary:        XBean plugin for Apache Maven
69ffcb
69ffcb
%description    -n maven-%{name}-plugin
69ffcb
This package provides %{summary}.
69ffcb
%endif
69ffcb
69ffcb
%package        javadoc
69ffcb
Summary:        API documentation for %{name}
69ffcb
69ffcb
%description    javadoc
69ffcb
This package provides %{summary}.
69ffcb
69ffcb
%prep
69ffcb
%setup -q
69ffcb
# build failing on this due to doxia-sitetools problems
69ffcb
rm src/site/site.xml
69ffcb
69ffcb
%if %{with equinox}
69ffcb
%patch1 -p1
69ffcb
%endif
69ffcb
%patch2 -p1
69ffcb
69ffcb
%pom_remove_parent
69ffcb
%pom_remove_dep mx4j:mx4j
69ffcb
69ffcb
# Unshade ASM
69ffcb
%pom_remove_dep -r :xbean-asm6-shaded
69ffcb
%pom_remove_dep -r :xbean-finder-shaded
69ffcb
%pom_disable_module xbean-asm6-shaded
69ffcb
%pom_disable_module xbean-finder-shaded
69ffcb
%pom_add_dep org.apache.xbean:xbean-asm-util:%{version} xbean-reflect
69ffcb
%pom_xpath_remove pom:optional xbean-reflect xbean-asm-util
69ffcb
%pom_xpath_remove 'pom:scope[text()="provided"]' xbean-reflect xbean-asm-util
69ffcb
sed -i 's/org\.apache\.xbean\.asm6/org.objectweb.asm/g' `find xbean-reflect -name '*.java'`
69ffcb
69ffcb
# Prevent modules depending on springframework from building.
69ffcb
%if %{without spring}
69ffcb
   %pom_remove_dep org.springframework:
69ffcb
   #%%pom_disable_module xbean-blueprint
69ffcb
   %pom_disable_module xbean-classloader
69ffcb
   %pom_disable_module xbean-spring
69ffcb
   %pom_disable_module maven-xbean-plugin
69ffcb
%else
69ffcb
   %mvn_package :xbean-classloader classloader
69ffcb
   %mvn_package :xbean-spring spring
69ffcb
   %mvn_package :maven-xbean-plugin maven-xbean-plugin
69ffcb
%endif
69ffcb
# blueprint FTBFS, disable for now
69ffcb
%pom_disable_module xbean-blueprint
69ffcb
69ffcb
%if %{without equinox}
69ffcb
  %pom_remove_dep :xbean-bundleutils xbean-finder
69ffcb
  rm -r xbean-finder/src/main/java/org/apache/xbean/finder{,/archive}/Bundle*
69ffcb
  %pom_disable_module xbean-bundleutils
69ffcb
%endif
69ffcb
69ffcb
%if %{without groovy}
69ffcb
%pom_disable_module xbean-telnet
69ffcb
%endif
69ffcb
69ffcb
# maven-xbean-plugin invocation makes no sense as there are no namespaces
69ffcb
%pom_remove_plugin :maven-xbean-plugin xbean-classloader
69ffcb
69ffcb
# As auditing tool RAT is useful for upstream only.
69ffcb
%pom_remove_plugin :apache-rat-plugin
69ffcb
69ffcb
# disable copy of internal aries-blueprint
69ffcb
sed -i "s|<Private-Package>|
69ffcb
sed -i "s|</Private-Package>|</Private-Package-->|" xbean-blueprint/pom.xml
69ffcb
69ffcb
%build
69ffcb
%mvn_build -f
69ffcb
69ffcb
%install
69ffcb
%mvn_install
69ffcb
69ffcb
%files -f .mfiles
69ffcb
%doc LICENSE NOTICE
69ffcb
%dir %{_javadir}/%{name}
69ffcb
69ffcb
%if %{with spring}
69ffcb
%if 0
69ffcb
%files blueprint -f .mfiles-blueprint
69ffcb
%doc LICENSE NOTICE %{name}-blueprint/target/restaurant.xsd*
69ffcb
%endif
69ffcb
69ffcb
%files classloader -f .mfiles-classloader
69ffcb
%doc LICENSE NOTICE
69ffcb
69ffcb
%files spring -f .mfiles-spring
69ffcb
%doc LICENSE NOTICE
69ffcb
69ffcb
%files -n maven-%{name}-plugin -f .mfiles-maven-%{name}-plugin
69ffcb
%doc LICENSE NOTICE
69ffcb
%endif
69ffcb
69ffcb
%files javadoc -f .mfiles-javadoc
69ffcb
%doc LICENSE NOTICE
69ffcb
69ffcb
%changelog
69ffcb
* Thu Apr 19 2018 Michael Simacek <msimacek@redhat.com> - 4.8-1
69ffcb
- Update to upstream version 4.8
69ffcb
69ffcb
* Tue Mar 13 2018 Michael Simacek <msimacek@redhat.com> - 4.6-1
69ffcb
- Update to upstream version 4.6
69ffcb
69ffcb
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.5-9
69ffcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
69ffcb
69ffcb
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.5-8
69ffcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
69ffcb
69ffcb
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.5-7
69ffcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
69ffcb
69ffcb
* Wed Feb  1 2017 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.5-6
69ffcb
- Introduce groovy build conditional
69ffcb
69ffcb
* Wed Feb 01 2017 Michael Simacek <msimacek@redhat.com> - 4.5-5
69ffcb
- Fix build with conditionals
69ffcb
69ffcb
* Wed Feb 01 2017 Michael Simacek <msimacek@redhat.com> - 4.5-4
69ffcb
- Port to current QDox
69ffcb
69ffcb
* Thu Jun 16 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.5-3
69ffcb
- Add missing build-requires
69ffcb
69ffcb
* Thu May 12 2016 Michael Simacek <msimacek@redhat.com> - 4.5-2
69ffcb
- Enable xbean-asm-util
69ffcb
69ffcb
* Mon May 02 2016 Michael Simacek <msimacek@redhat.com> - 4.5-1
69ffcb
- Update to upstream version 4.5
69ffcb
69ffcb
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 4.4-2
69ffcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
69ffcb
69ffcb
* Tue Nov 24 2015 Michael Simacek <msimacek@redhat.com> - 4.4-1
69ffcb
- Update to upstream version 4.4
69ffcb
- Rebase patches
69ffcb
- Remove obsolete groovy patch
69ffcb
69ffcb
* Mon Jul 13 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.3-1
69ffcb
- Update to upstream version 4.3
69ffcb
69ffcb
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2-2
69ffcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
69ffcb
69ffcb
* Wed Apr  1 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.2-1
69ffcb
- Update to upstream version 4.2
69ffcb
69ffcb
* Thu Feb  5 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.1-2
69ffcb
- Fix patch unshading ASM
69ffcb
69ffcb
* Fri Nov 21 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.1-1
69ffcb
- Update to upstream version 4.1
69ffcb
69ffcb
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.17-2
69ffcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
69ffcb
69ffcb
* Mon Apr 14 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.17-1
69ffcb
- Update to upstream version 3.17
69ffcb
- Add patch for Eclipse Luna
69ffcb
69ffcb
* Thu Dec  5 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.16-1
69ffcb
- Update to upstream version 3.16
69ffcb
69ffcb
* Thu Aug 08 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.13-4
69ffcb
- Update to latest packaging guidelines
69ffcb
69ffcb
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.13-3
69ffcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
69ffcb
69ffcb
* Mon Apr 29 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.13-2
69ffcb
- Remove unneeded BR: maven-idea-plugin
69ffcb
69ffcb
* Fri Mar 15 2013 Michal Srb <msrb@redhat.com> - 3.13-1
69ffcb
- Update to upstream version 3.13
69ffcb
69ffcb
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.12-6
69ffcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
69ffcb
69ffcb
* Wed Feb 06 2013 Java SIG <java-devel@lists.fedoraproject.org> - 3.12-5
69ffcb
- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild
69ffcb
- Replace maven BuildRequires with maven-local
69ffcb
69ffcb
* Mon Dec 17 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.12-4
69ffcb
- Enable xbean-spring, resolves rhbz#887496
69ffcb
- Disable xbean-blueprint due to FTBFS
69ffcb
69ffcb
* Mon Oct 22 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.12-3
69ffcb
- Replace eclipse-rcp requires with eclipse-equinox-osgi
69ffcb
- Reenable Equinox
69ffcb
69ffcb
* Tue Oct 16 2012 gil cattaneo <puntogil@libero.it> - 3.12-2
69ffcb
- Enable xbean-blueprint and xbean-classloader modules
69ffcb
69ffcb
* Wed Oct 10 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.12-1
69ffcb
- Update to upstream version 3.12
69ffcb
69ffcb
* Wed Oct 10 2012 Krzysztof Daniel <kdaniel@redhat.com> 3.11.1-8
69ffcb
- Revert previous changes.
69ffcb
69ffcb
* Wed Oct 10 2012 Krzysztof Daniel <kdaniel@redhat.com> 3.11.1-7
69ffcb
- Disable parts dependent on Eclipse (for bootstraping purpose).
69ffcb
69ffcb
* Wed Oct 10 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.11.1-6
69ffcb
- Implement equinox and spring conditionals
69ffcb
69ffcb
* Mon Sep  3 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.11.1-5
69ffcb
- Fix eclipse requires
69ffcb
69ffcb
* Mon Aug 27 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.11.1-4
69ffcb
- Fix felix-framework enabling patch
69ffcb
69ffcb
* Mon Aug  6 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.11.1-3
69ffcb
- Enable xbean-spring
69ffcb
- Enable maven-xbean-plugin
69ffcb
- Remove RPM bug workaround
69ffcb
69ffcb
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.11.1-2
69ffcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
69ffcb
69ffcb
* Fri Jul 13 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.11.1-1
69ffcb
- Update to the upstream version 3.11.1
69ffcb
- Force use of Equinox instead of Felix
69ffcb
- Convert patch to POM macros
69ffcb
69ffcb
* Thu May  3 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.8-5
69ffcb
- Remove mx4j from deps (javax.management provided by JDK 1.5+)
69ffcb
69ffcb
* Tue Apr 24 2012 Alexander Kurtakov <akurtako@redhat.com> 3.8-4
69ffcb
- BR felix-framework instead of felix-osgi-core.
69ffcb
69ffcb
* Tue Apr 24 2012 Alexander Kurtakov <akurtako@redhat.com> 3.8-3
69ffcb
- Do not build equinox specific parts for RHEL.
69ffcb
69ffcb
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.8-2
69ffcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
69ffcb
69ffcb
* Tue Dec  6 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.8-1
69ffcb
- Update to latest upstream version
69ffcb
- Build with maven 3
69ffcb
- Packaging & guidelines fixes
69ffcb
69ffcb
* Sat May 28 2011 Marek Goldmann <mgoldman@redhat.com> - 3.7-7
69ffcb
- Added xbean-finder and xbean-bundleutils submodules
69ffcb
69ffcb
* Fri Mar  4 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.7-6
69ffcb
- Add comment for removing javadoc
69ffcb
- Fix maven 3 build
69ffcb
69ffcb
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.7-5
69ffcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
69ffcb
69ffcb
* Mon Dec  6 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.7-4
69ffcb
- Fix pom filename (Resolves rhbz#655827)
69ffcb
- Add depmap for main pom file
69ffcb
- Fixes according to new guidelines (versionless jars, javadocs)
69ffcb
69ffcb
* Fri Jul 30 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.7-3
69ffcb
- Use javadoc:aggregate to generate javadocs
69ffcb
69ffcb
* Fri Jul  9 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.7-2
69ffcb
- Add license to javadoc subpackage
69ffcb
69ffcb
* Mon Jun 21 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.7-1
69ffcb
- First release