Convert patches to POM macros

This commit is contained in:
Mikolaj Izdebski 2012-07-12 10:08:34 +02:00
parent f6dacd580c
commit 598b900ce3
4 changed files with 5 additions and 270 deletions

View File

@ -1,160 +0,0 @@
From f246eb5c5ac4f19e93706630b39ce27cea1918e1 Mon Sep 17 00:00:00 2001
From: Stanislav Ochotnicky <sochotnicky@redhat.com>
Date: Mon, 5 Dec 2011 14:15:52 +0100
Subject: [PATCH 1/4] Remove optional deps
---
pom.xml | 129 ---------------------------------------------------------------
1 files changed, 0 insertions(+), 129 deletions(-)
diff --git a/pom.xml b/pom.xml
index a1597fe..77fb611 100644
--- a/pom.xml
+++ b/pom.xml
@@ -116,13 +116,13 @@
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-spi</artifactId>
+ <artifactId>jboss-logging</artifactId>
<version>2.1.2.GA</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
@@ -462,128 +455,6 @@
</configuration>
</plugin>
<plugin>
- <artifactId>maven-jxr-plugin</artifactId>
- <version>2.2</version>
- <executions>
- <execution>
- <id>generate-xref</id>
- <phase>package</phase>
- <goals>
- <goal>jxr</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <inputEncoding>UTF-8</inputEncoding>
- <outputEncoding>UTF-8</outputEncoding>
- <linkJavadoc>true</linkJavadoc>
- <destDir>${project.build.directory}/xref</destDir>
- <javadocDir>${project.build.directory}/api</javadocDir>
- <stylesheet>${basedir}/src/xref/stylesheet.css</stylesheet>
- <docTitle>${project.name} Source Xref (${project.version})</docTitle>
- <windowTitle>${project.name} Source Xref (${project.version})</windowTitle>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.jboss.maven.plugins</groupId>
- <artifactId>maven-jdocbook-plugin</artifactId>
- <version>2.2.1</version>
- <executions>
- <execution>
- <id>generate-docbook</id>
- <phase>package</phase>
- <goals>
- <goal>resources</goal>
- <goal>generate</goal>
- </goals>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jbossorg-docbook-xslt</artifactId>
- <version>1.1.0</version>
- <exclusions>
- <exclusion>
- <groupId>org.eclipse.wst.css</groupId>
- <artifactId>core</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.eclipse.wst.sse</groupId>
- <artifactId>core</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jbossorg-jdocbook-style</artifactId>
- <version>1.1.0</version>
- <type>jdocbook-style</type>
- <exclusions>
- <exclusion>
- <groupId>org.eclipse.wst.css</groupId>
- <artifactId>core</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.eclipse.wst.sse</groupId>
- <artifactId>core</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jbossorg-fonts</artifactId>
- <version>1.0.0</version>
- <type>jdocbook-style</type>
- </dependency>
- </dependencies>
- <configuration>
- <sourceDocumentName>master.xml</sourceDocumentName>
- <sourceDirectory>${basedir}/src/docbook</sourceDirectory>
- <cssResource>
- <directory>${basedir}/src/docbook</directory>
- <includes>
- <include>css/**/*</include>
- </includes>
- </cssResource>
- <imageResource>
- <directory>${basedir}/src/docbook</directory>
- <includes>
- <include>images/**/*</include>
- </includes>
- </imageResource>
- <formats>
- <format>
- <formatName>html</formatName>
- <stylesheetResource>file:///${basedir}/src/docbook/xslt/xhtml.xsl</stylesheetResource>
- <finalName>index.html</finalName>
- </format>
- <format>
- <formatName>html_single</formatName>
- <stylesheetResource>file:///${basedir}/src/docbook/xslt/xhtml-single.xsl</stylesheetResource>
- <finalName>index.html</finalName>
- </format>
- <format>
- <formatName>eclipse</formatName>
- <stylesheetResource>file:///${basedir}/src/docbook/xslt/eclipse.xsl</stylesheetResource>
- <finalName>index.html</finalName>
- </format>
- <format>
- <formatName>pdf</formatName>
- <stylesheetResource>file:///${basedir}/src/docbook/xslt/pdf.xsl</stylesheetResource>
- <finalName>netty.pdf</finalName>
- </format>
- </formats>
- <options>
- <xincludeSupported>true</xincludeSupported>
- <xmlTransformerType>saxon</xmlTransformerType>
- <docbookVersion>1.72.0</docbookVersion>
- <localeSeparator>-</localeSeparator>
- <autoDetectFonts>true</autoDetectFonts>
- </options>
- </configuration>
- </plugin>
- <plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2</version>
<executions>
--
1.7.7.3

View File

