[cargo-resources] use servlet api 3.1

gil gil at fedoraproject.org
Thu Mar 5 11:07:52 UTC 2015


commit 7de74c6fae80e3f01d126d462843b918728694ac
Author: gil <puntogil at libero.it>
Date:   Thu Mar 5 12:07:43 2015 +0100

    use servlet api 3.1

 cargo-resources-1.2.2-depmap        |  14 ----
 cargo-resources-1.4.2-servlet.patch | 154 ++++++++++++++++++++++++++++++++++++
 cargo-resources.spec                |  31 ++++----
 3 files changed, 170 insertions(+), 29 deletions(-)
---
diff --git a/cargo-resources-1.4.2-servlet.patch b/cargo-resources-1.4.2-servlet.patch
new file mode 100644
index 0000000..eb10929
--- /dev/null
+++ b/cargo-resources-1.4.2-servlet.patch
@@ -0,0 +1,154 @@
+diff -Nru cargo-resources-1.4.2/jetty-6-and-earlier-deployer/pom.xml cargo-resources-1.4.2.servlet/jetty-6-and-earlier-deployer/pom.xml
+--- cargo-resources-1.4.2/jetty-6-and-earlier-deployer/pom.xml	2013-05-27 20:58:20.000000000 +0200
++++ cargo-resources-1.4.2.servlet/jetty-6-and-earlier-deployer/pom.xml	2015-03-05 11:33:06.525223153 +0100
+@@ -31,8 +31,8 @@
+   <dependencies>
+     <dependency>
+       <groupId>javax.servlet</groupId>
+-      <artifactId>servlet-api</artifactId>
+-      <version>2.4</version>
++      <artifactId>javax.servlet-api</artifactId>
++      <version>3.1.0</version>
+       <scope>provided</scope>
+     </dependency>
+     <dependency>
+diff -Nru cargo-resources-1.4.2/jetty-7-and-onwards-deployer/pom.xml cargo-resources-1.4.2.servlet/jetty-7-and-onwards-deployer/pom.xml
+--- cargo-resources-1.4.2/jetty-7-and-onwards-deployer/pom.xml	2013-05-27 20:58:20.000000000 +0200
++++ cargo-resources-1.4.2.servlet/jetty-7-and-onwards-deployer/pom.xml	2015-03-05 11:33:06.519223480 +0100
+@@ -31,8 +31,8 @@
+   <dependencies>
+     <dependency>
+       <groupId>javax.servlet</groupId>
+-      <artifactId>servlet-api</artifactId>
+-      <version>2.4</version>
++      <artifactId>javax.servlet-api</artifactId>
++      <version>3.1.0</version>
+       <scope>provided</scope>
+     </dependency>
+     <dependency>
+diff -Nru cargo-resources-1.4.2/testdata/authentication-war/pom.xml cargo-resources-1.4.2.servlet/testdata/authentication-war/pom.xml
+--- cargo-resources-1.4.2/testdata/authentication-war/pom.xml	2013-05-27 20:58:20.000000000 +0200
++++ cargo-resources-1.4.2.servlet/testdata/authentication-war/pom.xml	2015-03-05 11:33:06.524223207 +0100
+@@ -29,8 +29,8 @@
+   <dependencies>
+     <dependency>
+       <groupId>javax.servlet</groupId>
+-      <artifactId>servlet-api</artifactId>
+-      <version>2.4</version>
++      <artifactId>javax.servlet-api</artifactId>
++      <version>3.1.0</version>
+       <scope>provided</scope>
+     </dependency>
+   </dependencies>
+diff -Nru cargo-resources-1.4.2/testdata/classpath-war/pom.xml cargo-resources-1.4.2.servlet/testdata/classpath-war/pom.xml
+--- cargo-resources-1.4.2/testdata/classpath-war/pom.xml	2013-05-27 20:58:20.000000000 +0200
++++ cargo-resources-1.4.2.servlet/testdata/classpath-war/pom.xml	2015-03-05 11:33:06.524223207 +0100
+@@ -29,8 +29,8 @@
+   <dependencies>
+     <dependency>
+       <groupId>javax.servlet</groupId>
+-      <artifactId>servlet-api</artifactId>
+-      <version>2.4</version>
++      <artifactId>javax.servlet-api</artifactId>
++      <version>3.1.0</version>
+       <scope>provided</scope>
+     </dependency>
+   </dependencies>
+diff -Nru cargo-resources-1.4.2/testdata/datasource-cmt-local-war/pom.xml cargo-resources-1.4.2.servlet/testdata/datasource-cmt-local-war/pom.xml
+--- cargo-resources-1.4.2/testdata/datasource-cmt-local-war/pom.xml	2013-05-27 20:58:20.000000000 +0200
++++ cargo-resources-1.4.2.servlet/testdata/datasource-cmt-local-war/pom.xml	2015-03-05 11:33:06.523223262 +0100
+@@ -29,8 +29,8 @@
+   <dependencies>
+     <dependency>
+       <groupId>javax.servlet</groupId>
+-      <artifactId>servlet-api</artifactId>
+-      <version>2.4</version>
++      <artifactId>javax.servlet-api</artifactId>
++      <version>3.1.0</version>
+       <scope>provided</scope>
+     </dependency>
+     <dependency>
+diff -Nru cargo-resources-1.4.2/testdata/datasource-war/pom.xml cargo-resources-1.4.2.servlet/testdata/datasource-war/pom.xml
+--- cargo-resources-1.4.2/testdata/datasource-war/pom.xml	2013-05-27 20:58:20.000000000 +0200
++++ cargo-resources-1.4.2.servlet/testdata/datasource-war/pom.xml	2015-03-05 11:33:06.519223480 +0100
+@@ -29,8 +29,8 @@
+   <dependencies>
+     <dependency>
+       <groupId>javax.servlet</groupId>
+-      <artifactId>servlet-api</artifactId>
+-      <version>2.4</version>
++      <artifactId>javax.servlet-api</artifactId>
++      <version>3.1.0</version>
+       <scope>provided</scope>
+     </dependency>
+   </dependencies>
+diff -Nru cargo-resources-1.4.2/testdata/mailsession-war/pom.xml cargo-resources-1.4.2.servlet/testdata/mailsession-war/pom.xml
+--- cargo-resources-1.4.2/testdata/mailsession-war/pom.xml	2013-05-27 20:58:20.000000000 +0200
++++ cargo-resources-1.4.2.servlet/testdata/mailsession-war/pom.xml	2015-03-05 11:33:06.520223425 +0100
+@@ -29,8 +29,8 @@
+   <dependencies>
+     <dependency>
+       <groupId>javax.servlet</groupId>
+-      <artifactId>servlet-api</artifactId>
+-      <version>2.4</version>
++      <artifactId>javax.servlet-api</artifactId>
++      <version>3.1.0</version>
+       <scope>provided</scope>
+     </dependency>
+     <dependency>
+diff -Nru cargo-resources-1.4.2/testdata/systemproperty-war/pom.xml cargo-resources-1.4.2.servlet/testdata/systemproperty-war/pom.xml
+--- cargo-resources-1.4.2/testdata/systemproperty-war/pom.xml	2013-05-27 20:58:20.000000000 +0200
++++ cargo-resources-1.4.2.servlet/testdata/systemproperty-war/pom.xml	2015-03-05 11:33:06.521223371 +0100
+@@ -29,8 +29,8 @@
+   <dependencies>
+     <dependency>
+       <groupId>javax.servlet</groupId>
+-      <artifactId>servlet-api</artifactId>
+-      <version>2.4</version>
++      <artifactId>javax.servlet-api</artifactId>
++      <version>3.1.0</version>
+       <scope>provided</scope>
+     </dependency>
+   </dependencies>
+diff -Nru cargo-resources-1.4.2/testdata/tomcat-context/pom.xml cargo-resources-1.4.2.servlet/testdata/tomcat-context/pom.xml
+--- cargo-resources-1.4.2/testdata/tomcat-context/pom.xml	2013-05-27 20:58:20.000000000 +0200
++++ cargo-resources-1.4.2.servlet/testdata/tomcat-context/pom.xml	2015-03-05 11:33:06.523223262 +0100
+@@ -29,8 +29,8 @@
+   <dependencies>
+     <dependency>
+       <groupId>javax.servlet</groupId>
+-      <artifactId>servlet-api</artifactId>
+-      <version>2.4</version>
++      <artifactId>javax.servlet-api</artifactId>
++      <version>3.1.0</version>
+       <scope>provided</scope>
+     </dependency>
+   </dependencies>
+diff -Nru cargo-resources-1.4.2/testdata/two-datasources-war/pom.xml cargo-resources-1.4.2.servlet/testdata/two-datasources-war/pom.xml
+--- cargo-resources-1.4.2/testdata/two-datasources-war/pom.xml	2013-05-27 20:58:20.000000000 +0200
++++ cargo-resources-1.4.2.servlet/testdata/two-datasources-war/pom.xml	2015-03-05 11:33:06.519223480 +0100
+@@ -13,8 +13,8 @@
+   <dependencies>
+     <dependency>
+       <groupId>javax.servlet</groupId>
+-      <artifactId>servlet-api</artifactId>
+-      <version>2.4</version>
++      <artifactId>javax.servlet-api</artifactId>
++      <version>3.1.0</version>
+       <scope>provided</scope>
+     </dependency>
+   </dependencies>
+diff -Nru cargo-resources-1.4.2/testdata/xadatasource-war/pom.xml cargo-resources-1.4.2.servlet/testdata/xadatasource-war/pom.xml
+--- cargo-resources-1.4.2/testdata/xadatasource-war/pom.xml	2013-05-27 20:58:20.000000000 +0200
++++ cargo-resources-1.4.2.servlet/testdata/xadatasource-war/pom.xml	2015-03-05 11:33:06.522223316 +0100
+@@ -29,8 +29,8 @@
+   <dependencies>
+     <dependency>
+       <groupId>javax.servlet</groupId>
+-      <artifactId>servlet-api</artifactId>
+-      <version>2.4</version>
++      <artifactId>javax.servlet-api</artifactId>
++      <version>3.1.0</version>
+       <scope>provided</scope>
+     </dependency>
+   </dependencies>
diff --git a/cargo-resources.spec b/cargo-resources.spec
index c54b78c..788f20e 100644
--- a/cargo-resources.spec
+++ b/cargo-resources.spec
@@ -1,13 +1,14 @@
 %global oname cargo
 Name:          cargo-resources
 Version:       1.4.2
