package init

This commit is contained in:
chengzihan2 2021-01-27 15:03:15 +08:00
parent d126a07b85
commit ff11fc33c8
5 changed files with 193 additions and 0 deletions

View File

@ -0,0 +1,67 @@
diff -Nru mybatis-3-mybatis-3.2.8/pom.xml mybatis-3-mybatis-3.2.8-gil/pom.xml
--- mybatis-3-mybatis-3.2.8/pom.xml 2014-10-10 18:44:34.000000000 +0200
+++ mybatis-3-mybatis-3.2.8-gil/pom.xml 2014-12-26 14:27:03.038441294 +0100
@@ -136,9 +136,9 @@
<dependencies>
<dependency>
- <groupId>ognl</groupId>
- <artifactId>ognl</artifactId>
- <version>2.6.9</version>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-ognl</artifactId>
+ <version>4.0-incubating-SNAPSHOT</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
diff -Nru mybatis-3-mybatis-3.2.8/src/main/java/org/apache/ibatis/scripting/xmltags/DynamicContext.java mybatis-3-mybatis-3.2.8-gil/src/main/java/org/apache/ibatis/scripting/xmltags/DynamicContext.java
--- mybatis-3-mybatis-3.2.8/src/main/java/org/apache/ibatis/scripting/xmltags/DynamicContext.java 2014-10-10 18:44:34.000000000 +0200
+++ mybatis-3-mybatis-3.2.8-gil/src/main/java/org/apache/ibatis/scripting/xmltags/DynamicContext.java 2014-12-26 14:30:00.065088895 +0100
@@ -18,9 +18,9 @@
import java.util.HashMap;
import java.util.Map;
-import ognl.OgnlException;
-import ognl.OgnlRuntime;
-import ognl.PropertyAccessor;
+import org.apache.commons.ognl.OgnlException;
+import org.apache.commons.ognl.OgnlRuntime;
+import org.apache.commons.ognl.MapPropertyAccessor;
import org.apache.ibatis.reflection.MetaObject;
import org.apache.ibatis.session.Configuration;
@@ -107,7 +107,7 @@
}
}
- static class ContextAccessor implements PropertyAccessor {
+ static class ContextAccessor extends MapPropertyAccessor {
public Object getProperty(Map context, Object target, Object name)
throws OgnlException {
diff -Nru mybatis-3-mybatis-3.2.8/src/main/java/org/apache/ibatis/scripting/xmltags/OgnlCache.java mybatis-3-mybatis-3.2.8-gil/src/main/java/org/apache/ibatis/scripting/xmltags/OgnlCache.java
--- mybatis-3-mybatis-3.2.8/src/main/java/org/apache/ibatis/scripting/xmltags/OgnlCache.java 2014-10-10 18:44:34.000000000 +0200
+++ mybatis-3-mybatis-3.2.8-gil/src/main/java/org/apache/ibatis/scripting/xmltags/OgnlCache.java 2014-12-26 14:31:45.179409686 +0100
@@ -19,8 +19,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;
diff -Nru mybatis-3-mybatis-3.2.8/src/main/java/org/apache/ibatis/scripting/xmltags/OgnlClassResolver.java mybatis-3-mybatis-3.2.8-gil/src/main/java/org/apache/ibatis/scripting/xmltags/OgnlClassResolver.java
--- mybatis-3-mybatis-3.2.8/src/main/java/org/apache/ibatis/scripting/xmltags/OgnlClassResolver.java 2014-10-10 18:44:34.000000000 +0200
+++ mybatis-3-mybatis-3.2.8-gil/src/main/java/org/apache/ibatis/scripting/xmltags/OgnlClassResolver.java 2014-12-26 14:32:53.568668180 +0100
@@ -19,7 +19,7 @@
import java.util.HashMap;
import java.util.Map;
-import ognl.ClassResolver;
+import org.apache.commons.ognl.ClassResolver;
import org.apache.ibatis.io.Resources;

View File

@ -0,0 +1,36 @@
diff -Nru mybatis-3-mybatis-3.2.8/src/main/java/org/apache/ibatis/logging/log4j2/Log4j2AbstractLoggerImpl.java mybatis-3-mybatis-3.2.8.log4j2/src/main/java/org/apache/ibatis/logging/log4j2/Log4j2AbstractLoggerImpl.java
--- mybatis-3-mybatis-3.2.8/src/main/java/org/apache/ibatis/logging/log4j2/Log4j2AbstractLoggerImpl.java 2014-10-10 18:44:34.000000000 +0200
+++ mybatis-3-mybatis-3.2.8.log4j2/src/main/java/org/apache/ibatis/logging/log4j2/Log4j2AbstractLoggerImpl.java 2016-08-25 12:32:27.624998558 +0200
@@ -51,27 +51,27 @@
@Override
public void error(String s, Throwable e) {
- log.logIfEnabled(FQCN, Level.ERROR, MARKER, new SimpleMessage(s), e);
+ log.logIfEnabled(FQCN, Level.ERROR, MARKER, s, e);
}
@Override
public void error(String s) {
- log.logIfEnabled(FQCN, Level.ERROR, MARKER, new SimpleMessage(s), null);
+ log.logIfEnabled(FQCN, Level.ERROR, MARKER, s, (Throwable) null);
}
@Override
public void debug(String s) {
- log.logIfEnabled(FQCN, Level.DEBUG, MARKER, new SimpleMessage(s), null);
+ log.logIfEnabled(FQCN, Level.DEBUG, MARKER, s, (Throwable) null);
}
@Override
public void trace(String s) {
- log.logIfEnabled(FQCN, Level.TRACE, MARKER, new SimpleMessage(s), null);
+ log.logIfEnabled(FQCN, Level.TRACE, MARKER, s, (Throwable) null);
}
@Override
public void warn(String s) {
- log.logIfEnabled(FQCN, Level.WARN, MARKER, new SimpleMessage(s), null);
+ log.logIfEnabled(FQCN, Level.WARN, MARKER, s, (Throwable) null);
}
}

BIN
mybatis-3.2.8.tar.gz Normal file

Binary file not shown.

86
mybatis.spec Normal file
View File

@ -0,0 +1,86 @@
%bcond_with test
Name: mybatis
Version: 3.2.8
Release: 1
Summary: SQL Mapping Framework for Java
License: Apache 2.0
URL: https://github.com/mybatis/mybatis-3
Source0: https://github.com/mybatis/mybatis-3/archive/%{name}-%{version}.tar.gz
Patch0: %{name}-%{version}-commons-ognl.patch
Patch1: mybatis-3.2.8-log4j2.6.patch
BuildRequires: maven-local mvn(cglib:cglib) mvn(commons-logging:commons-logging)
BuildRequires: mvn(log4j:log4j:1.2.17) mvn(org.apache.commons:commons-ognl)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.apache.logging.log4j:log4j-core)
BuildRequires: mvn(org.apache.maven.plugins:maven-enforcer-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-site-plugin) mvn(org.javassist:javassist)
BuildRequires: mvn(org.mybatis:mybatis-parent:pom:) mvn(org.slf4j:slf4j-api)
%if %{with test}
BuildRequires: mvn(commons-dbcp:commons-dbcp) mvn(junit:junit) mvn(org.apache.derby:derby)
BuildRequires: mvn(org.apache.geronimo.specs:geronimo-jta_1.1_spec)
BuildRequires: mvn(org.apache.geronimo.specs:specs:pom:) mvn(org.apache.velocity:velocity)
BuildRequires: mvn(org.hsqldb:hsqldb) mvn(org.mockito:mockito-core) mvn(postgresql:postgresql)
%endif
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
%autosetup -n %{name}-3-%{name}-%{version} -p1
%pom_remove_dep org.slf4j:slf4j-log4j12
%pom_remove_plugin :maven-pdf-plugin
%pom_remove_plugin :jarjar-maven-plugin
%pom_remove_plugin :cobertura-maven-plugin
sed -i 's/\r//' LICENSE NOTICE
%if %{with test}
%pom_remove_dep javax.transaction:transaction-api
%pom_add_dep org.apache.geronimo.specs:geronimo-jta_1.1_spec::test
rm src/test/java/org/apache/ibatis/parsing/GenericTokenParserTest.java
rm src/test/java/org/apache/ibatis/submitted/multipleresultsetswithassociation/MultipleResultSetTest.java \
src/test/java/org/apache/ibatis/submitted/includes/IncludeTest.java \
src/test/java/org/apache/ibatis/submitted/resultmapwithassociationstest/ResultMapWithAssociationsTest.java \
src/test/java/org/apache/ibatis/submitted/nestedresulthandler_association/NestedResultHandlerAssociationTest.java
rm src/test/java/org/apache/ibatis/logging/LogFactoryTest.java
%endif
%mvn_file :%{name} %{name}
%build
%if %{without test}
opts="-f"
%endif
%mvn_build $opts -- -Dproject.build.sourceEncoding=UTF-8
%install
%mvn_install
%files -f .mfiles
%license LICENSE NOTICE
%files javadoc -f .mfiles-javadoc
%license LICENSE NOTICE
%changelog
* Fri Jan 8 2021 chengzihan <chengzihan2@huawei.com> - 3.2.8-1
- Package init

4
mybatis.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: mybatis/mybatis-3
tag_prefix: "mybatis-"
separator: "."