@ -1,71 +0,0 @@
From e25559365fd6bd5ff6942351bc53ab0a5a61ef77 Mon Sep 17 00:00:00 2001
From: Stanislav Ochotnicky <sochotnicky@redhat.com>
Date: Mon, 5 Dec 2011 15:52:27 +0100
Subject: [PATCH 4/4] Remove antun execution for removing examples
For some reason -sources.jar is not generated before so it
fails. Should investigate one of these days...
---
pom.xml | 46 ----------------------------------------------
1 files changed, 0 insertions(+), 46 deletions(-)
diff --git a/pom.xml b/pom.xml
index 8615b36..443b4c8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -324,52 +324,6 @@
</tasks>
</configuration>
</execution>
- <execution>
- <id>remove-examples</id>
- <phase>package</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <taskdef resource="net/sf/antcontrib/antlib.xml" />
- <if>
- <or>
- <equals arg2="jar" arg1="${project.packaging}" />
- <equals arg2="bundle" arg1="${project.packaging}" />
- </or>
- <then>
- <move file="${project.build.directory}/${project.build.finalName}.jar" tofile="${project.build.directory}/${project.build.finalName}.orig.jar" />
- <zip destfile="${project.build.directory}/${project.build.finalName}.jar">
- <zipfileset filemode="644" src="${project.build.directory}/${project.build.finalName}.orig.jar" dirmode="755">
- <include name="META-INF/MANIFEST.MF" />
- </zipfileset>
- <zipfileset filemode="644" src="${project.build.directory}/${project.build.finalName}.orig.jar" dirmode="755">
- <exclude name="META-INF/MANIFEST.MF" />
- <exclude name="*/*/*/example/**" />
- </zipfileset>
- </zip>
- <delete file="${project.build.directory}/${project.build.finalName}.orig.jar" />
- <checksum file="${project.build.directory}/${project.build.finalName}.jar" algorithm="md5" forceoverwrite="yes" />
- <checksum file="${project.build.directory}/${project.build.finalName}.jar" algorithm="sha1" forceoverwrite="yes" />
- <move file="${project.build.directory}/${project.build.finalName}-sources.jar" tofile="${project.build.directory}/${project.build.finalName}-sources.orig.jar" />
- <zip destfile="${project.build.directory}/${project.build.finalName}-sources.jar">
- <zipfileset filemode="644" src="${project.build.directory}/${project.build.finalName}-sources.orig.jar" dirmode="755">
- <include name="META-INF/MANIFEST.MF" />
- </zipfileset>
- <zipfileset filemode="644" src="${project.build.directory}/${project.build.finalName}-sources.orig.jar" dirmode="755">
- <exclude name="META-INF/MANIFEST.MF" />
- <exclude name="*/*/*/example/**" />
- </zipfileset>
- </zip>
- <delete file="${project.build.directory}/${project.build.finalName}-sources.orig.jar" />
- <checksum file="${project.build.directory}/${project.build.finalName}-sources.jar" algorithm="md5" forceoverwrite="yes" />
- <checksum file="${project.build.directory}/${project.build.finalName}-sources.jar" algorithm="sha1" forceoverwrite="yes" />
- </then>
- </if>
- </tasks>
- </configuration>
- </execution>
</executions>
<dependencies>
<dependency>
--
1.7.7.3

View File

@ -1,32 +0,0 @@
From 709d4e6424139863289fad36c7cc88c6a2949f03 Mon Sep 17 00:00:00 2001
From: Stanislav Ochotnicky <sochotnicky@redhat.com>
Date: Wed, 18 Apr 2012 18:30:33 +0200
Subject: [PATCH 5/5] Remove eclipse plugin
---
pom.xml | 9 ---------
1 files changed, 0 insertions(+), 9 deletions(-)
diff --git a/pom.xml b/pom.xml
index 443b4c8..713c1a2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -424,15 +424,6 @@
<arguments>-Prelease</arguments>
</configuration>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-eclipse-plugin</artifactId>
- <version>2.8</version>
- <configuration>
- <downloadSources>true</downloadSources>
- <addVersionToProjectName>true</addVersionToProjectName>
- </configuration>
- </plugin>
</plugins>
</build>
</project>
--
1.7.7.6

View File

@ -8,10 +8,6 @@ License: ASL 2.0
URL: http://www.jboss.org/netty
Source0: http://sourceforge.net/projects/jboss/files/%{name}-%{version}.Final-dist.tar.bz2
Patch1: 0001-Remove-optional-deps.patch
Patch4: 0004-Remove-antun-execution-for-removing-examples.patch
Patch5: 0005-Remove-eclipse-plugin.patch
BuildArch: noarch
# This pulls in all of the required java and maven stuff
@ -26,6 +22,7 @@ BuildRequires: maven-release-plugin
BuildRequires: maven-source-plugin
BuildRequires: maven-surefire-plugin
BuildRequires: maven-plugin-bundle
BuildRequires: maven-plugin-jxr
BuildRequires: buildnumber-maven-plugin
BuildRequires: ant-contrib
BuildRequires: subversion
@ -71,9 +68,10 @@ rm -rf jar/
# example doesn't build with our protobuf
rm -rf src/main/java/org/jboss/netty/example/localtime
%patch1 -p1
%patch4 -p1
%patch5 -p1
%pom_remove_plugin :maven-eclipse-plugin
%pom_remove_plugin :maven-jdocbook-plugin
%pom_xpath_remove "pom:execution[pom:id[text()='remove-examples']]"
sed -i s/-spi// pom.xml
%build
# skipping tests because we don't have all dependencies in Fedora