e9ea39
Name:           xbean
df929f
Version:        3.11.1
e9ea39
BuildArch:      noarch
e9ea39
c6daae
Release:        3%{?dist}
e9ea39
Summary:        Java plugin based web server
e9ea39
e9ea39
Group:          Development/Libraries
e9ea39
License:        ASL 2.0
e9ea39
URL:            http://geronimo.apache.org/xbean/
e9ea39
e9ea39
# unfortunately no source/binary releases are being made lately, just
e9ea39
# tags in repos and binary releases in maven repositories
Stanislav Ochotnicky abc71d
# svn export http://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-3.8
Stanislav Ochotnicky abc71d
# tar caf xbean-3.8.tar.xz xbean-3.8
e9ea39
Source0:        xbean-%{version}.tar.xz
e9ea39
Source1:        xbean.depmap
e9ea39
e9ea39
BuildRequires:  java-devel
e9ea39
BuildRequires:  apache-commons-beanutils
e9ea39
BuildRequires:  apache-commons-logging
e9ea39
BuildRequires:  objectweb-asm
e9ea39
BuildRequires:  ant
e9ea39
BuildRequires:  qdox
e9ea39
BuildRequires:  slf4j
Stanislav Ochotnicky abc71d
BuildRequires:  maven
e9ea39
BuildRequires:  maven-plugin-bundle
e9ea39
BuildRequires:  maven-antrun-plugin
e9ea39
BuildRequires:  maven-compiler-plugin
Stanislav Ochotnicky abc71d
BuildRequires:  maven-dependency-plugin
e9ea39
BuildRequires:  maven-idea-plugin
e9ea39
BuildRequires:  maven-install-plugin
e9ea39
BuildRequires:  maven-javadoc-plugin
e9ea39
BuildRequires:  maven-resources-plugin
46f8c2
BuildRequires:  maven-surefire-plugin
e9ea39
BuildRequires:  maven-site-plugin
Stanislav Ochotnicky 8c7505
BuildRequires:  maven-shade-plugin
46f8c2
%if !0%{?rhel:1}
Stanislav Ochotnicky abc71d
BuildRequires:  eclipse-rcp
c6daae
BuildRequires:  maven-archiver
c6daae
BuildRequires:  maven-plugin-plugin
c6daae
BuildRequires:  maven-project
c6daae
BuildRequires:  plexus-archiver
c6daae
BuildRequires:  plexus-utils
c6daae
BuildRequires:  springframework
c6daae
BuildRequires:  springframework-beans
c6daae
BuildRequires:  springframework-context
c6daae
BuildRequires:  springframework-web
c6daae
%else
c6daae
BuildRequires:  felix-framework
46f8c2
%endif
e9ea39
e9ea39
Requires:       java
df929f
Requires:       jpackage-utils
e9ea39
Requires:       apache-commons-logging
df929f
Requires:       objectweb-asm
df929f
Requires:       slf4j
df929f
Requires:       eclipse-rcp
e9ea39
e9ea39
%description
e9ea39
The goal of XBean project is to create a plugin based server
e9ea39
analogous to Eclipse being a plugin based IDE. XBean will be able to
e9ea39
discover, download and install server plugins from an Internet based
e9ea39
repository. In addition, we include support for multiple IoC systems,
e9ea39
support for running with no IoC system, JMX without JMX code,
e9ea39
lifecycle and class loader management, and a rock solid Spring
e9ea39
integration.
e9ea39
c6daae
%if !0%{?rhel:1}
c6daae
%package        spring
c6daae
Summary:        Schema-driven namespace handler for spring contexts
c6daae
Requires:       %{name} = %{version}-%{release}
c6daae
Requires:       springframework-beans
c6daae
Requires:       springframework-context
c6daae
Requires:       springframework-web
c6daae
c6daae
%description    spring
c6daae
This package provides %{summary}.
c6daae
c6daae
%package        -n maven-%{name}-plugin
c6daae
Summary:        XBean plugin for Apache Maven
c6daae
Requires:       %{name}-spring = %{version}-%{release}
c6daae
Requires:       maven
c6daae
Requires:       maven-archiver
c6daae
Requires:       maven-project
c6daae
Requires:       plexus-archiver
c6daae
Requires:       plexus-utils
c6daae
Requires:       qdox
c6daae
Requires:       springframework
c6daae
Requires:       springframework-beans
c6daae
Requires:       springframework-context
c6daae
Requires:       springframework-web
c6daae
c6daae
%description    -n maven-%{name}-plugin
c6daae
This package provides %{summary}.
c6daae
%endif
c6daae
e9ea39
%package        javadoc
e9ea39
Summary:        API documentation for %{name}
e9ea39
Group:          Documentation
e9ea39
Requires:       jpackage-utils
e9ea39
e9ea39
%description    javadoc
c6daae
This package provides %{summary}.
e9ea39
e9ea39
%prep
e9ea39
%setup -q
e9ea39
# build failing on this due to doxia-sitetools problems
e9ea39
rm src/site/site.xml
e9ea39
c6daae
%pom_remove_parent
6b2614
%pom_remove_dep mx4j:mx4j
6b2614
%pom_remove_dep :xbean-asm-shaded xbean-reflect
6b2614
c6daae
# These aren't needed for now
6b2614
%pom_disable_module xbean-asm-shaded
6b2614
%pom_disable_module xbean-blueprint
6b2614
%pom_disable_module xbean-classloader
6b2614
%pom_disable_module xbean-finder-shaded
6b2614
%pom_disable_module xbean-telnet
e9ea39
c6daae
# Prevent modules depending on springframework from building.
c6daae
if [ %{?rhel} ]; then
c6daae
   %pom_remove_dep org.springframework:
