[plexus-appserver] Add depmap for old plexus-container to fix build errors
Stanislav Ochotnicky
sochotni at fedoraproject.org
Wed Sep 8 11:52:01 UTC 2010
commit ce1cc3b2f9de6adf5b81ebca89815ff8f12a575d
Author: Stanislav Ochotnicky <sochotnicky at redhat.com>
Date: Wed Sep 8 13:50:53 2010 +0200
Add depmap for old plexus-container to fix build errors
- Remove ant build possibility
- Follow packaging guidelines
plexus-appserver-depmap.xml | 16 ++++++++++
plexus-appserver.spec | 66 +++++++++++++++---------------------------
2 files changed, 40 insertions(+), 42 deletions(-)
---
diff --git a/plexus-appserver-depmap.xml b/plexus-appserver-depmap.xml
new file mode 100644
index 0000000..f98460d
--- /dev/null
+++ b/plexus-appserver-depmap.xml
@@ -0,0 +1,16 @@
+<dependencies>
+ <dependency>
+ <maven>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ <version>1.0-alpha-30</version>
+ </maven>
+ <jpp>
+ <groupId>JPP/plexus</groupId>
+ <artifactId>container-default</artifactId>
+ <version>1.0-alpha-34</version>
+ </jpp>
+ </dependency>
+
+</dependencies>
+
diff --git a/plexus-appserver.spec b/plexus-appserver.spec
index 713c761..f0ac82f 100644
--- a/plexus-appserver.spec
+++ b/plexus-appserver.spec
@@ -28,17 +28,12 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
-# If you don't want to build with maven, and use straight ant instead,
-# give rpmbuild option '--without maven'
-%define with_maven %{!?_without_maven:1}%{?_without_maven:0}
-%define without_maven %{?_without_maven:1}%{!?_without_maven:0}
-
-%define parent plexus
-%define subname appserver
+%global parent plexus
+%global subname appserver
Name: plexus-appserver
Version: 1.0
-Release: 0.4.a5.2.11%{?dist}
+Release: 0.5.a5%{?dist}
Epoch: 0
Summary: Plexus Application Server
License: ASL 2.0 and MIT
@@ -48,6 +43,7 @@ Source0: plexus-appserver-1.0-alpha-5-src.tar.gz
# svn export svn://svn.plexus.codehaus.org/plexus/tags/plexus-appserver-1.0-alpha-5/
# tar czf plexus-appserver-1.0-alpha-5.tar.gz plexus-appserver-1.0-alpha-5/
Source1: plexus-appserver-1.0-build.xml
+Source2: %{name}-depmap.xml
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -55,20 +51,17 @@ BuildArch: noarch
BuildRequires: jpackage-utils >= 0:1.7.2
BuildRequires: ant >= 0:1.6
-%if %{with_maven}
-BuildRequires: maven2 >= 2.0.4
-BuildRequires: maven2 >= 2.0.4
-BuildRequires: maven2-plugin-compiler
-BuildRequires: maven2-plugin-install
-BuildRequires: maven2-plugin-jar
-BuildRequires: maven2-plugin-javadoc
-BuildRequires: maven2-plugin-resources
-BuildRequires: maven2-plugin-surefire
+BuildRequires: maven2
+BuildRequires: maven-compiler-plugin
+BuildRequires: maven-install-plugin
+BuildRequires: maven-jar-plugin
+BuildRequires: maven-javadoc-plugin
+BuildRequires: maven-resources-plugin
+BuildRequires: maven-surefire-plugin
BuildRequires: tomcat5
BuildRequires: tomcat5-servlet-2.4-api
BuildRequires: maven-doxia
BuildRequires: maven-doxia-sitetools
-%endif
BuildRequires: ant-nodeps
BuildRequires: classworlds >= 0:1.1
BuildRequires: plexus-container-default
@@ -108,24 +101,10 @@ cp %{SOURCE1} build.xml
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
mkdir -p $MAVEN_REPO_LOCAL
-%if %{with_maven}
- mvn-jpp \
- -e \
- -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
+mvn-jpp -e \
+ -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
+ -Dmaven2.jpp.depmap.file=%{SOURCE2} \
install javadoc:javadoc
-%else
-
-mkdir -p target/lib
-build-jar-repository -s -p target/lib \
-classworlds \
-plexus/container-default \
-plexus/utils \
-plexus/xmlrpc \
-xmlrpc \
-
-ant jar javadoc
-
-%endif
%install
rm -rf $RPM_BUILD_ROOT
@@ -138,8 +117,8 @@ install -pm 644 target/%{name}-%{version}-alpha-5.jar \
do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
#poms
-install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
-install -pm 644 pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.plexus-appserver.pom
+install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
+install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.plexus-appserver.pom
# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
@@ -158,14 +137,19 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%{_javadir}/*
-%{_datadir}/maven2
-%{_mavendepmapfragdir}
+%{_mavenpomdir}/*
+%{_mavendepmapfragdir}/*
%files javadoc
%defattr(-,root,root,-)
%doc %{_javadocdir}/*
%changelog
+* Wed Sep 8 2010 Stanislav Ochotnicky <sochotnicky at redhat.com> - 0:1.0-0.5.a5
+- Add depmap for old plexus-container to fix build errors
+- Remove ant build possibility
+- Follow packaging guidelines
+
* Fri Feb 12 2010 Alexander Kurtakov <akurtako at redhat.com> 0:1.0-0.4.a5.2.11
- BR maven-doxia[-sitetools].
@@ -199,7 +183,7 @@ rm -rf $RPM_BUILD_ROOT
* Thu Feb 28 2008 Deepak Bhole <dbhole at redhat.com> 1.0-0.2.a5.2jpp.4
- Rebuild
-* Fri Sep 21 2007 Deepak Bhole <dbhole at redhat.com> 0:1.0-0.1.a5.3jpp.3
+* Fri Sep 21 2007 Deepak Bhole <dbhole at redhat.com> 0:1.0-0.1.a5.3jpp.3
- ExcludeArch ppc64
* Tue Mar 20 2007 Deepak Bhole <dbhole at redhat.com> 0:1.0-0.1.a5.3jpp.2
@@ -224,5 +208,3 @@ rm -rf $RPM_BUILD_ROOT
* Mon Nov 07 2005 Ralph Apel <r.apel at r-apel.de> - 0:1.0-0.a5.1jpp
- First JPackage build
-
-%changelog
More information about the scm-commits
mailing list