-Release:       5%{?dist}
+Release:       6%{?dist}
 Summary:       Cargo Shared Resources
 License:       ASL 2.0
 Url:           http://cargo.codehaus.org/
 # svn export http://svn.codehaus.org/cargo/resources/tags/cargo-resources-1.4.2
 # tar czf cargo-resources-1.4.2-src-svn.tar.gz cargo-resources-1.4.2
 Source0:       %{name}-%{version}-src-svn.tar.gz
+Patch0:        cargo-resources-1.4.2-servlet.patch
 
 BuildRequires: cargo-parent
 BuildRequires: java-devel
@@ -15,9 +16,8 @@ BuildRequires: java-devel
 BuildRequires: felix-osgi-core
 BuildRequires: geronimo-ejb
 BuildRequires: geronimo-parent-poms
-#BuildRequires: mvn(org.apache.geronimo.specs:specs)
 BuildRequires: javamail
-BuildRequires: tomcat-servlet-3.0-api
+BuildRequires: glassfish-servlet-api
 
 BuildRequires: maven-local
 BuildRequires: maven-ear-plugin
@@ -29,7 +29,7 @@ BuildRequires: maven-war-plugin
 Requires:      felix-osgi-core
 Requires:      geronimo-ejb
 Requires:      javamail
-Requires:      tomcat-servlet-3.0-api
+Requires:      glassfish-servlet-api
 
 Requires:      java-headless
 BuildArch:     noarch
