1f03e8b
# Conditionals to help breaking eclipse <-> xbean dependency cycle
1f03e8b
# when bootstrapping for new architectures
1f03e8b
%if 0%{?fedora}
0bc30a9
%bcond_without equinox
d328709
%bcond_without spring
1f03e8b
%endif
1f03e8b
e9ea394
Name:           xbean
5d710cb
Version:        3.12
e9ea394
BuildArch:      noarch
e9ea394
79bc1ec
Release:        6%{?dist}
e9ea394
Summary:        Java plugin based web server
e9ea394
e9ea394
Group:          Development/Libraries
e9ea394
License:        ASL 2.0
e9ea394
URL:            http://geronimo.apache.org/xbean/
e9ea394
e9ea394
# unfortunately no source/binary releases are being made lately, just
e9ea394
# tags in repos and binary releases in maven repositories
5d710cb
# svn export http://svn.apache.org/repos/asf/geronimo/xbean/tags/%{name}-%{version}
5d710cb
# tar caf %{name}-%{version}.tar.xz %{name}-%{version}
e9ea394
Source0:        xbean-%{version}.tar.xz
e9ea394
Source1:        xbean.depmap
e9ea394
e9ea394
BuildRequires:  java-devel
e9ea394
BuildRequires:  apache-commons-beanutils
e9ea394
BuildRequires:  apache-commons-logging
e9ea394
BuildRequires:  objectweb-asm
e9ea394
BuildRequires:  ant
e9ea394
BuildRequires:  qdox
e9ea394
BuildRequires:  slf4j
Stanislav Ochotnicky b76f3fd
BuildRequires:  maven-local
e9ea394
BuildRequires:  maven-plugin-bundle
e9ea394
BuildRequires:  maven-antrun-plugin
e9ea394
BuildRequires:  maven-compiler-plugin
Stanislav Ochotnicky abc71dd
BuildRequires:  maven-dependency-plugin
e9ea394
BuildRequires:  maven-idea-plugin
e9ea394
BuildRequires:  maven-install-plugin
e9ea394
BuildRequires:  maven-javadoc-plugin
e9ea394
BuildRequires:  maven-resources-plugin
46f8c21
BuildRequires:  maven-surefire-plugin
e9ea394
BuildRequires:  maven-site-plugin
Stanislav Ochotnicky 8c75059
BuildRequires:  maven-shade-plugin
1f03e8b
%if %{with equinox}
0bc30a9
BuildRequires:  eclipse-equinox-osgi
1f03e8b
%else
1f03e8b
BuildRequires:  felix-framework
1f03e8b
%endif
1f03e8b
%if %{with spring}
7b4e68e
BuildRequires:  apache-commons-jexl
7b4e68e
BuildRequires:  aries-blueprint
7b4e68e
# test deps BuildRequires:  cglib
7b4e68e
BuildRequires:  felix-osgi-compendium
7b4e68e
BuildRequires:  felix-osgi-core
7b4e68e
BuildRequires:  geronimo-annotation
7b4e68e
BuildRequires:  pax-logging
7b4e68e
c6daae2
BuildRequires:  maven-archiver
c6daae2
BuildRequires:  maven-plugin-plugin
c6daae2
BuildRequires:  maven-project
c6daae2
BuildRequires:  plexus-archiver
c6daae2
BuildRequires:  plexus-utils
c6daae2
BuildRequires:  springframework
c6daae2
BuildRequires:  springframework-beans
c6daae2
BuildRequires:  springframework-context
c6daae2
BuildRequires:  springframework-web
46f8c21
%endif
e9ea394
e9ea394
Requires:       java
e9ea394
Requires:       apache-commons-logging
df929fb
Requires:       objectweb-asm
df929fb
Requires:       slf4j
1f03e8b
%if %{with equinox}
0bc30a9
Requires:       eclipse-equinox-osgi
1d6ef55
%else
1d6ef55
Requires:       felix-framework
1d6ef55
%endif
e9ea394
e9ea394
%description
e9ea394
The goal of XBean project is to create a plugin based server
e9ea394
analogous to Eclipse being a plugin based IDE. XBean will be able to
e9ea394
discover, download and install server plugins from an Internet based
e9ea394
repository. In addition, we include support for multiple IoC systems,
e9ea394
support for running with no IoC system, JMX without JMX code,
e9ea394
lifecycle and class loader management, and a rock solid Spring
e9ea394
integration.
e9ea394
1f03e8b
%if %{with spring}
d328709
# For now blueprint module fails to compile. Disable it.
d328709
%if 0
7b4e68e
%package        blueprint
7b4e68e
Summary:        Schema-driven namespace handler for Apache Aries Blueprint
7b4e68e
Requires:       %{name} = %{version}-%{release}
7b4e68e
Requires:       apache-commons-jexl
7b4e68e
Requires:       aries-blueprint
7b4e68e
Requires:       felix-osgi-compendium
7b4e68e
Requires:       geronimo-annotation
7b4e68e
Requires:       pax-logging
7b4e68e
7b4e68e
%description    blueprint
7b4e68e
This package provides %{summary}.
d328709
%endif
7b4e68e
7b4e68e
%package        classloader
7b4e68e
Summary:        A flexibie multi-parent classloader
7b4e68e
# maven-xbean-plugin
7b4e68e
Requires:       %{name} = %{version}-%{release}
7b4e68e
Requires:       springframework-beans
7b4e68e
7b4e68e
%description    classloader
7b4e68e
This package provides %{summary}.
7b4e68e
c6daae2
%package        spring
c6daae2
Summary:        Schema-driven namespace handler for spring contexts
c6daae2
Requires:       %{name} = %{version}-%{release}
c6daae2
Requires:       springframework-beans
c6daae2
Requires:       springframework-context
c6daae2
Requires:       springframework-web
c6daae2
c6daae2
%description    spring
c6daae2
This package provides %{summary}.
c6daae2
c6daae2
%package        -n maven-%{name}-plugin
c6daae2
Summary:        XBean plugin for Apache Maven
c6daae2
Requires:       %{name}-spring = %{version}-%{release}
c6daae2
Requires:       maven
c6daae2
Requires:       maven-archiver
c6daae2
Requires:       maven-project
c6daae2
Requires:       plexus-archiver
c6daae2
Requires:       plexus-utils
c6daae2
Requires:       qdox
c6daae2
Requires:       springframework
c6daae2
Requires:       springframework-beans
c6daae2
Requires:       springframework-context
c6daae2
Requires:       springframework-web
c6daae2
c6daae2
%description    -n maven-%{name}-plugin
c6daae2
This package provides %{summary}.
c6daae2
%endif
c6daae2
e9ea394
%package        javadoc
e9ea394
Summary:        API documentation for %{name}
e9ea394
Group:          Documentation
e9ea394
e9ea394
%description    javadoc
c6daae2
This package provides %{summary}.
e9ea394
e9ea394
%prep
e9ea394
%setup -q
e9ea394
# build failing on this due to doxia-sitetools problems
e9ea394
rm src/site/site.xml
e9ea394
c6daae2
%pom_remove_parent
6b26146
%pom_remove_dep mx4j:mx4j
6b26146
%pom_remove_dep :xbean-asm-shaded xbean-reflect
6b26146
c6daae2
# These aren't needed for now
6b26146
%pom_disable_module xbean-asm-shaded
6b26146
%pom_disable_module xbean-finder-shaded
6b26146
%pom_disable_module xbean-telnet
e9ea394
c6daae2
# Prevent modules depending on springframework from building.
1f03e8b
%if %{without spring}
c6daae2
   %pom_remove_dep org.springframework:
