[jetty] Convert patches to POm macros
Mikolaj Izdebski
mizdebsk at fedoraproject.org
Wed Jul 18 21:47:09 UTC 2012
commit 8a1ab658bff30c6774d60b25371ebe0487a323b1
Author: Mikolaj Izdebski <mizdebsk at redhat.com>
Date: Thu Jul 19 01:08:45 2012 +0200
Convert patches to POm macros
0001-Remove-javadoc-execution.patch | 56 ---------------
0002-Disable-test-artifacts.patch | 45 ------------
0003-Change-servelt-groupId-to-javax.servlet.patch | 26 -------
0005-Remove-pmd-plugin.patch | 54 --------------
...move-unpack-config-deps-from-distribution.patch | 44 ------------
0007-disable-jetty-osgi.patch | 73 --------------------
0008-Disable-jetty-nosql.patch | 24 -------
jetty.spec | 69 ++++++++++++++-----
8 files changed, 52 insertions(+), 339 deletions(-)
---
diff --git a/jetty.spec b/jetty.spec
index 3847048..68bf1f2 100644
--- a/jetty.spec
+++ b/jetty.spec
@@ -56,14 +56,7 @@ Source1: djetty.script
Source3: jetty.logrotate
Source4: %{name}-depmap.xml
Source5: %{name}.service
-Patch1: 0001-Remove-javadoc-execution.patch
-Patch2: 0002-Disable-test-artifacts.patch
-Patch3: 0003-Change-servelt-groupId-to-javax.servlet.patch
Patch4: 0004-Modify-dependencies.patch
-Patch5: 0005-Remove-pmd-plugin.patch
-Patch6: 0006-Remove-unpack-config-deps-from-distribution.patch
-Patch7: 0007-disable-jetty-osgi.patch
-Patch8: 0008-Disable-jetty-nosql.patch
BuildRequires: geronimo-annotation
BuildRequires: geronimo-jaspic-spec
@@ -576,17 +569,41 @@ Requires: jpackage-utils
for f in $(find . -name "*.?ar"); do rm $f; done
find . -name "*.class" -exec rm {} \;
-
-%patch1 -p1 -b .sav
-%patch2 -p1 -b .sav
-%patch3 -p1 -b .sav
%patch4 -p1 -b .sav
-%patch5 -p1 -b .sav
-%patch6 -p1 -b .sav
-%if 0%{?rhel} > 0
-%patch7 -p1 -b .sav
-%patch8 -p1 -b .sav
-%endif
+
+# Remove javadoc execution
+# We generate javadoc as a separate step
+%pom_remove_plugin :maven-javadoc-plugin jetty-aggregate/jetty-all
+%pom_remove_dep :jetty-all jetty-distribution
+
+# Disable test artifacts
+# they need more dependencies then we have time for right now :-)
+%pom_disable_module tests
+%pom_disable_module test-continuation
+%pom_disable_module test-jetty-nested
+%pom_disable_module test-jetty-servlet
+%pom_disable_module test-jetty-osgi jetty-osgi
+
+# Change servelt groupId to javax.servlet
+%pom_xpath_inject "pom:project/pom:properties" "
+ <servlet.spec.groupId>javax.servlet</servlet.spec.groupId>
+ <servlet.spec.artifactId>servlet-api</servlet.spec.artifactId>
+ <servlet.spec.version>3.0.20100224</servlet.spec.version>"
+
+# Prevents problem with "Reporting mojo's can only be called from
+# ReportDocumentRender". Investigate proper fix some other time?
+%pom_remove_plugin :maven-pmd-plugin
+
+# Remove unpack-config-deps from distribution
+#
+# This is needed because original code used classifiers to select subset
+# of artifacts. Unfortunately there seems to be a weird bug affecting even
+# upstream maven when this goes outside of reactor resolver. Or perhaps
+# this is a weird feature.
+#
+# Our resolver obviously can't handle this so we have to unpack these
+# manually before building distribution
+%pom_xpath_remove "pom:execution[pom:id[text()='unpack-config-deps']]" jetty-distribution
# Disable SPDY for now as there are missing dependencies
# (like some TLS extensions for OpenJDK)
@@ -594,6 +611,24 @@ find . -name "*.class" -exec rm {} \;
%pom_remove_dep org.eclipse.jetty.spdy: jetty-distribution
%pom_xpath_remove "pom:execution[pom:id[text()='copy-spdy']]" jetty-distribution
+%if 0%{?rhel} > 0
+# Use Glassfish JSP
+%pom_remove_dep :org.eclipse.jdt.core jetty-jsp
+%pom_xpath_inject "pom:project/pom:dependencies" "
+ <dependency>
+ <groupId>org.glassfish.web</groupId>
+ <artifactId>javax.servlet.jsp</artifactId>
+ <version>any</version>
+ </dependency>" jetty-jsp
+
+# Disable OSGi
+%pom_disable_module jetty-osgi
+%pom_xpath_remove "pom:profile[pom:id[text()='osgi']]"
+
+# Disable NoSQL
+%pom_disable_module jetty-nosql
+%endif
+
cp %{SOURCE1} djetty
# this needs jetty6 things, so just remove it
More information about the scm-commits
mailing list