forked from pool/mybatis
Accepting request 781422 from home:fstrba:maven
new package OBS-URL: https://build.opensuse.org/request/show/781422 OBS-URL: https://build.opensuse.org/package/show/Java:packages/mybatis?expand=0&rev=1
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 4 09:45:57 UTC 2020 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Initial packaging of mybatis 3.5.3
|
||||
@@ -0,0 +1,99 @@
|
||||
#
|
||||
# spec file for package mybatis
|
||||
#
|
||||
# Copyright (c) 2019 SUSE LLC.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%bcond_with test
|
||||
Name: mybatis
|
||||
Version: 3.5.3
|
||||
Release: 0
|
||||
Summary: SQL Mapping Framework for Java
|
||||
# http://code.google.com/p/mybatis/
|
||||
License: Apache-2.0
|
||||
URL: https://www.mybatis.org/
|
||||
Source0: https://github.com/mybatis/mybatis-3/archive/%{name}-%{version}.tar.gz
|
||||
Patch0: mybatis-3.5.3-commons-ognl.patch
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: maven-local
|
||||
BuildRequires: mvn(cglib:cglib)
|
||||
BuildRequires: mvn(commons-logging:commons-logging)
|
||||
BuildRequires: mvn(log4j:log4j:1.2.17)
|
||||
BuildRequires: mvn(org.apache.commons:commons-ognl)
|
||||
BuildRequires: mvn(org.apache.logging.log4j:log4j-core)
|
||||
BuildRequires: mvn(org.apache.maven.wagon:wagon-ssh)
|
||||
BuildRequires: mvn(org.javassist:javassist)
|
||||
BuildRequires: mvn(org.mybatis:mybatis-parent:pom:)
|
||||
BuildRequires: mvn(org.slf4j:slf4j-api)
|
||||
BuildRequires: mvn(org.slf4j:slf4j-log4j12)
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
The MyBatis data mapper framework makes it easier
|
||||
to use a relational database with object-oriented
|
||||
applications. MyBatis couples objects with stored
|
||||
procedures or SQL statements using a XML descriptor
|
||||
or annotations. Simplicity is the biggest advantage
|
||||
of the MyBatis data mapper over object relational
|
||||
mapping tools.
|
||||
|
||||
To use the MyBatis data mapper, you rely on your
|
||||
own objects, XML, and SQL. There is little to
|
||||
learn that you don't already know. With the
|
||||
MyBatis data mapper, you have the full power of
|
||||
both SQL and stored procedures at your fingertips.
|
||||
|
||||
The MyBatis project is developed and maintained by
|
||||
a team that includes the original creators of the
|
||||
"iBATIS" data mapper. The Apache project was retired
|
||||
and continued here.
|
||||
|
||||
%package javadoc
|
||||
Summary: Javadoc for %{name}
|
||||
|
||||
%description javadoc
|
||||
This package contains javadoc for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-3-%{name}-%{version}
|
||||
|
||||
%pom_change_dep ognl:ognl org.apache.commons:commons-ognl:4.0-SNAPSHOT
|
||||
%patch0 -p1
|
||||
|
||||
%pom_remove_plugin :maven-pdf-plugin
|
||||
%pom_remove_plugin :maven-shade-plugin
|
||||
|
||||
sed -i 's/\r//' LICENSE NOTICE
|
||||
|
||||
%{mvn_file} :%{name} %{name}
|
||||
|
||||
%build
|
||||
%{mvn_build} -f -- \
|
||||
%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 9}%{!?pkg_vcmp:0}
|
||||
-Dmaven.compiler.release=8 \
|
||||
%endif
|
||||
-Dproject.build.sourceEncoding=UTF-8
|
||||
|
||||
%install
|
||||
%mvn_install
|
||||
%fdupes -s %{buildroot}%{_javadocdir}
|
||||
|
||||
%files -f .mfiles
|
||||
%license LICENSE NOTICE
|
||||
|
||||
%files javadoc -f .mfiles-javadoc
|
||||
%license LICENSE NOTICE
|
||||
|
||||
%changelog
|
||||
@@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
@@ -0,0 +1 @@
|
||||
.osc
|
||||
@@ -0,0 +1,82 @@
|
||||
--- mybatis-3-mybatis-3.5.3/src/main/java/org/apache/ibatis/scripting/xmltags/DynamicContext.java 2019-10-20 12:19:07.000000000 +0200
|
||||
+++ mybatis-3-mybatis-3.5.3/src/main/java/org/apache/ibatis/scripting/xmltags/DynamicContext.java 2019-11-18 09:50:27.820354865 +0100
|
||||
@@ -19,9 +19,9 @@
|
||||
import java.util.Map;
|
||||
import java.util.StringJoiner;
|
||||
|
||||
-import ognl.OgnlContext;
|
||||
-import ognl.OgnlRuntime;
|
||||
-import ognl.PropertyAccessor;
|
||||
+import org.apache.commons.ognl.OgnlContext;
|
||||
+import org.apache.commons.ognl.OgnlRuntime;
|
||||
+import org.apache.commons.ognl.MapPropertyAccessor;
|
||||
|
||||
import org.apache.ibatis.reflection.MetaObject;
|
||||
import org.apache.ibatis.session.Configuration;
|
||||
@@ -104,7 +104,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- static class ContextAccessor implements PropertyAccessor {
|
||||
+ static class ContextAccessor extends MapPropertyAccessor {
|
||||
|
||||
@Override
|
||||
public Object getProperty(Map context, Object target, Object name) {
|
||||
--- mybatis-3-mybatis-3.5.3/src/main/java/org/apache/ibatis/scripting/xmltags/OgnlCache.java 2019-10-20 12:19:07.000000000 +0200
|
||||
+++ mybatis-3-mybatis-3.5.3/src/main/java/org/apache/ibatis/scripting/xmltags/OgnlCache.java 2019-11-18 09:53:28.329413177 +0100
|
||||
@@ -18,8 +18,8 @@
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
-import ognl.Ognl;
|
||||
-import ognl.OgnlException;
|
||||
+import org.apache.commons.ognl.Ognl;
|
||||
+import org.apache.commons.ognl.OgnlException;
|
||||
|
||||
import org.apache.ibatis.builder.BuilderException;
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
public static Object getValue(String expression, Object root) {
|
||||
try {
|
||||
- Map context = Ognl.createDefaultContext(root, MEMBER_ACCESS, CLASS_RESOLVER, null);
|
||||
+ Map context = Ognl.createDefaultContext(root, CLASS_RESOLVER, null, MEMBER_ACCESS);
|
||||
return Ognl.getValue(parseExpression(expression), context, root);
|
||||
} catch (OgnlException e) {
|
||||
throw new BuilderException("Error evaluating expression '" + expression + "'. Cause: " + e, e);
|
||||
--- mybatis-3-mybatis-3.5.3/src/main/java/org/apache/ibatis/scripting/xmltags/OgnlClassResolver.java 2019-10-20 12:19:07.000000000 +0200
|
||||
+++ mybatis-3-mybatis-3.5.3/src/main/java/org/apache/ibatis/scripting/xmltags/OgnlClassResolver.java 2019-11-18 10:00:28.603874818 +0100
|
||||
@@ -15,9 +15,11 @@
|
||||
*/
|
||||
package org.apache.ibatis.scripting.xmltags;
|
||||
|
||||
-import ognl.DefaultClassResolver;
|
||||
+import org.apache.commons.ognl.DefaultClassResolver;
|
||||
import org.apache.ibatis.io.Resources;
|
||||
|
||||
+import java.util.Map;
|
||||
+
|
||||
/**
|
||||
* Custom ognl {@code ClassResolver} which behaves same like ognl's
|
||||
* {@code DefaultClassResolver}. But uses the {@code Resources}
|
||||
@@ -30,7 +32,8 @@
|
||||
public class OgnlClassResolver extends DefaultClassResolver {
|
||||
|
||||
@Override
|
||||
- protected Class toClassForName(String className) throws ClassNotFoundException {
|
||||
+ public Class classForName(String className, Map<String, Object> unused )
|
||||
+ throws ClassNotFoundException {
|
||||
return Resources.classForName(className);
|
||||
}
|
||||
|
||||
--- mybatis-3-mybatis-3.5.3/src/main/java/org/apache/ibatis/scripting/xmltags/OgnlMemberAccess.java 2019-10-20 12:19:07.000000000 +0200
|
||||
+++ mybatis-3-mybatis-3.5.3/src/main/java/org/apache/ibatis/scripting/xmltags/OgnlMemberAccess.java 2019-11-18 09:50:27.820354865 +0100
|
||||
@@ -19,7 +19,7 @@
|
||||
import java.lang.reflect.Member;
|
||||
import java.util.Map;
|
||||
|
||||
-import ognl.MemberAccess;
|
||||
+import org.apache.commons.ognl.MemberAccess;
|
||||
|
||||
import org.apache.ibatis.reflection.Reflector;
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:677de364228e2ef1231f301b8de66fd054bb65c2a6f958854d982cad8a03c8fc
|
||||
size 874632
|
||||
Reference in New Issue
Block a user