d328709
   #%%pom_disable_module xbean-blueprint
7b4e68e
   %pom_disable_module xbean-classloader
c6daae2
   %pom_disable_module xbean-spring
c6daae2
   %pom_disable_module maven-xbean-plugin
1f03e8b
%endif
d328709
# blueprint FTBFS, disable for now
d328709
%pom_disable_module xbean-blueprint
d328709
46f8c21
1f03e8b
# Replace generic OSGi dependencies with either Equinox or Felix
df929fb
%pom_remove_dep :org.osgi.core xbean-bundleutils
df929fb
%pom_remove_dep org.eclipse:osgi xbean-bundleutils
1f03e8b
%if %{with equinox}
1f03e8b
  %pom_add_dep org.eclipse.osgi:org.eclipse.osgi xbean-bundleutils
1f03e8b
%else
1f03e8b
  rm -rf xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/equinox/
1f03e8b
  %pom_add_dep org.apache.felix:org.apache.felix.framework xbean-bundleutils
1f03e8b
%endif
df929fb
df929fb
e9ea394
# Fix dependency on xbean-asm-shaded to original objectweb-asm
e9ea394
sed -i 's/org.apache.xbean.asm/org.objectweb.asm/' \
e9ea394
    xbean-reflect/src/main/java/org/apache/xbean/recipe/XbeanAsmParameterNameLoader.java
