Implement equinox and spring conditionals
This commit is contained in:
parent
1d6ef55f18
commit
1f03e8b29f
63
xbean.spec
63
xbean.spec
@ -1,8 +1,15 @@
|
|||||||
|
# Conditionals to help breaking eclipse <-> xbean dependency cycle
|
||||||
|
# when bootstrapping for new architectures
|
||||||
|
%if 0%{?fedora}
|
||||||
|
#%%bcond_without equinox
|
||||||
|
#%%bcond_without spring
|
||||||
|
%endif
|
||||||
|
|
||||||
Name: xbean
|
Name: xbean
|
||||||
Version: 3.11.1
|
Version: 3.11.1
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
Release: 5%{?dist}
|
Release: 6%{?dist}
|
||||||
Summary: Java plugin based web server
|
Summary: Java plugin based web server
|
||||||
|
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
@ -35,8 +42,12 @@ BuildRequires: maven-resources-plugin
|
|||||||
BuildRequires: maven-surefire-plugin
|
BuildRequires: maven-surefire-plugin
|
||||||
BuildRequires: maven-site-plugin
|
BuildRequires: maven-site-plugin
|
||||||
BuildRequires: maven-shade-plugin
|
BuildRequires: maven-shade-plugin
|
||||||
%if !0%{?rhel:1}
|
%if %{with equinox}
|
||||||
BuildRequires: eclipse-rcp
|
BuildRequires: eclipse-rcp
|
||||||
|
%else
|
||||||
|
BuildRequires: felix-framework
|
||||||
|
%endif
|
||||||
|
%if %{with spring}
|
||||||
BuildRequires: maven-archiver
|
BuildRequires: maven-archiver
|
||||||
BuildRequires: maven-plugin-plugin
|
BuildRequires: maven-plugin-plugin
|
||||||
BuildRequires: maven-project
|
BuildRequires: maven-project
|
||||||
@ -46,8 +57,6 @@ BuildRequires: springframework
|
|||||||
BuildRequires: springframework-beans
|
BuildRequires: springframework-beans
|
||||||
BuildRequires: springframework-context
|
BuildRequires: springframework-context
|
||||||
BuildRequires: springframework-web
|
BuildRequires: springframework-web
|
||||||
%else
|
|
||||||
BuildRequires: felix-framework
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Requires: java
|
Requires: java
|
||||||
@ -55,7 +64,7 @@ Requires: jpackage-utils
|
|||||||
Requires: apache-commons-logging
|
Requires: apache-commons-logging
|
||||||
Requires: objectweb-asm
|
Requires: objectweb-asm
|
||||||
Requires: slf4j
|
Requires: slf4j
|
||||||
%if !0%{?rhel:1}
|
%if %{with equinox}
|
||||||
Requires: eclipse-rcp
|
Requires: eclipse-rcp
|
||||||
%else
|
%else
|
||||||
Requires: felix-framework
|
Requires: felix-framework
|
||||||
@ -70,7 +79,7 @@ support for running with no IoC system, JMX without JMX code,
|
|||||||
lifecycle and class loader management, and a rock solid Spring
|
lifecycle and class loader management, and a rock solid Spring
|
||||||
integration.
|
integration.
|
||||||
|
|
||||||
%if !0%{?rhel:1}
|
%if %{with spring}
|
||||||
%package spring
|
%package spring
|
||||||
Summary: Schema-driven namespace handler for spring contexts
|
Summary: Schema-driven namespace handler for spring contexts
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
@ -124,27 +133,21 @@ rm src/site/site.xml
|
|||||||
%pom_disable_module xbean-telnet
|
%pom_disable_module xbean-telnet
|
||||||
|
|
||||||
# Prevent modules depending on springframework from building.
|
# Prevent modules depending on springframework from building.
|
||||||
if [ %{?rhel} ]; then
|
%if %{without spring}
|
||||||
%pom_remove_dep org.springframework:
|
%pom_remove_dep org.springframework:
|
||||||
%pom_disable_module xbean-spring
|
%pom_disable_module xbean-spring
|
||||||
%pom_disable_module maven-xbean-plugin
|
%pom_disable_module maven-xbean-plugin
|
||||||
fi
|
%endif
|
||||||
|
|
||||||
%pom_add_plugin :maven-compiler-plugin . "
|
# Replace generic OSGi dependencies with either Equinox or Felix
|
||||||
<configuration>
|
|
||||||
<source>1.5</source>
|
|
||||||
<target>1.5</target>
|
|
||||||
</configuration>"
|
|
||||||
|
|
||||||
# Force use of Equinox
|
|
||||||
%pom_remove_dep :org.osgi.core xbean-bundleutils
|
%pom_remove_dep :org.osgi.core xbean-bundleutils
|
||||||
%pom_remove_dep org.eclipse:osgi xbean-bundleutils
|
%pom_remove_dep org.eclipse:osgi xbean-bundleutils
|
||||||
%pom_xpath_inject "pom:project/pom:dependencies" "
|
%if %{with equinox}
|
||||||
<dependency>
|
%pom_add_dep org.eclipse.osgi:org.eclipse.osgi xbean-bundleutils
|
||||||
<groupId>org.eclipse.osgi</groupId>
|
%else
|
||||||
<artifactId>org.eclipse.osgi</artifactId>
|
rm -rf xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/equinox/
|
||||||
<version>any</version>
|
%pom_add_dep org.apache.felix:org.apache.felix.framework xbean-bundleutils
|
||||||
</dependency>" xbean-bundleutils
|
%endif
|
||||||
|
|
||||||
|
|
||||||
# Fix dependency on xbean-asm-shaded to original objectweb-asm
|
# Fix dependency on xbean-asm-shaded to original objectweb-asm
|
||||||
@ -154,16 +157,11 @@ sed -i 's/org.apache.xbean.asm/org.objectweb.asm/' \
|
|||||||
# Fix ant groupId
|
# Fix ant groupId
|
||||||
find -name pom.xml -exec sed -i "s|<groupId>ant</groupId>|<groupId>org.apache.ant</groupId>|" {} \;
|
find -name pom.xml -exec sed -i "s|<groupId>ant</groupId>|<groupId>org.apache.ant</groupId>|" {} \;
|
||||||
|
|
||||||
# Do not build equinox specific part for rhel.
|
|
||||||
if [ %{?rhel} ]; then
|
|
||||||
rm -rf xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/equinox/
|
|
||||||
sed -i "s|<groupId>org.eclipse.osgi|<groupId>org.apache.felix|g" xbean-bundleutils/pom.xml
|
|
||||||
sed -i "s|<artifactId>org.eclipse.osgi|<artifactId>org.apache.felix.framework|g" xbean-bundleutils/pom.xml
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
mvn-rpmbuild -e \
|
mvn-rpmbuild -e \
|
||||||
|
-Dmaven.compiler.source=1.5 \
|
||||||
|
-Dmaven.compiler.target=1.5 \
|
||||||
-Dmaven.local.depmap.file="%{SOURCE1}" \
|
-Dmaven.local.depmap.file="%{SOURCE1}" \
|
||||||
-Dmaven.test.skip=true \
|
-Dmaven.test.skip=true \
|
||||||
install javadoc:aggregate
|
install javadoc:aggregate
|
||||||
@ -185,7 +183,7 @@ for sub in bundleutils classpath finder naming reflect; do
|
|||||||
%add_maven_depmap JPP.%{name}-%{name}-${sub}.pom %{name}/%{name}-${sub}.jar
|
%add_maven_depmap JPP.%{name}-%{name}-${sub}.pom %{name}/%{name}-${sub}.jar
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ %{?fedora} ]; then
|
%if %{with spring}
|
||||||
# xbean-spring
|
# xbean-spring
|
||||||
install -m 644 %{name}-spring/target/%{name}-spring-%{version}.jar $RPM_BUILD_ROOT/%{_javadir}/%{name}/%{name}-spring.jar
|
install -m 644 %{name}-spring/target/%{name}-spring-%{version}.jar $RPM_BUILD_ROOT/%{_javadir}/%{name}/%{name}-spring.jar
|
||||||
install -pm 644 %{name}-spring/pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-%{name}-spring.pom
|
install -pm 644 %{name}-spring/pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-%{name}-spring.pom
|
||||||
@ -194,7 +192,7 @@ if [ %{?fedora} ]; then
|
|||||||
install -m 644 maven-%{name}-plugin/target/maven-%{name}-plugin-%{version}.jar $RPM_BUILD_ROOT/%{_javadir}/%{name}/maven-%{name}-plugin.jar
|
install -m 644 maven-%{name}-plugin/target/maven-%{name}-plugin-%{version}.jar $RPM_BUILD_ROOT/%{_javadir}/%{name}/maven-%{name}-plugin.jar
|
||||||
install -pm 644 maven-%{name}-plugin/pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-maven-%{name}-plugin.pom
|
install -pm 644 maven-%{name}-plugin/pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-maven-%{name}-plugin.pom
|
||||||
%add_maven_depmap JPP.%{name}-maven-%{name}-plugin.pom %{name}/maven-%{name}-plugin.jar -f maven-plugin
|
%add_maven_depmap JPP.%{name}-maven-%{name}-plugin.pom %{name}/maven-%{name}-plugin.jar -f maven-plugin
|
||||||
fi
|
%endif
|
||||||
|
|
||||||
# javadocs
|
# javadocs
|
||||||
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
||||||
@ -216,7 +214,7 @@ cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
|||||||
%{_mavenpomdir}/JPP.%{name}-%{name}-reflect.pom
|
%{_mavenpomdir}/JPP.%{name}-%{name}-reflect.pom
|
||||||
%{_mavendepmapfragdir}/%{name}
|
%{_mavendepmapfragdir}/%{name}
|
||||||
|
|
||||||
%if !0%{?rhel:1}
|
%if %{with spring}
|
||||||
%files spring
|
%files spring
|
||||||
%doc LICENSE NOTICE
|
%doc LICENSE NOTICE
|
||||||
%{_javadir}/%{name}/%{name}-spring.jar
|
%{_javadir}/%{name}/%{name}-spring.jar
|
||||||
@ -235,6 +233,9 @@ cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
|||||||
%{_javadocdir}/%{name}
|
%{_javadocdir}/%{name}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Oct 10 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.11.1-6
|
||||||
|
- Implement equinox and spring conditionals
|
||||||
|
|
||||||
* Mon Sep 3 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.11.1-5
|
* Mon Sep 3 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.11.1-5
|
||||||
- Fix eclipse requires
|
- Fix eclipse requires
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user