commit e6f0c5a53bfd370dbea15ac3e1ceb97a76c8df26
Author: Stanislav Ochotnicky <sochotnicky(a)redhat.com>
Date: Thu Apr 21 14:07:33 2011 +0200
Build with maven 3
- Fix build for avalon-framework
apache-commons-logging.spec | 30 +++++++++++++++++++-----------
commons-logging-avalon-update.patch | 29 +++++++++++++++++++++++++++++
commons-logging.depmap | 30 ++++++++++++++----------------
3 files changed, 62 insertions(+), 27 deletions(-)
---
diff --git a/apache-commons-logging.spec b/apache-commons-logging.spec
index e126282..d9c8baa 100644
--- a/apache-commons-logging.spec
+++ b/apache-commons-logging.spec
@@ -4,7 +4,7 @@
Name: apache-%{short_name}
Version: 1.1.1
-Release: 15%{?dist}
+Release: 16%{?dist}
Summary: Apache Commons Logging
License: ASL 2.0
Group: Development/Libraries
@@ -12,15 +12,19 @@ URL:
http://commons.apache.org/%{base_name}
Source0:
http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{ve...
Source1: %{short_name}.depmap
Source2:
http://mirrors.ibiblio.org/pub/mirrors/maven2/%{short_name}/%{short_name}...
+# Sent upstream
https://issues.apache.org/jira/browse/LOGGING-143
+Patch0: %{short_name}-avalon-update.patch
+
Patch1: %{short_name}-eclipse-manifest.patch
-Patch0: %{short_name}-maven-release-plugin.patch
BuildArch: noarch
+BuildRequires: maven
BuildRequires: java-devel >= 1:1.6.0
BuildRequires: jpackage-utils >= 0:1.6
-BuildRequires: avalon-framework
+BuildRequires: avalon-framework >= 4.3
BuildRequires: avalon-logkit
BuildRequires: apache-commons-parent
BuildRequires: maven-plugin-build-helper
+BuildRequires: maven-release-plugin
BuildRequires: maven-site-plugin
BuildRequires: servlet25
@@ -59,7 +63,7 @@ Obsoletes: jakarta-%{short_name}-javadoc <= 0:1.0.4
%prep
%setup -q -n %{short_name}-%{version}-src
-%patch0 -p1 -b .rhbug_588142
+%patch0 -p1
%patch1
sed -i 's/\r//' RELEASE-NOTES.txt LICENSE.txt
@@ -67,16 +71,16 @@ sed -i 's/\r//' RELEASE-NOTES.txt LICENSE.txt
# -----------------------------------------------------------------------------
%build
-export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
-mkdir -p $MAVEN_REPO_LOCAL
-
# fails with recent surefire for some reason
rm src/test/org/apache/commons/logging/logkit/StandardTestCase.java
rm src/test/org/apache/commons/logging/servlet/BasicServletTestCase.java
-mvn-jpp -e -Dmaven2.jpp.depmap.file="%{SOURCE1}" \
- -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
- install javadoc:javadoc
+# These files have names suggesting they are test cases but they are not.
+# They should probably be renamed/excluded from surefire run properly
+rm src/test/org/apache/commons/logging/log4j/log4j12/*StandardTestCase.java
+
+mvn-rpmbuild -X -Dmaven.local.depmap.file="%{SOURCE1}" \
+ install javadoc:aggregate
# -----------------------------------------------------------------------------
@@ -91,7 +95,7 @@ pushd $RPM_BUILD_ROOT%{_javadir}
for jar in %{name}*; do
ln -sf ${jar} `echo $jar| sed "s|apache-||g"`
done
-popd
+popd
# pom
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
@@ -145,6 +149,10 @@ rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name}
|| :
# -----------------------------------------------------------------------------
%changelog
+* Thu Apr 21 2011 Stanislav Ochotnicky <sochotnicky(a)redhat.com> - 1.1.1-16
+- Build with maven 3
+- Fix build for avalon-framework
+
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.1.1-15
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
diff --git a/commons-logging-avalon-update.patch b/commons-logging-avalon-update.patch
new file mode 100644
index 0000000..aadaaa7
--- /dev/null
+++ b/commons-logging-avalon-update.patch
@@ -0,0 +1,29 @@
+diff --git a/pom.xml b/pom.xml
+index 8efaf6d..24dc9fb 100644
+--- a/pom.xml
++++ b/pom.xml
+@@ -472,8 +472,15 @@ under the License.
+ </dependency>
+ <dependency>
+ <groupId>avalon-framework</groupId>
+- <artifactId>avalon-framework</artifactId>
+- <version>4.1.3</version>
++ <artifactId>avalon-framework-api</artifactId>
++ <version>4.3</version>
++ <optional>true</optional>
++ </dependency>
++ <dependency>
++ <groupId>avalon-framework</groupId>
++ <artifactId>avalon-framework-impl</artifactId>
++ <version>4.3</version>
++ <scope>test</scope>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+@@ -520,4 +527,4 @@ under the License.
+ <maven.compile.source>1.2</maven.compile.source>
+ <maven.compile.target>1.1</maven.compile.target>
+ </properties>
+-</project>
+\ No newline at end of file
++</project>
diff --git a/commons-logging.depmap b/commons-logging.depmap
index 24c689a..1059072 100644
--- a/commons-logging.depmap
+++ b/commons-logging.depmap
@@ -1,36 +1,34 @@
<dependencies>
<dependency>
<maven>
- <groupId>logkit</groupId>
- <artifactId>logkit</artifactId>
- <version>1.0.1</version>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
</maven>
<jpp>
<groupId>JPP</groupId>
- <artifactId>avalon-logkit</artifactId>
- <version>1.0.8</version>
+ <artifactId>tomcat6-servlet-2.5-api</artifactId>
</jpp>
</dependency>
<dependency>
<maven>
- <groupId>avalon-framework</groupId>
- <artifactId>avalon-framework</artifactId>
- <version>4.1.3</version>
+ <groupId>servletapi</groupId>
+ <artifactId>servletapi</artifactId>
</maven>
<jpp>
<groupId>JPP</groupId>
- <artifactId>avalon-framework</artifactId>
- <version>4.1.4</version>
+ <artifactId>tomcat6-servlet-2.5-api</artifactId>
</jpp>
</dependency>
<dependency>
<maven>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
+ <groupId>geronimo-spec</groupId>
+ <artifactId>geronimo-spec-javamail</artifactId>
+ </maven>
+ </dependency>
+ <dependency>
+ <maven>
+ <groupId>geronimo-spec</groupId>
+ <artifactId>geronimo-spec-jms</artifactId>
</maven>
- <jpp>
- <groupId>JPP</groupId>
- <artifactId>tomcat6-servlet-2.5-api</artifactId>
- </jpp>
</dependency>
</dependencies>