c6daae
   %pom_disable_module xbean-spring
c6daae
   %pom_disable_module maven-xbean-plugin
c6daae
fi
c6daae
c6daae
%pom_add_plugin :maven-compiler-plugin . "
c6daae
    <configuration>
c6daae
      <source>1.5</source>
c6daae
      <target>1.5</target>
c6daae
    </configuration>"
46f8c2
df929f
# Force use of Equinox
df929f
%pom_remove_dep :org.osgi.core xbean-bundleutils
df929f
%pom_remove_dep org.eclipse:osgi xbean-bundleutils
df929f
%pom_xpath_inject "pom:project/pom:dependencies" "
df929f
    <dependency>
df929f
      <groupid>org.eclipse.osgi</groupid>
df929f
      <artifactid>org.eclipse.osgi</artifactid>
df929f
      <version>any</version>
df929f
    </dependency>" xbean-bundleutils
df929f
df929f
e9ea39
# Fix dependency on xbean-asm-shaded to original objectweb-asm
e9ea39
sed -i 's/org.apache.xbean.asm/org.objectweb.asm/' \
e9ea39
    xbean-reflect/src/main/java/org/apache/xbean/recipe/XbeanAsmParameterNameLoader.java
e9ea39
c6daae
# Fix ant groupId
c6daae
find -name pom.xml -exec sed -i "s|<groupid>ant</groupid>|<groupid>org.apache.ant</groupid>|" {} \;
c6daae
46f8c2
# Do not build equinox specific part for rhel.
c6daae
if [ %{?rhel} ]; then
c6daae
   rm -rf xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/equinox/
c6daae
   sed -i "s|<groupid>org.eclipse|<groupid>org.apache.felix|g" xbean-bundleutils/pom.xml
c6daae
   sed -i "s|<artifactid>osgi|<artifactid>org.apache.felix.framework|g" xbean-bundleutils/pom.xml
c6daae
fi
46f8c2
46f8c2
e9ea39
%build
Stanislav Ochotnicky abc71d
mvn-rpmbuild -e \
Stanislav Ochotnicky abc71d
        -Dmaven.local.depmap.file="%{SOURCE1}" \