e9ea394
7b4e68e
# disable copy of internal aries-blueprint
7b4e68e
sed -i "s|<Private-Package>|
7b4e68e
sed -i "s|</Private-Package>|</Private-Package-->|" xbean-blueprint/pom.xml
7b4e68e
c6daae2
# Fix ant groupId
c6daae2
find -name pom.xml -exec sed -i "s|<groupId>ant</groupId>|<groupId>org.apache.ant</groupId>|" {} \;
7b4e68e
# Fix cglib artifactId
7b4e68e
find -name pom.xml -exec sed -i "s|<artifactId>cglib-nodep</artifactId>|<artifactId>cglib</artifactId>|" {} \;
46f8c21
e9ea394
%build
Stanislav Ochotnicky abc71dd
mvn-rpmbuild -e \
1f03e8b
        -Dmaven.compiler.source=1.5 \
1f03e8b
        -Dmaven.compiler.target=1.5 \
Stanislav Ochotnicky abc71dd
        -Dmaven.local.depmap.file="%{SOURCE1}" \
Stanislav Ochotnicky abc71dd
        -Dmaven.test.skip=true \
Stanislav Ochotnicky a12bb0d
        install javadoc:aggregate
e9ea394
e9ea394
e9ea394
%install
c6daae2
install -dm 755 $RPM_BUILD_ROOT/%{_javadir}/%{name}
c6daae2
install -dm 755 $RPM_BUILD_ROOT/%{_mavenpomdir}
c6daae2
install -dm 755 $RPM_BUILD_ROOT/%{_mavendepmapfragdir}
c6daae2
install -dm 755 $RPM_BUILD_ROOT/%{_javadocdir}/%{name}
e9ea394
c6daae2
# parent pom
c6daae2
install -pm 644 pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-main.pom
c6daae2
%add_maven_depmap JPP.%{name}-main.pom
e9ea394
c6daae2
for sub in bundleutils classpath finder naming reflect; do
c6daae2
    install -m 644 %{name}-${sub}/target/%{name}-${sub}-%{version}.jar $RPM_BUILD_ROOT/%{_javadir}/%{name}/%{name}-${sub}.jar
c6daae2
    install -pm 644 %{name}-${sub}/pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-%{name}-${sub}.pom
Stanislav Ochotnicky abc71dd
    %add_maven_depmap JPP.%{name}-%{name}-${sub}.pom %{name}/%{name}-${sub}.jar
e9ea394
done
Stanislav Ochotnicky a12bb0d
1f03e8b
%if %{with spring}
d328709
   for m in classloader spring; do  # blueprint should be there too
7b4e68e
       install -m 644 %{name}-${m}/target/%{name}-${m}-%{version}.jar $RPM_BUILD_ROOT/%{_javadir}/%{name}/%{name}-${m}.jar;
7b4e68e
       install -pm 644 %{name}-${m}/pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-%{name}-${m}.pom
7b4e68e
       %add_maven_depmap JPP.%{name}-%{name}-${m}.pom %{name}/%{name}-${m}.jar -f ${m}
7b4e68e
   done
c6daae2
   # maven-xbean-plugin
c6daae2
   install -m 644 maven-%{name}-plugin/target/maven-%{name}-plugin-%{version}.jar $RPM_BUILD_ROOT/%{_javadir}/%{name}/maven-%{name}-plugin.jar
c6daae2
   install -pm 644 maven-%{name}-plugin/pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-maven-%{name}-plugin.pom
