Skip to content

Commit a1255ae

Browse files
author
jingzhongzhi
committed
Merge branch 'master' into followtry-learning
* master: (616 commits) Fix trivial grammer mistake Trivial doc correction Add 'defaultNetworkTimeout' to PooledDataSource and UnpooledDataSource Update README.md Follow-up to mybatis#1517 Change to use try-with-resources on doc New versions available. fixes mybatis#1523 Better error message when too many keys are generated Minor refactoring. Reuse PostgreSQL container without restarting Replace postgresql-embedded with Testcontainers Added Stack Overflow as a place for questions Add `.editorconfig` to maintain consistent coding styles [maven-release-plugin] prepare for next development iteration [maven-release-plugin] prepare release mybatis-3.5.1 [ci] Cache maven dependencies. Added edge case tests provided by @kdubb Add comment for derby Revert "Upgrade to derby 10.15.1.3" Upgrade to assertj 3.12.2 ... # Conflicts: # pom.xml # src/main/java/org/apache/ibatis/binding/MapperMethod.java # src/main/java/org/apache/ibatis/binding/MapperProxyFactory.java # src/main/java/org/apache/ibatis/binding/MapperRegistry.java # src/main/java/org/apache/ibatis/builder/annotation/MapperAnnotationBuilder.java # src/main/java/org/apache/ibatis/datasource/unpooled/UnpooledDataSource.java # src/main/java/org/apache/ibatis/plugin/Plugin.java # src/main/java/org/apache/ibatis/reflection/Reflector.java # src/main/java/org/apache/ibatis/session/Configuration.java # src/main/java/org/apache/ibatis/session/SqlSession.java # src/main/java/org/apache/ibatis/session/TransactionIsolationLevel.java # src/main/java/org/apache/ibatis/session/defaults/DefaultSqlSession.java # src/main/java/org/apache/ibatis/transaction/Transaction.java # src/main/java/org/apache/ibatis/transaction/TransactionFactory.java # src/main/java/org/apache/ibatis/transaction/jdbc/JdbcTransaction.java # src/main/java/org/apache/ibatis/transaction/managed/ManagedTransaction.java # src/main/java/org/apache/ibatis/type/ArrayTypeHandler.java # src/main/java/org/apache/ibatis/type/BaseTypeHandler.java # src/main/java/org/apache/ibatis/type/SimpleTypeRegistry.java # src/main/java/org/apache/ibatis/type/TypeAliasRegistry.java # src/main/java/org/apache/ibatis/type/TypeHandlerRegistry.java
2 parents ea48443 + b38ea9f commit a1255ae

File tree

1,078 files changed

+33246
-17371
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,078 files changed

+33246
-17371
lines changed

.editorconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
root = true
2+
3+
[*.{java, xml, sql}]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
insert_final_newline = true
8+
trim_trailing_whitespace = true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@
1414
/ibderby
1515
derby.log
1616
/bin/
17+
.mvn/wrapper/maven-wrapper.jar
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
/*
2+
Licensed to the Apache Software Foundation (ASF) under one
3+
or more contributor license agreements. See the NOTICE file
4+
distributed with this work for additional information
5+
regarding copyright ownership. The ASF licenses this file
6+
to you under the Apache License, Version 2.0 (the
7+
"License"); you may not use this file except in compliance
8+
with the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing,
13+
software distributed under the License is distributed on an
14+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
KIND, either express or implied. See the License for the
16+
specific language governing permissions and limitations
17+
under the License.
18+
*/
19+
20+
import java.net.*;
21+
import java.io.*;
22+
import java.nio.channels.*;
23+
import java.util.Properties;
24+
25+
public class MavenWrapperDownloader {
26+
27+
/**
28+
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
29+
*/
30+
private static final String DEFAULT_DOWNLOAD_URL =
31+
"https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.0/maven-wrapper-0.4.0.jar";
32+
33+
/**
34+
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
35+
* use instead of the default one.
36+
*/
37+
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
38+
".mvn/wrapper/maven-wrapper.properties";
39+
40+
/**
41+
* Path where the maven-wrapper.jar will be saved to.
42+
*/
43+
private static final String MAVEN_WRAPPER_JAR_PATH =
44+
".mvn/wrapper/maven-wrapper.jar";
45+
46+
/**
47+
* Name of the property which should be used to override the default download url for the wrapper.
48+
*/
49+
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
50+
51+
public static void main(String args[]) {
52+
System.out.println("- Downloader started");
53+
File baseDirectory = new File(args[0]);
54+
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
55+
56+
// If the maven-wrapper.properties exists, read it and check if it contains a custom
57+
// wrapperUrl parameter.
58+
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
59+
String url = DEFAULT_DOWNLOAD_URL;
60+
if(mavenWrapperPropertyFile.exists()) {
61+
FileInputStream mavenWrapperPropertyFileInputStream = null;
62+
try {
63+
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
64+
Properties mavenWrapperProperties = new Properties();
65+
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
66+
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
67+
} catch (IOException e) {
68+
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
69+
} finally {
70+
try {
71+
if(mavenWrapperPropertyFileInputStream != null) {
72+
mavenWrapperPropertyFileInputStream.close();
73+
}
74+
} catch (IOException e) {
75+
// Ignore ...
76+
}
77+
}
78+
}
79+
System.out.println("- Downloading from: : " + url);
80+
81+
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
82+
if(!outputFile.getParentFile().exists()) {
83+
if(!outputFile.getParentFile().mkdirs()) {
84+
System.out.println(
85+
"- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'");
86+
}
87+
}
88+
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
89+
try {
90+
downloadFileFromURL(url, outputFile);
91+
System.out.println("Done");
92+
System.exit(0);
93+
} catch (Throwable e) {
94+
System.out.println("- Error downloading");
95+
e.printStackTrace();
96+
System.exit(1);
97+
}
98+
}
99+
100+
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
101+
URL website = new URL(urlString);
102+
ReadableByteChannel rbc;
103+
rbc = Channels.newChannel(website.openStream());
104+
FileOutputStream fos = new FileOutputStream(destination);
105+
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
106+
fos.close();
107+
rbc.close();
108+
}
109+
110+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip
2+
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar
3+

