[springframework-batch] fix build
gil
gil at fedoraproject.org
Tue Dec 30 11:11:33 UTC 2014
commit c8653d0d1f5a5d13e07f623c6e6ff4c98f743231
Author: gil <puntogil at libero.it>
Date: Tue Dec 30 12:11:29 2014 +0100
fix build
springframework-batch-2.1.9-core-StepScope.patch | 30 ++++++++++++++++++++++
springframework-batch.spec | 13 +++++++--
2 files changed, 40 insertions(+), 3 deletions(-)
---
diff --git a/springframework-batch-2.1.9-core-StepScope.patch b/springframework-batch-2.1.9-core-StepScope.patch
new file mode 100644
index 0000000..b3d85ab
--- /dev/null
+++ b/springframework-batch-2.1.9-core-StepScope.patch
@@ -0,0 +1,30 @@
+--- spring-batch-core/src/main/java/org/springframework/batch/core/scope/StepScope.java 2012-08-21 10:27:57.000000000 +0200
++++ spring-batch-core/src/main/java/org/springframework/batch/core/scope/StepScope.java-gil 2014-12-30 11:48:32.031282773 +0100
+@@ -20,7 +20,6 @@
+ import org.springframework.aop.scope.ScopedProxyUtils;
+ import org.springframework.batch.core.scope.context.StepContext;
+ import org.springframework.batch.core.scope.context.StepSynchronizationManager;
+-import org.springframework.batch.core.scope.util.PlaceholderProxyFactoryBean;
+ import org.springframework.beans.BeanWrapper;
+ import org.springframework.beans.BeanWrapperImpl;
+ import org.springframework.beans.BeansException;
+@@ -272,16 +271,9 @@
+
+ BeanDefinitionHolder proxyHolder;
+
+- if (isSpringThree()) {
+- proxyHolder = ScopedProxyUtils.createScopedProxy(new BeanDefinitionHolder(definition, beanName), registry,
+- proxyTargetClass);
+- }
+- else {
+- // Create the scoped proxy...
+- proxyHolder = PlaceholderProxyFactoryBean.createScopedProxy(new BeanDefinitionHolder(definition, beanName),
+- registry, proxyTargetClass);
+- // ...and register it under the original target name
+- }
++ proxyHolder = ScopedProxyUtils.createScopedProxy(new BeanDefinitionHolder(definition, beanName), registry,
++ proxyTargetClass);
++
+ registry.registerBeanDefinition(beanName, proxyHolder.getBeanDefinition());
+
+ return proxyHolder;
diff --git a/springframework-batch.spec b/springframework-batch.spec
index f641d61..b8514b7 100644
--- a/springframework-batch.spec
+++ b/springframework-batch.spec
@@ -11,8 +11,7 @@ URL: http://www.springsource.org/spring-batch
# lastest release require springframework >= 3.2.0.RELEASE
Source0: https://github.com/spring-projects/%{oname}/archive/%{namedversion}.tar.gz
Patch0: %{name}-2.1.9-core-add-missing-beans-method.patch
-
-BuildRequires: java-devel
+Patch1: %{name}-2.1.9-core-StepScope.patch
BuildRequires: hibernate3
BuildRequires: hibernate3-entitymanager
@@ -84,6 +83,14 @@ This package contains javadoc for %{name}.
%prep
%setup -q -n %{oname}-%{namedversion}
%patch0 -p0
+# Remove problems with Java 8
+# spring-batch-core/src/main/java/org/springframework/batch/core/scope/util/PlaceholderTargetSource.java:[163,40] reference to convertIfNecessary is ambiguous
+# [ERROR] both method convertIfNecessary(java.lang.Object,java.lang.Class,org.springframework.core.MethodParameter)
+# in <anonymous org.springframework.batch.core.scope.util.PlaceholderTargetSource$1> and
+# method <T>convertIfNecessary(java.lang.Object,java.lang.Class<T>,java.lang.reflect.Field)
+# in <anonymous org.springframework.batch.core.scope.util.PlaceholderTargetSource$1> match
+%patch1 -p0
+rm -r spring-batch-core/src/main/java/org/springframework/batch/core/scope/util
cp -p src/assembly/license.txt .
cp -p src/assembly/notice.txt .
@@ -297,4 +304,4 @@ sed -i "s|<version>1.2.14</version>|<version>1.2.17</version>|" spring-batch-par
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Thu Nov 29 2012 gil cattaneo <puntogil at libero.it> 2.1.9-1
-- initial rpm
\ No newline at end of file
+- initial rpm
More information about the scm-commits
mailing list