Stanislav Ochotnicky abc71d
        -Dmaven.test.skip=true \
Stanislav Ochotnicky a12bb0
        install javadoc:aggregate
e9ea39
e9ea39
e9ea39
%install
c6daae
install -dm 755 $RPM_BUILD_ROOT/%{_javadir}/%{name}
c6daae
install -dm 755 $RPM_BUILD_ROOT/%{_mavenpomdir}
c6daae
install -dm 755 $RPM_BUILD_ROOT/%{_mavendepmapfragdir}
c6daae
install -dm 755 $RPM_BUILD_ROOT/%{_javadocdir}/%{name}
e9ea39
c6daae
# parent pom
c6daae
install -pm 644 pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-main.pom
c6daae
%add_maven_depmap JPP.%{name}-main.pom
e9ea39
c6daae
for sub in bundleutils classpath finder naming reflect; do
c6daae
    install -m 644 %{name}-${sub}/target/%{name}-${sub}-%{version}.jar $RPM_BUILD_ROOT/%{_javadir}/%{name}/%{name}-${sub}.jar
c6daae
    install -pm 644 %{name}-${sub}/pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-%{name}-${sub}.pom
Stanislav Ochotnicky abc71d
    %add_maven_depmap JPP.%{name}-%{name}-${sub}.pom %{name}/%{name}-${sub}.jar
e9ea39
done
Stanislav Ochotnicky a12bb0
c6daae
if [ %{?fedora} ]; then
c6daae
   # xbean-spring
c6daae
   install -m 644 %{name}-spring/target/%{name}-spring-%{version}.jar $RPM_BUILD_ROOT/%{_javadir}/%{name}/%{name}-spring.jar
c6daae
   install -pm 644 %{name}-spring/pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-%{name}-spring.pom
c6daae
   %add_maven_depmap JPP.%{name}-%{name}-spring.pom %{name}/%{name}-spring.jar -f spring
c6daae
   # maven-xbean-plugin
c6daae
   install -m 644 maven-%{name}-plugin/target/maven-%{name}-plugin-%{version}.jar $RPM_BUILD_ROOT/%{_javadir}/%{name}/maven-%{name}-plugin.jar
c6daae
   install -pm 644 maven-%{name}-plugin/pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-maven-%{name}-plugin.pom
c6daae
   %add_maven_depmap JPP.%{name}-maven-%{name}-plugin.pom %{name}/maven-%{name}-plugin.jar -f maven-plugin
