Convert patch to POM macros
This commit is contained in:
parent
3b69969d2f
commit
fde059ff83
2 changed files with 135 additions and 9 deletions
31
activeio-3.1.4-howl-logger.patch
Normal file
31
activeio-3.1.4-howl-logger.patch
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
--- activeio-core/src/main/java/org/apache/activeio/journal/howl/HowlJournal.java 2006-11-17 01:40:53.000000000 +0100
|
||||
+++ activeio-core/src/main/java/org/apache/activeio/journal/howl/HowlJournal.java-gil 2012-09-14 12:36:16.560310926 +0200
|
||||
@@ -147,6 +147,28 @@
|
||||
public void logOverflowNotification(long key) {
|
||||
eventListener.overflowNotification(new LongRecordLocation(key));
|
||||
}
|
||||
+ /////// howl-logger 1.0.2 demarcation///////
|
||||
+ /* (non-Javadoc)
|
||||
+ * @see org.objectweb.howl.log.LogEventListener#log(int,java.lang.String,java.lang.Throwable)
|
||||
+ */
|
||||
+ public void log(int level, String message, Throwable thrown) {
|
||||
+ // TODO Auto-generated method stub
|
||||
+ throw new AbstractMethodError();
|
||||
+ }
|
||||
+ /* (non-Javadoc)
|
||||
+ * @see org.objectweb.howl.log.LogEventListener#log(int,java.lang.String)
|
||||
+ */
|
||||
+ public void log(int level, String message) {
|
||||
+ // TODO Auto-generated method stub
|
||||
+ throw new AbstractMethodError();
|
||||
+ }
|
||||
+ /* (non-Javadoc)
|
||||
+ * @see org.objectweb.howl.log.LogEventListener#isLoggable(int)
|
||||
+ */
|
||||
+ public boolean isLoggable(int level) {
|
||||
+ // TODO Auto-generated method stub
|
||||
+ throw new AbstractMethodError();
|
||||
+ }
|
||||
});
|
||||
}
|
||||
|
||||
113
activeio.spec
113
activeio.spec
|
|
@ -1,6 +1,6 @@
|
|||
Name: activeio
|
||||
Version: 3.1.4
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Apache ActiveMQ ActiveIO :: Core
|
||||
Group: Development/Libraries
|
||||
License: ASL 2.0
|
||||
|
|
@ -8,19 +8,19 @@ Url: http://activemq.apache.org/
|
|||
# svn export http://svn.apache.org/repos/asf/activemq/activeio/tags/activeio-parent-3.1.4/ activeio-3.1.4
|
||||
# tar czf activeio-3.1.4-src-svn.tar.gz activeio-3.1.4
|
||||
Source0: activeio-3.1.4-src-svn.tar.gz
|
||||
# remove how-logger integration
|
||||
# remove ianal-maven-plugin maven-assembly-plugin(unavailable deps org.apache.geronimo.genesis apache-source-release-assembly-descriptor 2.0) taglist-maven-plugin
|
||||
# change geronimo-j2ee-management_1.1_spec with jboss-j2eemgmt-api_1.1_spec
|
||||
# change rat-maven-plugin with apache-rat-plugin
|
||||
# add junit for test
|
||||
Patch0: activeio-3.1.4-fixbuild.patch
|
||||
# build fix for howl-logger 1.0.2
|
||||
Patch0: activeio-3.1.4-howl-logger.patch
|
||||
|
||||
BuildRequires: java-devel
|
||||
BuildRequires: jpackage-utils
|
||||
|
||||
BuildRequires: apache-commons-logging
|
||||
%if 0
|
||||
BuildRequires: howl-logger
|
||||
%endif
|
||||
BuildRequires: jboss-j2eemgmt-1.1-api
|
||||
|
||||
BuildRequires: junit4
|
||||
BuildRequires: junit
|
||||
|
||||
BuildRequires: maven
|
||||
BuildRequires: maven-compiler-plugin
|
||||
|
|
@ -34,6 +34,9 @@ BuildRequires: maven-surefire-plugin
|
|||
BuildRequires: maven-surefire-provider-junit4
|
||||
|
||||
Requires: apache-commons-logging
|
||||
%if 0
|
||||
Requires: howl-logger
|
||||
%endif
|
||||
Requires: jboss-j2eemgmt-1.1-api
|
||||
|
||||
Requires: java
|
||||
|
|
@ -53,7 +56,96 @@ This package contains javadoc for %{name}.
|
|||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%pom_remove_plugin org.codehaus.mojo:ianal-maven-plugin
|
||||
%pom_remove_plugin org.codehaus.mojo:taglist-maven-plugin
|
||||
%pom_remove_plugin org.apache.maven.plugins:maven-assembly-plugin
|
||||
|
||||
%pom_remove_dep org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec
|
||||
%pom_xpath_inject "pom:project/pom:dependencyManagement/pom:dependencies" "
|
||||
<dependency>
|
||||
<groupId>org.jboss.spec.javax.management.j2ee</groupId>
|
||||
<artifactId>jboss-j2eemgmt-api_1.1_spec</artifactId>
|
||||
<version>1.0.1.Final</version>
|
||||
</dependency>"
|
||||
|
||||
%pom_remove_plugin org.codehaus.mojo:rat-maven-plugin
|
||||
%pom_xpath_inject "pom:project/pom:build/pom:pluginManagement/pom:plugins" "
|
||||
<plugin>
|
||||
<groupId>org.apache.rat</groupId>
|
||||
<artifactId>apache-rat-plugin</artifactId>
|
||||
<version>0.8-SNAPSHOT</version>
|
||||
<configuration>
|
||||
<excludeSubProjects>false</excludeSubProjects>
|
||||
</configuration>
|
||||
</plugin>"
|
||||
|
||||
%pom_remove_dep org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec %{name}-core/pom.xml
|
||||
%pom_xpath_inject "pom:project/pom:dependencies" "
|
||||
<dependency>
|
||||
<groupId>org.jboss.spec.javax.management.j2ee</groupId>
|
||||
<artifactId>jboss-j2eemgmt-api_1.1_spec</artifactId>
|
||||
<version>1.0.1.Final</version>
|
||||
</dependency>" %{name}-core/pom.xml
|
||||
|
||||
%pom_xpath_inject "pom:project/pom:dependencies" "
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.10</version>
|
||||
<scope>test</scope>
|
||||
</dependency>" %{name}-core/pom.xml
|
||||
|
||||
# TODO remove when howl-logger is available
|
||||
%if 0
|
||||
sed -i "s|<howl-version>0.1.8|<howl-version>1.0.2|" pom.xml
|
||||
%pom_remove_dep howl:howl-logger
|
||||
%pom_xpath_inject "pom:project/pom:dependencyManagement/pom:dependencies" '
|
||||
<dependency>
|
||||
<groupId>org.objectweb.howl</groupId>
|
||||
<artifactId>howl</artifactId>
|
||||
<version>${howl-version}</version>
|
||||
</dependency>'
|
||||
%pom_xpath_inject "pom:project/pom:dependencies" "
|
||||
<dependency>
|
||||
<groupId>org.objectweb.howl</groupId>
|
||||
<artifactId>howl</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>" %{name}-core/pom.xml
|
||||
%patch0 -p0
|
||||
%else
|
||||
%pom_remove_dep howl:howl-logger %{name}-core/pom.xml
|
||||
%pom_xpath_inject "pom:project/pom:build/pom:plugins" "
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>default-compile</id>
|
||||
<phase>compile</phase>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>**/HowlJournal.*</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>default-testCompile</id>
|
||||
<phase>test-compile</phase>
|
||||
<configuration>
|
||||
<testExcludes>
|
||||
<exclude>**/JournalPerfTool.*</exclude>
|
||||
</testExcludes>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>testCompile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>" %{name}-core/pom.xml
|
||||
%endif
|
||||
|
||||
sed -i 's/\r//' NOTICE
|
||||
|
||||
|
|
@ -89,5 +181,8 @@ cp -rp target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
|
|||
%doc LICENSE NOTICE
|
||||
|
||||
%changelog
|
||||
* Fri Sep 14 2012 gil cattaneo <puntogil@libero.it> 3.1.4-2
|
||||
- Convert patch to POM macros
|
||||
|
||||
* Fri May 18 2012 gil cattaneo <puntogil@libero.it> 3.1.4-1
|
||||
- initial rpm
|
||||
Reference in a new issue