c6daae2
   %add_maven_depmap JPP.%{name}-maven-%{name}-plugin.pom %{name}/maven-%{name}-plugin.jar -f maven-plugin
1f03e8b
%endif
c6daae2
c6daae2
# javadocs
Stanislav Ochotnicky bfa0c26
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
e9ea394
e9ea394
e9ea394
%files
e9ea394
%doc LICENSE NOTICE
c6daae2
%dir %{_javadir}/%{name}
c6daae2
%{_javadir}/%{name}/%{name}-bundleutils.jar
c6daae2
%{_javadir}/%{name}/%{name}-classpath.jar
c6daae2
%{_javadir}/%{name}/%{name}-finder.jar
c6daae2
%{_javadir}/%{name}/%{name}-naming.jar
c6daae2
%{_javadir}/%{name}/%{name}-reflect.jar
c6daae2
%{_mavenpomdir}/JPP.%{name}-main.pom
c6daae2
%{_mavenpomdir}/JPP.%{name}-%{name}-bundleutils.pom
c6daae2
%{_mavenpomdir}/JPP.%{name}-%{name}-classpath.pom
c6daae2
%{_mavenpomdir}/JPP.%{name}-%{name}-finder.pom
c6daae2
%{_mavenpomdir}/JPP.%{name}-%{name}-naming.pom
c6daae2
%{_mavenpomdir}/JPP.%{name}-%{name}-reflect.pom
e9ea394
%{_mavendepmapfragdir}/%{name}
c6daae2
1f03e8b
%if %{with spring}
d328709
%if 0
7b4e68e
%files blueprint
7b4e68e
%doc LICENSE NOTICE %{name}-blueprint/target/restaurant.xsd*
7b4e68e
%{_javadir}/%{name}/%{name}-blueprint.jar
7b4e68e
%{_mavenpomdir}/JPP.%{name}-%{name}-blueprint.pom
7b4e68e
%{_mavendepmapfragdir}/%{name}-blueprint
d328709
%endif
7b4e68e
7b4e68e
%files classloader
7b4e68e
%doc LICENSE NOTICE
7b4e68e
%{_javadir}/%{name}/%{name}-classloader.jar
7b4e68e
%{_mavenpomdir}/JPP.%{name}-%{name}-classloader.pom
7b4e68e
%{_mavendepmapfragdir}/%{name}-classloader
7b4e68e
c6daae2
%files spring
c6daae2
%doc LICENSE NOTICE
c6daae2
%{_javadir}/%{name}/%{name}-spring.jar
c6daae2
%{_mavenpomdir}/JPP.%{name}-%{name}-spring.pom
c6daae2
%{_mavendepmapfragdir}/%{name}-spring
c6daae2
c6daae2
%files -n maven-%{name}-plugin
c6daae2
%doc LICENSE NOTICE
c6daae2
%{_javadir}/%{name}/maven-%{name}-plugin.jar
c6daae2
%{_mavenpomdir}/JPP.%{name}-maven-%{name}-plugin.pom
c6daae2
%{_mavendepmapfragdir}/%{name}-maven-plugin
c6daae2
%endif
e9ea394
e9ea394
%files javadoc
c6daae2
%doc LICENSE NOTICE
e9ea394
%{_javadocdir}/%{name}
e9ea394
e9ea394
%changelog
79bc1ec
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.12-6
79bc1ec
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
79bc1ec
Stanislav Ochotnicky b76f3fd
* Wed Feb 06 2013 Java SIG <java-devel@lists.fedoraproject.org> - 3.12-5
Stanislav Ochotnicky b76f3fd
- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild
Stanislav Ochotnicky b76f3fd
- Replace maven BuildRequires with maven-local
Stanislav Ochotnicky b76f3fd
d328709
* Mon Dec 17 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.12-4
d328709
- Enable xbean-spring, resolves rhbz#887496
d328709
- Disable xbean-blueprint due to FTBFS
d328709
0bc30a9
* Mon Oct 22 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.12-3
0bc30a9
- Replace eclipse-rcp requires with eclipse-equinox-osgi
0bc30a9
- Reenable Equinox
0bc30a9
7b4e68e
* Tue Oct 16 2012 gil cattaneo <puntogil@libero.it> - 3.12-2
7b4e68e
- Enable xbean-blueprint and xbean-classloader modules
7b4e68e
5d710cb
* Wed Oct 10 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.12-1
5d710cb
- Update to upstream version 3.12
5d710cb
Krzysztof Daniel 8136515
* Wed Oct 10 2012 Krzysztof Daniel <kdaniel@redhat.com> 3.11.1-8
Krzysztof Daniel 8136515
- Revert previous changes.
Krzysztof Daniel 8136515
Krzysztof Daniel 0886a01
* Wed Oct 10 2012 Krzysztof Daniel <kdaniel@redhat.com> 3.11.1-7
Krzysztof Daniel 0886a01
- Disable parts dependent on Eclipse (for bootstraping purpose).
Krzysztof Daniel 0886a01
1f03e8b
* Wed Oct 10 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.11.1-6
1f03e8b
- Implement equinox and spring conditionals
1f03e8b
1d6ef55
* Mon Sep  3 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.11.1-5
1d6ef55
- Fix eclipse requires
1d6ef55
8b7e700
* Mon Aug 27 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.11.1-4
8b7e700
- Fix felix-framework enabling patch
8b7e700
c6daae2
* Mon Aug  6 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.11.1-3
c6daae2
- Enable xbean-spring
c6daae2
- Enable maven-xbean-plugin
c6daae2
- Remove RPM bug workaround
c6daae2
1faa516
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.11.1-2
1faa516
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
1faa516
df929fb
* Fri Jul 13 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.11.1-1
df929fb
- Update to the upstream version 3.11.1
df929fb
- Force use of Equinox instead of Felix
df929fb
- Convert patch to POM macros
df929fb
Stanislav Ochotnicky 3517920
* Thu May  3 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.8-5
Stanislav Ochotnicky 3517920
- Remove mx4j from deps (javax.management provided by JDK 1.5+)
Stanislav Ochotnicky 3517920
ccd6fe5
* Tue Apr 24 2012 Alexander Kurtakov <akurtako@redhat.com> 3.8-4
ccd6fe5
- BR felix-framework instead of felix-osgi-core.
ccd6fe5
46f8c21
* Tue Apr 24 2012 Alexander Kurtakov <akurtako@redhat.com> 3.8-3
46f8c21
- Do not build equinox specific parts for RHEL.
46f8c21
8879269
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.8-2
8879269
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
8879269
Stanislav Ochotnicky abc71dd
* Tue Dec  6 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.8-1
Stanislav Ochotnicky abc71dd
- Update to latest upstream version
Stanislav Ochotnicky abc71dd
- Build with maven 3
Stanislav Ochotnicky abc71dd
- Packaging & guidelines fixes
Stanislav Ochotnicky abc71dd
Stanislav Ochotnicky 566be54
* Sat May 28 2011 Marek Goldmann <mgoldman@redhat.com> - 3.7-7
Stanislav Ochotnicky 566be54
- Added xbean-finder and xbean-bundleutils submodules
Stanislav Ochotnicky 566be54
Stanislav Ochotnicky 8c75059
* Fri Mar  4 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.7-6
Stanislav Ochotnicky 8c75059
- Add comment for removing javadoc
Stanislav Ochotnicky 8c75059
- Fix maven 3 build
Stanislav Ochotnicky 8c75059
0d21c66
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.7-5
0d21c66
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
0d21c66
Stanislav Ochotnicky bfa0c26
* Mon Dec  6 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.7-4
Stanislav Ochotnicky bfa0c26
- Fix pom filename (Resolves rhbz#655827)
Stanislav Ochotnicky bfa0c26
- Add depmap for main pom file
Stanislav Ochotnicky bfa0c26
- Fixes according to new guidelines (versionless jars, javadocs)
Stanislav Ochotnicky bfa0c26
Stanislav Ochotnicky a12bb0d
* Fri Jul 30 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.7-3
Stanislav Ochotnicky a12bb0d
- Use javadoc:aggregate to generate javadocs
Stanislav Ochotnicky a12bb0d
e9ea394
* Fri Jul  9 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.7-2
e9ea394
- Add license to javadoc subpackage
e9ea394
e9ea394
* Mon Jun 21 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.7-1
e9ea394
- First release