gil pushed to jersey (master). "use custom bindings catalog"

notifications at fedoraproject.org notifications at fedoraproject.org
Fri Mar 27 14:42:59 UTC 2015


>From f8404553b75d4053acf08b8a8887f8c48261b1e1 Mon Sep 17 00:00:00 2001
From: gil <puntogil at libero.it>
Date: Fri, 27 Mar 2015 15:42:43 +0100
Subject: use custom bindings catalog


diff --git a/bindings.cat b/bindings.cat
new file mode 100644
index 0000000..f9e6c12
--- /dev/null
+++ b/bindings.cat
@@ -0,0 +1,8 @@
+PUBLIC "-//W3C//DTD XMLSchema 200102//EN" "XMLSchema.dtd"
+PUBLIC "http://www.w3.org/2001/XMLSchema.dtd" "XMLSchema.dtd"
+SYSTEM "http://www.w3.org/2001/XMLSchema.dtd" "XMLSchema.dtd"
+
+PUBLIC "datatypes" "datatypes.dtd"
+SYSTEM "datatypes.dtd" "datatypes.dtd"
+
+SYSTEM "http://www.w3.org/2001/xml.xsd" "xml.xsd"
\ No newline at end of file
diff --git a/jersey.spec b/jersey.spec
index 2ac47b8..7a25bb3 100644
--- a/jersey.spec
+++ b/jersey.spec
@@ -8,6 +8,10 @@ License:       (CDDL or GPLv2 with exceptions) and ASL 2.0
 URL:           http://jersey.java.net/
 Source0:       https://github.com/jersey/%{name}-1.x/archive/%{version}.tar.gz
 Source1:       http://www.apache.org/licenses/LICENSE-2.0.txt
+
+# Customized resources
+Source111:     bindings.cat
+
 # remove org.aspectj aspectjrt
 # remove testng classifier jdk15
 # change javax.servlet servlet-api 2.5 with org.jboss.spec.javax.servlet jboss-servlet-api_3.0_spec
@@ -175,13 +179,39 @@ sed -i 's/\r//' LICENSE-2.0.txt
 %pom_remove_plugin :maven-surefire-plugin jersey-core
 %pom_remove_plugin :maven-surefire-plugin jersey-server
 
-sed -i "s|<groupId>com.sun.tools.xjc.maven2|<groupId>org.jvnet.jaxb2.maven2|" jersey-server/pom.xml
-# different jaxb-impl/runtime apis
-%if %{?fedora} >= 21
-sed -i "s|<artifactId>maven-jaxb-plugin|<artifactId>maven-jaxb22-plugin|" jersey-server/pom.xml
-%else
-sed -i "s|<artifactId>maven-jaxb-plugin|<artifactId>maven-jaxb21-plugin|" jersey-server/pom.xml
-%endif
+# Newer jaxb plugin as jaxb package required a web connection for generate source code
+# disable schema validation since the validation code
+# doesn't respect the catalog and will do online lookups
+rm -r jersey-server/etc/catalog.xml
+sed -i 's|schemaLocation="http://www.w3.org/2001/xml.xsd"|schemaLocation="./xml.xsd"|' jersey-server/etc/wadl.xsd
+cp -p %SOURCE111 jersey-server/etc/.
+%pom_add_plugin "org.jvnet.jaxb2.maven2:maven-jaxb22-plugin:0.12.3" jersey-server '
+<executions>
+  <execution>
+    <id>bindings</id>
+    <phase>generate-sources</phase>
+    <goals>
+      <goal>generate</goal>
+    </goals>
+    <configuration>
+      <generatePackage>com.sun.research.ws.wadl</generatePackage>
+      <catalog>${basedir}/etc/bindings.cat</catalog>
+      <schemaDirectory>${basedir}/etc</schemaDirectory>
+      <bindingDirectory>${basedir}</bindingDirectory>
+      <bindingIncludes>
+        <bindingInclude>wadl.xsd</bindingInclude>
+      </bindingIncludes>
+      <forceRegenerate>false</forceRegenerate>
+      <episode>true</episode>
+      <specVersion>2.1</specVersion>
+      <extension>true</extension>
+      <strict>false</strict>
+      <args>
+        <arg>-npa</arg>
+      </args>
+    </configuration>
+  </execution>
+</executions>'
 
 for p in jersey-atom jersey-client jersey-core jersey-fastinfoset \
  jersey-grizzly2 jersey-grizzly2-servlet jersey-json jersey-server \
@@ -323,7 +353,7 @@ rm -r contribs/jersey-apache-client4/src/test/java/com
 
 %build
 
-%mvn_build -X
+%mvn_build
 
 %install
 %mvn_install
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/jersey.git/commit/?h=master&id=f8404553b75d4053acf08b8a8887f8c48261b1e1


More information about the scm-commits mailing list