diff --git a/bcel-5.2.pom b/bcel-5.2.pom
index 02a5b6e..a106230 100644
--- a/bcel-5.2.pom
+++ b/bcel-5.2.pom
@@ -4,8 +4,10 @@
bcel
5.2
+
regexp
regexp
1.4
+
diff --git a/bcel.spec b/bcel.spec
index 87a1885..391f0ab 100644
--- a/bcel.spec
+++ b/bcel.spec
@@ -28,18 +28,9 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
-#Fedora currently does not support maven
-%global _without_maven 1
-
-# If you don't want to build with maven, and use straight ant instead,
-# give rpmbuild option '--without maven'
-
-%global with_maven %{!?_without_maven:1}%{?_without_maven:0}
-%global without_maven %{?_without_maven:1}%{!?_without_maven:0}
-
Name: bcel
Version: 5.2
-Release: 12%{?dist}
+Release: 13%{?dist}
Epoch: 0
Summary: Byte Code Engineering Library
License: ASL 2.0
@@ -62,36 +53,15 @@ Group: Development/Libraries
Requires: regexp
BuildRequires: zip
BuildRequires: ant
-%if %{with_maven}
-BuildRequires: maven >= 0:1.1
-BuildRequires: saxon
-BuildRequires: saxon-scripts
-BuildRequires: maven-plugins-base
-BuildRequires: maven-plugin-changelog
-BuildRequires: maven-plugin-changes
-BuildRequires: maven-plugin-developer-activity
-BuildRequires: maven-plugin-jxr
-BuildRequires: maven-plugin-license
-BuildRequires: maven-plugin-pmd
-BuildRequires: maven-plugin-test
-BuildRequires: maven-plugin-xdoc
-Requires(post): jpackage-utils >= 0:1.7.2
-Requires(postun): jpackage-utils >= 0:1.7.2
-%else
BuildRequires: jdom
BuildRequires: velocity
BuildRequires: jakarta-commons-collections
BuildRequires: apache-commons-lang
-#excalibur-avalong-logkit should be used once Maven is supported in Fedora
-BuildRequires: avalon-logkit
-#BuildRequires: excalibur-avalon-logkit
+BuildRequires: avalon-logkit
BuildRequires: werken-xpath
-#BuildRequires: ant-apache-regexp
-%endif
BuildRequires: regexp
BuildRequires: jpackage-utils >= 0:1.7.2
BuildArch: noarch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description
The Byte Code Engineering Library (formerly known as JavaClass) is
@@ -112,8 +82,7 @@ being the Xalan XSLT processor at Apache.
%package javadoc
Summary: Javadoc for %{name}
Group: Documentation
-BuildRequires: java-javadoc
-Requires: java-javadoc
+Requires: jpackage-utils
%description javadoc
%{summary}.
@@ -126,21 +95,10 @@ Group: Documentation
%{summary}.
%prep
-#cat <' > $DEPCAT
-echo '' >> $DEPCAT
-for p in $(find . -name project.xml); do
- pushd $(dirname $p)
- /usr/bin/saxon project.xml %{SOURCE1} >> $DEPCAT
- popd
-done
-echo >> $DEPCAT
-echo '' >> $DEPCAT
-/usr/bin/saxon $DEPCAT %{SOURCE2} > %{name}-%{version}-depmap.new.xml
-
-for p in $(find . -name project.xml); do
- pushd $(dirname $p)
- %{__cp} -pr project.xml project.xml.orig
- /usr/bin/saxon -o project.xml project.xml.orig %{SOURCE3} \
- map="%{SOURCE4}"
- popd
-done
-
-export MAVEN_HOME_LOCAL="$(pwd)/.maven"
-
-maven -e \
- -Dmaven.repo.remote=file:/usr/share/maven/repository \
- -Dmaven.home.local=${MAVEN_HOME_LOCAL} \
- jar:jar javadoc:generate xdoc:transform
-%else
#ant -Dregexp.jar="file://$(build-classpath regexp)" jar javadoc
ant -Dbuild.dest=build/classes -Dbuild.dir=build -Ddocs.dest=docs \
-Ddocs.src=xdocs -Djakarta.site2=jakarta-site2 -Djdom.jar=jdom.jar \
-Dregexp.jar="file://$(build-classpath regexp)" \
jar javadoc xdocs
-%endif
%install
# inject OSGi manifests
@@ -204,64 +132,43 @@ zip -u target/%{name}-%{version}.jar META-INF/MANIFEST.MF
%{__mkdir_p} %{buildroot}%{_javadir}
%{__install} -m 0644 target/%{name}-%{version}.jar \
%{buildroot}%{_javadir}/%{name}.jar
-# depmap frags
-%add_to_maven_depmap %{name} %{name} %{version} JPP %{name}
-%add_to_maven_depmap org.apache.bcel %{name} %{version} JPP %{name}
+
# pom
-%{__mkdir_p} %{buildroot}%{_datadir}/maven2/poms
+%{__mkdir_p} %{buildroot}%{_mavenpomdir}
%{__install} -m 0644 %{SOURCE7} \
- %{buildroot}%{_datadir}/maven2/poms/JPP-%{name}.pom
+ %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
+
+# depmap frags
+%add_maven_depmap JPP-%{name}.pom %{name}.jar -a org.apache.bcel:%{name}
# javadoc
%{__mkdir_p} %{buildroot}%{_javadocdir}/%{name}
-%if %{with_maven}
-%{__cp} -pr target/docs/apidocs/* %{buildroot}%{_javadocdir}/%{name}
-%{__rm} -rf target/docs/apidocs
-%else
%{__cp} -pr dist/docs/api/* %{buildroot}%{_javadocdir}/%{name}
%{__rm} -rf dist/docs/api
-%endif
# manual
%{__mkdir_p} %{buildroot}%{_docdir}/%{name}-%{version}
-%if %{with_maven}
-%{__cp} -pr target/docs/* %{buildroot}%{_docdir}/%{name}-%{version}
-%else
%{__cp} -pr docs/* %{buildroot}%{_docdir}/%{name}-%{version}
-%endif
%{__cp} LICENSE.txt %{buildroot}%{_docdir}/%{name}-%{version}
-%clean
-%{__rm} -rf %{buildroot}
-
-%post
-%update_maven_depmap
-
-%postun
-%update_maven_depmap
-
-%pre javadoc
-# workaround for rpm bug, can be removed in F-18
-[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \
-%{__rm} -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
-
%files
-%defattr(0644,root,root,0755)
%doc %{_docdir}/%{name}-%{version}
-%doc %{_docdir}/%{name}-%{version}/LICENSE.txt
%{_javadir}/%{name}.jar
-%{_datadir}/maven2/poms/*
-%{_mavendepmapfragdir}
+%{_mavenpomdir}/*
+%{_mavendepmapfragdir}/*
%files javadoc
-%defattr(0644,root,root,0755)
%doc %{_javadocdir}/%{name}
%files manual
-%defattr(0644,root,root,0755)
%doc %{_docdir}/%{name}-%{version}
%changelog
+* Tue Aug 21 2012 Andy Grimm - 0:5.2-13
+- This package should not own _mavendepmapfragdir (RHBZ#850005)
+- Build with maven, and clean up deprecated spec constructs
+- Fix pom file (See http://jira.codehaus.org/browse/MEV-592)
+
* Wed Jul 18 2012 Fedora Release Engineering - 0:5.2-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild