[jibx] add maven poms (#825465)

hannes hannes at fedoraproject.org
Tue May 29 19:55:42 UTC 2012


commit ddf6d7d58cf21d947ed09963fbbc9a33f9dfabf5
Author: hannes <hannes at fedoraproject.org>
Date:   Tue May 29 20:54:48 2012 +0100

    add maven poms (#825465)

 jibx-maven-pom.patch |  213 ++++++++++++++++++++++++++++++++++++++++++++++++++
 jibx.spec            |   30 +++++--
 2 files changed, 234 insertions(+), 9 deletions(-)
---
diff --git a/jibx-maven-pom.patch b/jibx-maven-pom.patch
new file mode 100644
index 0000000..5d2becd
--- /dev/null
+++ b/jibx-maven-pom.patch
@@ -0,0 +1,213 @@
+From 5b15ef0a5839884a5d28ecd673549d931c4127fe Mon Sep 17 00:00:00 2001
+From: gil <puntogil at libero.it>
+Date: Sat, 26 May 2012 16:34:04 +0200
+Subject: [PATCH] - Added maven POM - Adapt to current guideline
+
+---
+ jibx-1.2.4-poms.patch |  191 +++++++++++++++++++++++++++++++++++++++++++++++++
+ jibx.spec             |   44 +++++++-----
+ 2 files changed, 218 insertions(+), 17 deletions(-)
+ create mode 100644 jibx-1.2.4-poms.patch
+
+diff --git a/jibx-1.2.4-poms.patch b/jibx-1.2.4-poms.patch
+new file mode 100644
+index 0000000..96a8ee7
+--- /dev/null
++++ b/jibx-1.2.4-poms.patch
+@@ -0,0 +1,191 @@
++diff -Nru build/maven/jibx-bind/pom.xml build/maven-gil/jibx-bind/pom.xml
++--- build/maven/jibx-bind/pom.xml	2012-05-02 09:51:18.000000000 +0200
+++++ build/maven-gil/jibx-bind/pom.xml	2012-05-26 16:11:24.000000000 +0200
++@@ -5,7 +5,7 @@
++   <parent>
++     <groupId>org.jibx.config</groupId>
++     <artifactId>main-reactor</artifactId>
++-    <version>1.2.4-SNAPSHOT</version>
+++    <version>1.2.4</version>
++   </parent>
++ 
++   <groupId>org.jibx</groupId>
++@@ -72,9 +72,7 @@
++                 org.jibx.binding.*;version=${project.version},
++                 org.jibx.util.*;version=${project.version},
++             </Export-Package>
++-	    <Include-Resource>@${jibxLibDir}/jibx-bind.jar;inline=**</Include-Resource>
++ 	    <Main-Class>org.jibx.binding.Compile</Main-Class>
++-	    <Class-Path>bcel.jar jibx-run.jar xpp3.jar stax-api.jar wstx-asl.jar</Class-Path>
++           </instructions>
++         </configuration>
++       </plugin>
++@@ -85,7 +83,7 @@
++     <dependency>
++       <groupId>${project.groupId}</groupId>
++       <artifactId>jibx-run</artifactId>
++-      <version>1.2.4-SNAPSHOT</version>
+++      <version>1.2.4</version>
++     </dependency>
++ 
++     <dependency>
++diff -Nru build/maven/jibx-extras/pom.xml build/maven-gil/jibx-extras/pom.xml
++--- build/maven/jibx-extras/pom.xml	2012-05-02 09:51:18.000000000 +0200
+++++ build/maven-gil/jibx-extras/pom.xml	2012-05-26 16:11:24.000000000 +0200
++@@ -5,7 +5,7 @@
++   <parent>
++     <groupId>org.jibx.config</groupId>
++     <artifactId>main-reactor</artifactId>
++-    <version>1.2.4-SNAPSHOT</version>
+++    <version>1.2.4</version>
++   </parent>
++ 
++   <groupId>org.jibx</groupId>
++@@ -60,9 +60,7 @@
++             <Export-Package>
++                 org.jibx.extras.*;version=${project.version},
++             </Export-Package>
++-	    <Include-Resource>@${jibxLibDir}/jibx-extras.jar;inline=**</Include-Resource>
++ 	    <Main-Class>org.jibx.extras.TestRoundtrip</Main-Class>
++-	    <Class-Path>jibx-run.jar xpp3.jar stax-api.jar wstx-asl.jar</Class-Path>
++           </instructions>
++         </configuration>
++       </plugin>
++@@ -73,7 +71,7 @@
++     <dependency>
++       <groupId>${project.groupId}</groupId>
++       <artifactId>jibx-run</artifactId>
++-      <version>1.2.4-SNAPSHOT</version>
+++      <version>1.2.4</version>
++     </dependency>
++ 
++ 	<dependency>
++diff -Nru build/maven/jibx-run/pom.xml build/maven-gil/jibx-run/pom.xml
++--- build/maven/jibx-run/pom.xml	2012-05-02 09:51:18.000000000 +0200
+++++ build/maven-gil/jibx-run/pom.xml	2012-05-26 16:11:24.000000000 +0200
++@@ -5,7 +5,7 @@
++   <parent>
++     <groupId>org.jibx.config</groupId>
++     <artifactId>main-reactor</artifactId>
++-    <version>1.2.4-SNAPSHOT</version>
+++    <version>1.2.4</version>
++   </parent>
++ 
++   <groupId>org.jibx</groupId>
++@@ -63,9 +63,7 @@
++             <Export-Package>
++                 org.jibx.runtime.*;version=${project.version},
++             </Export-Package>
++-	    <Include-Resource>@${jibxLibDir}/jibx-run.jar;inline=**</Include-Resource>
++ 	    <Main-Class>org.jibx.runtime.PrintInfo</Main-Class>
++-	    <Class-Path>xpp3.jar stax-api.jar wstx-asl.jar</Class-Path>
++           </instructions>
++         </configuration>
++       </plugin>
++diff -Nru build/maven/jibx-schema/pom.xml build/maven-gil/jibx-schema/pom.xml
++--- build/maven/jibx-schema/pom.xml	2012-05-02 09:51:18.000000000 +0200
+++++ build/maven-gil/jibx-schema/pom.xml	2012-05-26 16:11:24.000000000 +0200
++@@ -5,7 +5,7 @@
++   <parent>
++     <groupId>org.jibx.config</groupId>
++     <artifactId>main-reactor</artifactId>
++-    <version>1.2.4-SNAPSHOT</version>
+++    <version>1.2.4</version>
++   </parent>
++ 
++   <groupId>org.jibx</groupId>
++@@ -79,8 +79,6 @@
++                 !org.jibx.schema.generator.*,  <!-- In jibx-tools -->
++                 org.jibx.schema.*;version=${project.version},
++             </Export-Package>
++-	    <Include-Resource>@${jibxLibDir}/jibx-schema.jar;inline=**</Include-Resource>
++-	    <Class-Path>jibx-run.jar jibx-bind.jar xpp3.jar stax-api.jar wstx-asl.jar</Class-Path>
++           </instructions>
++         </configuration>
++       </plugin>
++@@ -91,12 +89,12 @@
++     <dependency>
++       <groupId>${project.groupId}</groupId>
++       <artifactId>jibx-bind</artifactId>
++-      <version>1.2.4-SNAPSHOT</version>
+++      <version>1.2.4</version>
++     </dependency>
++     <dependency>
++       <groupId>${project.groupId}</groupId>
++       <artifactId>jibx-extras</artifactId>
++-      <version>1.2.4-SNAPSHOT</version>
+++      <version>1.2.4</version>
++     </dependency>
++   </dependencies>
++ 
++diff -Nru build/maven/jibx-tools/pom.xml build/maven-gil/jibx-tools/pom.xml
++--- build/maven/jibx-tools/pom.xml	2012-05-02 09:51:18.000000000 +0200
+++++ build/maven-gil/jibx-tools/pom.xml	2012-05-26 16:11:24.000000000 +0200
++@@ -5,7 +5,7 @@
++   <parent>
++     <groupId>org.jibx.config</groupId>
++     <artifactId>main-reactor</artifactId>
++-    <version>1.2.4-SNAPSHOT</version>
+++    <version>1.2.4</version>
++   </parent>
++ 
++   <groupId>org.jibx</groupId>
++@@ -81,15 +81,7 @@
++                 org.jibx.custom.*;version=${project.version},  <!-- In jibx-tools -->
++                 org.jibx.ws.*;version=${project.version},  <!-- In jibx-tools -->
++             </Export-Package>
++-	    <Include-Resource>@${jibxLibDir}/jibx-tools.jar;inline=**</Include-Resource>
++ 	    <Main-Class>org.jibx.ws.wsdl.tools.Jibx2Wsdl</Main-Class>
++-	    <Class-Path>bcel.jar jibx-run.jar jibx-bind.jar jibx-extras.jar
++-	    jibx-schema.jar xpp3.jar stax-api.jar wstx-asl.jar joda-time.jar log4j.jar
++-	    qdox.jar org.eclipse.core.contenttype.jar org.eclipse.core.jobs.jar
++-	    org.eclipse.core.resources.jar org.eclipse.core.runtime.jar
++-	    org.eclipse.equinox.common.jar org.eclipse.equinox.preferences.jar
++-	    org.eclipse.jdt.core.jar org.eclipse.jdt.core.manipulation.jar org.eclipse.osgi.jar
++-	    org.eclipse.text.jar</Class-Path>
++           </instructions>
++         </configuration>
++       </plugin>
++@@ -100,10 +92,10 @@
++     <dependency>
++       <groupId>${project.groupId}</groupId>
++       <artifactId>jibx-schema</artifactId>
++-      <version>1.2.4-SNAPSHOT</version>
+++      <version>1.2.4</version>
++     </dependency>
++ 
++-      <!-- Eclipse dependencies -->
+++      <!-- Eclipse dependencies >
++       <dependency>
++           <groupId>org.jibx.config.3rdparty.org.eclipse</groupId>
++           <artifactId>org.eclipse.core.contenttype</artifactId>
++@@ -157,7 +149,7 @@
++           <artifactId>org.eclipse.text</artifactId>
++           <version>3.5.100.v20110505-0800</version>
++           <scope>compile</scope>
++-      </dependency>
+++      </dependency-->
++   </dependencies>
++ 
++ </project>
++diff -Nru build/maven/pom.xml build/maven-gil/pom.xml
++--- build/maven/pom.xml	2012-05-02 09:51:18.000000000 +0200
+++++ build/maven-gil/pom.xml	2012-05-26 16:29:27.892538845 +0200
++@@ -2,15 +2,9 @@
++ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
++   <modelVersion>4.0.0</modelVersion>
++ 
++-  <parent>
++-    <groupId>org.jibx.config</groupId>
++-    <artifactId>core-reactor</artifactId>
++-    <version>1.2.4-SNAPSHOT</version>
++-    <relativePath>../..</relativePath>
++-  </parent>
++-
+++  <groupId>org.jibx.config</groupId>
++   <artifactId>main-reactor</artifactId>
++-  
+++  <version>1.2.4</version>
++   <packaging>pom</packaging>
++   <name>main-reactor - JiBX main reactor</name>
++   <description>JiBX main reactor</description>
+\ No newline at end of file
+-- 
+1.7.7.6
+
+
diff --git a/jibx.spec b/jibx.spec
index d3bda65..eb1d552 100644
--- a/jibx.spec
+++ b/jibx.spec
@@ -2,7 +2,7 @@
 
 Name: jibx		
 Version:	1.2.4	
-Release:	2%{?dist}
+Release:	3%{?dist}
 Summary:	Framework for binding XML data to Java objects 
 
 Group:		Development/Libraries
@@ -10,6 +10,7 @@ License:	BSD and ASL 1.1
 URL: http://sourceforge.net/projects/jibx/
 Source0:	http://sourceforge.net/projects/jibx/files/jibx/jibx-1.2.4/%{name}_1_2_4.zip
 Patch0: %{name}-classpath.patch
+Patch1: %{name}-maven-pom.patch
 BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 BuildRequires: java-devel >= 1:1.6.0
 BuildRequires: ant
@@ -48,6 +49,9 @@ This package contains the API documentation for %{name}.
 %setup -q -n %{name}
 #Patch to add the bundled jar dependencies in the classpath
 %patch0 -p1
+#Patch to add maven poms
+%patch1 -p0
+
 find -name '*.class' -exec rm -f '{}' \;
 find -name '*.jar' -exec rm -f '{}' \;
 rm -rf %{_builddir}/%{name}/build/docs/src/*
@@ -108,34 +112,42 @@ export CLASSPATH=$(build-classpath junit)
 ant current #test-multiples test-singles test-extras basic-blackbox blackbox devdoc javadoc
 
 %install
-rm -rf %{buildroot}
 install -d -m 755 %{buildroot}/%{_javadir}/%{name}
+install -d -m 755 %{buildroot}%{_mavenpomdir}
+
+install -pm 644 build/maven/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-main-reactor.pom
+%add_maven_depmap JPP.%{name}-main-reactor.pom
+
 for sub_component in bind extras run schema tools; do
-install -m 644 lib/jibx-${sub_component}.jar \
+install -m 644 lib/%{name}-${sub_component}.jar \
 %{buildroot}/%{_javadir}/%{name}/${sub_component}-%{version}.jar
+# TODO unversioned jars
+( cd %{buildroot}%{_javadir}/%{name} && ln -sf ${sub_component}-%{version}.jar ${sub_component}.jar )
+install -m 644 build/maven/jibx-${sub_component}/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-${sub_component}.pom
+%add_maven_depmap JPP.%{name}-${sub_component}.pom %{name}/${sub_component}.jar
 done
 
-
 mkdir -p %{buildroot}/%{_javadocdir}/%{name}
 cp -rp %{_builddir}/%{name}/build/docs/* \
 %{buildroot}/%{_javadocdir}/%{name}/
 
 
-%clean
-rm -rf %{buildroot}
-
-
-
 %files
 %defattr(-,root,root,-)
 %{_javadir}/%{name}/*.jar
 %dir %{_javadir}/%{name}
+%{_mavenpomdir}/JPP.%{name}-*.pom
+%{_mavendepmapfragdir}/%{name}
 
 %files javadoc
 %defattr(-,root,root,-)
 %{_javadocdir}/%{name}
 
 %changelog
+* Sat May 29 2012 Johannes Lips <hannes at fedoraproject.org> - 1.2.4-3
+- add maven pom (patch from Gil Cattaneo #825465)
+- minor changes to adapt to guideline changes
+
 * Sun May 20 2012 Johannes Lips <johannes.lips at googlemail.com> - 1.2.4-2
 - removed the empty debuginfo subpackage caused by the removal of noarch
  


More information about the scm-commits mailing list