diff --git a/msv-build_xmls.patch b/msv-build_xmls.patch
deleted file mode 100644
index a247b0b..0000000
--- a/msv-build_xmls.patch
+++ /dev/null
@@ -1,179 +0,0 @@
---- ./xsdlib/build.xml.sav 2005-07-22 19:19:12.000000000 -0400
-+++ ./xsdlib/build.xml 2007-02-15 09:58:46.000000000 -0500
-@@ -51,21 +51,19 @@
-
--
--
--
--
-+
-+
-+
-+
-+
-+
-
-
-
-@@ -160,15 +158,16 @@
- sourcepath="dist/src"
- destdir="dist/javadoc"
- windowtitle="Sun XML Datatypes Library"
-+ classpath="${xerces.jar}:${relaxngDatatype.jar}:${junit.jar}:${jdom.jar}:${isorelax.jar}:${xalan.jar}"
- public="yes"
- author="yes"
- >
--
--
--
-+
-+
-+
-+
-+
-+
-
-
-
---- ./generator/build.xml.sav 2003-07-18 18:09:42.000000000 -0400
-+++ ./generator/build.xml 2007-02-15 09:59:06.000000000 -0500
-@@ -142,12 +142,18 @@
- public="yes"
- author="yes"
- >
--
--
--
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-
-
-
---- ./msv/build.xml.sav 2005-07-22 19:19:11.000000000 -0400
-+++ ./msv/build.xml 2007-02-15 09:59:45.000000000 -0500
-@@ -73,19 +73,17 @@
- sourcepath="./src"
- classpath="${java.class.path}"
- destdir="javadoc"
-- windowtitle="Internal Use Only --- Sun Multi Schema XML Validator"
-+ windowtitle="Sun Multi Schema XML Validator"
- public="yes"
- author="yes"
- overview="src/com/sun/msv/overview.html"
- >
--
--
--
--
-+
-+
-+
-+
-+
-+
-
-
-
-@@ -207,6 +205,7 @@
- >
-
-
-+
-
-
-
-@@ -215,14 +214,13 @@
- if you have encountered error around here,
- please remove all offline="true" and packagelistLoc="...".
- -->
--
--
--
--
-+
-+
-+
-+
-+
-+
-+
-
-
-
---- ./relames/build.xml.sav 2005-07-22 19:19:11.000000000 -0400
-+++ ./relames/build.xml 2007-02-15 09:59:59.000000000 -0500
-@@ -75,14 +75,34 @@
-
-
-
-+ manifest="dist/src/META-INF/MANIFEST.MF">
-
-
-
-
-
-
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-
-
-
diff --git a/msv-link-local-javadoc.patch b/msv-link-local-javadoc.patch
new file mode 100644
index 0000000..2f896cb
--- /dev/null
+++ b/msv-link-local-javadoc.patch
@@ -0,0 +1,14 @@
+--- pom.xml.orig2 2010-09-19 17:34:07.530248002 +0100
++++ pom.xml 2010-09-19 17:41:12.377247570 +0100
+@@ -139,6 +139,11 @@
+ MSV
+ 1.5
+ UTF-8
++
++ /usr/share/javadoc/java/
++ /usr/share/javadoc/isorelax/
++ /usr/share/javadoc/relaxngDatatype/
++
+
+
+
diff --git a/msv.spec b/msv.spec
index 03248d6..bc29645 100644
--- a/msv.spec
+++ b/msv.spec
@@ -1,7 +1,7 @@
Name: msv
Epoch: 1
Version: 2009.1
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Multi-Schema Validator
Group: Development/Libraries
License: BSD
@@ -19,6 +19,9 @@ Patch0: %{name}-disable-maven-wagon-svn.patch
# (We're using xerces-j2 instead)
Patch1: %{name}-disable-crimson.patch
+# Link to locally installed javadocs
+Patch2: %{name}-link-local-javadoc.patch
+
BuildRequires: java-devel
BuildRequires: java-javadoc
BuildRequires: jpackage-utils
@@ -32,18 +35,14 @@ BuildRequires: maven-surefire-maven-plugin
BuildRequires: maven-surefire-provider-junit4
BuildRequires: maven-plugin-build-helper
BuildRequires: isorelax
+BuildRequires: isorelax-javadoc
BuildRequires: relaxngDatatype
+BuildRequires: relaxngDatatype-javadoc
BuildRequires: xalan-j2
BuildRequires: xerces-j2
BuildRequires: xml-commons-apis
BuildRequires: xml-commons-resolver
-#BuildRequires: xerces-j2-javadoc-impl
-#BuildRequires: xerces-j2-javadoc-xni
-#BuildRequires: xerces-j2-javadoc-apis
-#BuildRequires: isorelax-javadoc
-#BuildRequires: relaxngDatatype-javadoc
-
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -138,6 +137,8 @@ Summary: API documentation for Multi-Schema Validator
Group: Documentation
Requires: java-javadoc
Requires: jpackage-utils
+Requires: isorelax-javadoc
+Requires: relaxngDatatype-javadoc
# Can remove these obsoletes at Fedora 17 time
Obsoletes: msv-msv-javadoc < %{version}-%{release}
@@ -182,6 +183,7 @@ done
# Apply patches
%patch0 -p0 -b .orig
%patch1 -p0 -b .orig
+%patch2 -p0 -b .orig2
# Change encoding of non utf-8 files
for m in $(find . -name copyright.txt) ; do
@@ -227,6 +229,22 @@ for jar in *-%{version}.jar ; do
ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
done)
+# Poms
+install -pD -T -m 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-msv.pom
+install -pD -T -m 644 parent/pom.xml %{buildroot}%{_mavenpomdir}/JPP-msv-parent.pom
+install -pD -T -m 644 msv/pom.xml %{buildroot}%{_mavenpomdir}/JPP-msv-core.pom
+install -pD -T -m 644 relames/pom.xml %{buildroot}%{_mavenpomdir}/JPP-msv-relames.pom
+install -pD -T -m 644 rngconverter/pom.xml %{buildroot}%{_mavenpomdir}/JPP-msv-rngconverter.pom
+install -pD -T -m 644 generator/pom.xml %{buildroot}%{_mavenpomdir}/JPP-msv-generator.pom
+install -pD -T -m 644 xsdlib/pom.xml %{buildroot}%{_mavenpomdir}/JPP-xsdlib.pom
+%add_to_maven_depmap net.java.dev.msv msv %{version} JPP msv
+%add_to_maven_depmap net.java.dev.msv msv-parent %{version} JPP msv-parent
+%add_to_maven_depmap net.java.dev.msv msv-core %{version} JPP msv-core
+%add_to_maven_depmap net.java.dev.msv msv-relames %{version} JPP msv-relames
+%add_to_maven_depmap net.java.dev.msv msv-rngconverter %{version} JPP msv-rngconverter
+%add_to_maven_depmap net.java.dev.msv msv-generator %{version} JPP msv-generator
+%add_to_maven_depmap net.java.dev.msv xsdlib %{version} JPP xsdlib
+
# Javadocs
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}-%{version}
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}-%{version}
@@ -261,8 +279,15 @@ cp -pr xsdlib/examples/* %{buildroot}%{_datadir}/%{name}-%{version}/xsdlib
%clean
rm -rf %{buildroot}
+%post
+%update_maven_depmap
+
+%postun
+%update_maven_depmap
+
%files msv
%defattr(-,root,root,-)
+%{_mavenpomdir}/JPP-%{name}-core.pom
%{_javadir}/%{name}-core-%{version}.jar
%{_javadir}/%{name}-core.jar
%{_javadir}/%{name}-msv-%{version}.jar
@@ -271,12 +296,14 @@ rm -rf %{buildroot}
%files relames
%defattr(-,root,root,-)
+%{_mavenpomdir}/JPP-%{name}-relames.pom
%{_javadir}/%{name}-relames-%{version}.jar
%{_javadir}/%{name}-relames.jar
%doc relames/doc/copyright.txt
%files rngconv
%defattr(-,root,root,-)
+%{_mavenpomdir}/JPP-%{name}-rngconverter.pom
%{_javadir}/%{name}-rngconverter-%{version}.jar
%{_javadir}/%{name}-rngconverter.jar
%{_javadir}/%{name}-rngconv-%{version}.jar
@@ -286,6 +313,7 @@ rm -rf %{buildroot}
%files xmlgen
%defattr(-,root,root,-)
+%{_mavenpomdir}/JPP-%{name}-generator.pom
%{_javadir}/%{name}-generator-%{version}.jar
%{_javadir}/%{name}-generator.jar
%{_javadir}/%{name}-xmlgen-%{version}.jar
@@ -295,6 +323,7 @@ rm -rf %{buildroot}
%files xsdlib
%defattr(-,root,root,-)
+%{_mavenpomdir}/JPP-xsdlib.pom
%{_javadir}/xsdlib-%{version}.jar
%{_javadir}/xsdlib.jar
%{_javadir}/%{name}-xsdlib-%{version}.jar
@@ -302,6 +331,12 @@ rm -rf %{buildroot}
%doc xsdlib/doc/license.txt
%doc xsdlib/doc/copyright.txt
+# This subpackage wins the parent poms and the depmap because all the other
+# subpackages require this one
+%{_mavenpomdir}/JPP-%{name}.pom
+%{_mavenpomdir}/JPP-%{name}-parent.pom
+%{_mavendepmapfragdir}/*
+
%files javadoc
%defattr(-,root,root,-)
%{_javadocdir}/%{name}-%{version}
@@ -316,6 +351,10 @@ rm -rf %{buildroot}
%{_datadir}/%{name}-%{version}
%changelog
+* Sun Sep 19 2010 Mat Booth - 1:2009.1-2
+- Re-patch build to link to local javadocs.
+- Install maven poms/depmap.
+
* Thu Sep 16 2010 Mat Booth - 1:2009.1-1
- Update to latest tagged release.
- Drop support for GCJ ahead of time compilation.