# # spec file for package mybatis # # Copyright (c) 2022 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.6 Release: 5.7 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) 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) #!BuildRequires: slf4j-reload4j Provides: apache-mybatis = %{version} Obsoletes: apache-mybatis < %{version} 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 # Build despite duplicate log4j availability (v1 and v2) %if 0%{?rhel} %{mvn_config} resolverSettings/ignoreDuplicateMetadata false %endif %{mvn_build} -f -- \ -Dmaven.compiler.release=8 \ -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 * Thu May 25 2023 Stefan Bluhm - Fix for Enterprise Linux to allow building with log4j v1 and v2 dependencies. * Wed Sep 7 2022 Fridrich Strba - Help the build to chose slf4j-reload4j if it exists * Sun Jun 19 2022 Michael Calmer - Obsolete apache-mybatis package (jsc#SLE-23217) * Tue Feb 22 2022 Fridrich Strba - Do not build against the log4j12 packages * Tue Oct 13 2020 Pedro Monreal - Version update to 3.5.6 [bsc#1177568, CVE-2020-26945] * Security fix: mybatis mishandles deserialization of object streams which could lead to remote code execution * List of changes: https://github.com/mybatis/mybatis-3/releases - Update mybatis-3.5.3-commons-ognl.patch * Wed Mar 4 2020 Fridrich Strba - Initial packaging of mybatis 3.5.3 - Add: mybatis-3.5.3-commons-ognl.patch