@@ -45,6 +45,7 @@ This package contains javadoc for %{name}.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %pom_disable_module jetty-6-and-earlier-deployer
 %pom_disable_module jetty-7-and-onwards-deployer
@@ -55,17 +56,13 @@ This package contains javadoc for %{name}.
 %pom_disable_module simple-aop testdata/pom.xml
 %pom_disable_module simple-har testdata/pom.xml
 
-sed -i "s|<groupId>org.osgi</groupId>|<groupId>org.apache.felix</groupId>|" testdata/simple-bundle/pom.xml
-sed -i "s|<version>4.0.0</version>|<version>1.4.0</version>|" testdata/simple-bundle/pom.xml
-sed -i "s|<artifactId>geronimo-j2ee_1.4_spec|<artifactId>geronimo-ejb_3.1_spec|" testdata/simple-ejb/pom.xml
-
-# force tomcat 7.x apis use
-sed -i "s|<groupId>javax.servlet</groupId>|<groupId>org.apache.tomcat</groupId>|" $(find . -name "pom.xml")
-sed -i "s|<artifactId>servlet-api</artifactId>|<artifactId>tomcat-servlet-api</artifactId>|" $(find . -name "pom.xml")
+%pom_xpath_set "pom:dependencies/pom:dependency[pom:artifactId = 'org.osgi.core']/pom:groupId" org.apache.felix testdata/simple-bundle
+%pom_xpath_set "pom:dependencies/pom:dependency[pom:artifactId = 'org.osgi.core']/pom:version" 1.4.0 testdata/simple-bundle
+%pom_xpath_set "pom:dependencies/pom:dependency[pom:groupId = 'org.apache.geronimo.specs']/pom:artifactId" geronimo-ejb_3.1_spec testdata/simple-ejb
 
 %build
 
-mvn-rpmbuild package javadoc:aggregate
+%mvn_build
 
 %install
 
@@ -78,11 +75,12 @@ install -m 644 build-tools/target/%{oname}-build-tools-%{version}.jar %{buildroo
 install -pm 644 build-tools/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{oname}-%{oname}-build-tools.pom
 %add_maven_depmap JPP.%{oname}-%{oname}-build-tools.pom %{oname}/%{oname}-build-tools.jar
 
+install -pm 644 testdata/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{oname}-cargo-samples-testdata.pom
+%add_maven_depmap JPP.%{oname}-cargo-samples-testdata.pom
+
 # jetty-6-and-earlier-deployer
 # jetty-7-and-onwards-deployer
-
 # testdata
-
 # simple-aop
 # simple-har
 
@@ -137,6 +135,9 @@ cp -p build-tools/NOTICE .
 %license LICENSE NOTICE
 
 %changelog
+* Thu Mar 05 2015 gil cattaneo <puntogil at libero.it> 1.4.2-6
+- use servlet api 3.1
+
 * Fri Jan 30 2015 gil cattaneo <puntogil at libero.it> 1.4.2-5
 - introduce license macro
 
@@ -175,4 +176,4 @@ cp -p build-tools/NOTICE .
 - Update to 1.2.2
 
 * Mon May 14 2012 gil cattaneo <puntogil at libero.it> 1.2.1-1
-- initial rpm
\ No newline at end of file
+- initial rpm


More information about the scm-commits mailing list