c6daae
fi
c6daae
c6daae
# javadocs
Stanislav Ochotnicky bfa0c2
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
e9ea39
e9ea39
e9ea39
%files
e9ea39
%doc LICENSE NOTICE
c6daae
%dir %{_javadir}/%{name}
c6daae
%{_javadir}/%{name}/%{name}-bundleutils.jar
c6daae
%{_javadir}/%{name}/%{name}-classpath.jar
c6daae
%{_javadir}/%{name}/%{name}-finder.jar
c6daae
%{_javadir}/%{name}/%{name}-naming.jar
c6daae
%{_javadir}/%{name}/%{name}-reflect.jar
c6daae
%{_mavenpomdir}/JPP.%{name}-main.pom
c6daae
%{_mavenpomdir}/JPP.%{name}-%{name}-bundleutils.pom
c6daae
%{_mavenpomdir}/JPP.%{name}-%{name}-classpath.pom
c6daae
%{_mavenpomdir}/JPP.%{name}-%{name}-finder.pom
c6daae
%{_mavenpomdir}/JPP.%{name}-%{name}-naming.pom
c6daae
%{_mavenpomdir}/JPP.%{name}-%{name}-reflect.pom
e9ea39
%{_mavendepmapfragdir}/%{name}
c6daae
c6daae
%if !0%{?rhel:1}
c6daae
%files spring
c6daae
%doc LICENSE NOTICE
c6daae
%{_javadir}/%{name}/%{name}-spring.jar
c6daae
%{_mavenpomdir}/JPP.%{name}-%{name}-spring.pom
c6daae
%{_mavendepmapfragdir}/%{name}-spring
c6daae
c6daae
%files -n maven-%{name}-plugin
c6daae
%doc LICENSE NOTICE
c6daae
%{_javadir}/%{name}/maven-%{name}-plugin.jar
c6daae
%{_mavenpomdir}/JPP.%{name}-maven-%{name}-plugin.pom
c6daae
%{_mavendepmapfragdir}/%{name}-maven-plugin
c6daae
%endif
e9ea39
e9ea39
%files javadoc
c6daae
%doc LICENSE NOTICE
e9ea39
%{_javadocdir}/%{name}
e9ea39
e9ea39
%changelog
c6daae
* Mon Aug  6 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.11.1-3
c6daae
- Enable xbean-spring
c6daae
- Enable maven-xbean-plugin
c6daae
- Remove RPM bug workaround
c6daae
1faa51
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.11.1-2
1faa51
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
1faa51
df929f
* Fri Jul 13 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.11.1-1
df929f
- Update to the upstream version 3.11.1
df929f
- Force use of Equinox instead of Felix
df929f
- Convert patch to POM macros
df929f
Stanislav Ochotnicky 351792
* Thu May  3 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.8-5
Stanislav Ochotnicky 351792
- Remove mx4j from deps (javax.management provided by JDK 1.5+)
Stanislav Ochotnicky 351792
ccd6fe
* Tue Apr 24 2012 Alexander Kurtakov <akurtako@redhat.com> 3.8-4
ccd6fe
- BR felix-framework instead of felix-osgi-core.
ccd6fe
46f8c2
* Tue Apr 24 2012 Alexander Kurtakov <akurtako@redhat.com> 3.8-3
46f8c2
- Do not build equinox specific parts for RHEL.
46f8c2
887926
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.8-2
887926
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
887926
Stanislav Ochotnicky abc71d
* Tue Dec  6 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.8-1
Stanislav Ochotnicky abc71d
- Update to latest upstream version
Stanislav Ochotnicky abc71d
- Build with maven 3
Stanislav Ochotnicky abc71d
- Packaging & guidelines fixes
Stanislav Ochotnicky abc71d
Stanislav Ochotnicky 566be5
* Sat May 28 2011 Marek Goldmann <mgoldman@redhat.com> - 3.7-7
Stanislav Ochotnicky 566be5
- Added xbean-finder and xbean-bundleutils submodules
Stanislav Ochotnicky 566be5
Stanislav Ochotnicky 8c7505
* Fri Mar  4 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.7-6
Stanislav Ochotnicky 8c7505
- Add comment for removing javadoc
Stanislav Ochotnicky 8c7505
- Fix maven 3 build
Stanislav Ochotnicky 8c7505
0d21c6
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.7-5
0d21c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
0d21c6
Stanislav Ochotnicky bfa0c2
* Mon Dec  6 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.7-4
Stanislav Ochotnicky bfa0c2
- Fix pom filename (Resolves rhbz#655827)
Stanislav Ochotnicky bfa0c2
- Add depmap for main pom file
Stanislav Ochotnicky bfa0c2
- Fixes according to new guidelines (versionless jars, javadocs)
Stanislav Ochotnicky bfa0c2
Stanislav Ochotnicky a12bb0
* Fri Jul 30 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.7-3
Stanislav Ochotnicky a12bb0
- Use javadoc:aggregate to generate javadocs
Stanislav Ochotnicky a12bb0
e9ea39
* Fri Jul  9 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.7-2
e9ea39
- Add license to javadoc subpackage
e9ea39
e9ea39
* Mon Jun 21 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.7-1
e9ea39
- First release