From 478eca048a96ec99611c99feba834f5fd56e512574e0a5ac0dec257079618a4e Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Wed, 4 Mar 2020 10:44:37 +0000 Subject: [PATCH] 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 --- mybatis.changes | 4 ++ mybatis.spec | 99 ++++++++++++++++++++++++++++++++ .gitattributes | 23 ++++++++ .gitignore | 1 + mybatis-3.5.3-commons-ognl.patch | 82 ++++++++++++++++++++++++++ mybatis-3.5.3.tar.gz | 3 + 6 files changed, 212 insertions(+) create mode 100644 mybatis.changes create mode 100644 mybatis.spec create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 mybatis-3.5.3-commons-ognl.patch create mode 100644 mybatis-3.5.3.tar.gz diff --git a/mybatis.changes b/mybatis.changes new file mode 100644 index 0000000..ebde156 --- /dev/null +++ b/mybatis.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Wed Mar 4 09:45:57 UTC 2020 - Fridrich Strba + +- Initial packaging of mybatis 3.5.3 diff --git a/mybatis.spec b/mybatis.spec new file mode 100644 index 0000000..af81f49 --- /dev/null +++ b/mybatis.spec @@ -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 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/mybatis-3.5.3-commons-ognl.patch b/mybatis-3.5.3-commons-ognl.patch new file mode 100644 index 0000000..e532fa8 --- /dev/null +++ b/mybatis-3.5.3-commons-ognl.patch @@ -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 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; + diff --git a/mybatis-3.5.3.tar.gz b/mybatis-3.5.3.tar.gz new file mode 100644 index 0000000..ed4cd0a --- /dev/null +++ b/mybatis-3.5.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:677de364228e2ef1231f301b8de66fd054bb65c2a6f958854d982cad8a03c8fc +size 874632