.travis.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
11
language: java
2-
sudo: false
32

43
jdk:
4+
- openjdk12
5+
- oraclejdk11
56
- oraclejdk8
6-
- oraclejdk7
7-
- openjdk7
8-
- openjdk6
7+
8+
services:
9+
- docker
10+
11+
cache:
12+
directories:
13+
- $HOME/.m2
914

1015
before_install:
1116
- echo "MAVEN_OPTS='-Dlicense.skip=true'" > ~/.mavenrc
1217

13-
install:
14-
# Compile sources with Java 1.8
15-
- jdk_switcher use oraclejdk8
16-
- chmod -R 777 ./travis/install.sh
17-
- ./travis/install.sh
18-
# Switch back to the original JDK to run the tests
19-
- jdk_switcher use ${TRAVIS_JDK_VERSION}
20-
2118
after_success:
2219
- chmod -R 777 ./travis/after_success.sh
2320
- ./travis/after_success.sh

ISSUE_TEMPLATE.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
<!--
2-
Thank you for your contribution!
2+
❌ 不要在这里问问题❗️
3+
⭕️ 请将您的问题发送到邮件列表
4+
請用英文寫
5+
https://groups.google.com/group/mybatis-user
6+
7+
https://stackoverflow.com/questions/ask?tags=mybatis
38
49
Question?
510
======================
611
Please use the mailing list. http://groups.google.com/group/mybatis-user
12+
Or Stack Overflow with 'mybatis' tag. https://stackoverflow.com/questions/ask?tags=mybatis
713
Questions on this tracker will be closed without comment.
814
915
Bug report?
@@ -27,7 +33,7 @@ Feature request?
2733
<!-- BUG REPORT FORM -->
2834

2935
## MyBatis version
30-
3.3.1
36+
3.x.x
3137

3238
## Database vendor and version
3339

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ MyBatis SQL Mapper Framework for Java
33

44
[![Build Status](https://travis-ci.org/mybatis/mybatis-3.svg?branch=master)](https://travis-ci.org/mybatis/mybatis-3)
55
[![Coverage Status](https://coveralls.io/repos/mybatis/mybatis-3/badge.svg?branch=master&service=github)](https://coveralls.io/github/mybatis/mybatis-3?branch=master)
6-
[![Dependency Status](https://www.versioneye.com/user/projects/56199c04a193340f320005d3/badge.svg?style=flat)](https://www.versioneye.com/user/projects/56199c04a193340f320005d3)
76
[![Maven central](https://maven-badges.herokuapp.com/maven-central/org.mybatis/mybatis/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.mybatis/mybatis)
7+
[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/https/oss.sonatype.org/org.mybatis/mybatis.svg)](https://oss.sonatype.org/content/repositories/snapshots/org/mybatis/mybatis)
88
[![License](http://img.shields.io/:license-apache-brightgreen.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)
99
[![Stack Overflow](http://img.shields.io/:stack%20overflow-mybatis-brightgreen.svg)](http://stackoverflow.com/questions/tagged/mybatis)
1010
[![Project Stats](https://www.openhub.net/p/mybatis/widgets/project_thin_badge.gif)](https://www.openhub.net/p/mybatis)

0 commit comments

Comments
 (0)