Skip to content

Commit

Permalink
Updated koans and dependencies to be mybatis-3.2 compatible.
Browse files Browse the repository at this point in the history
All tests for all databases pass with ant and maven build tools.
  • Loading branch information
quux00 committed Mar 8, 2013
1 parent 807a91c commit 3cae020
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 6 deletions.
3 changes: 3 additions & 0 deletions KOANS.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@ Learn:
* How to use the MyBatis SqlBuilder "DSL" to generate SQL insert, update and delete statements
* How to use the MyBatis SqlBuilder "DSL" to generate compound SQL (subselects)

**[Update]**: In mybatis-3.2, SQLBuilder has been deprecated, so Koan18 is now vestigial. However, I will leave it in for a while longer in case people are still using older versions and depending on SQLBuilder. You should stop using it. See the MyBatis documentation for more details.


----

### Koan 19
Expand Down
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,11 @@ So in the end you'll need to have the lib directory have those jars or links to
lrwxrwxrwx 1 (...) h2.jar -> /home/midpeter444/java/lib/h2/bin/h2-1.3.166.jar
lrwxrwxrwx 1 (...) logback-classic.jar -> /home/midpeter444/java/lib/h2/bin/logback-classic-1.0.6.jar
lrwxrwxrwx 1 (...) logback-core.jar -> /home/midpeter444/java/lib/h2/bin/logback-core-1.0.6.jar

lrwxrwxrwx 1 (...) log4j.jar -> /home/midpeter444/.m2/repository/log4j/log4j/1.2.17/log4j-1.2.17.jar
lrwxrwxrwx 1 (...) hamcrest-core.jar -> /home/midpeter444/lang/java/lib/junit/hamcrest-core-1.3.jar
lrwxrwxrwx 1 (...) cglib.jar -> /home/midpeter444/.m2/repository/cglib/cglib/2.2.2/cglib-2.2.2.jar
lrwxrwxrwx 1 (...) asm.jar -> /home/midpeter444/.m2/repository/asm/asm/3.3.1/asm-3.3.1.jar
lrwxrwxrwx 1 (...) asm-util.jar -> /home/midpeter444/.m2/repository/asm/asm-util/3.2/asm-util-3.2.jar

<br />
<a name="runComp"></a>
Expand Down Expand Up @@ -531,6 +535,16 @@ As you go through the koans, you'll see that I change styles/idioms from time to

# Current Status

**07-Mar-2013**: mybatis-3.2 was released in late February. **The koans dependencies have been updated to work with mybatis-3.2**. Basically, cglib (2.2.2) and log4j (1.2.17) had to be explicitly added to the classpath. They were added to the pom and the instructions below for adding them to your lib directory if using Ant have also been updated.

If you need to get back to the mybatis-3.1 version, I have created a git tag for that last commit:

git checkout tags/mybatis-3.1 -b mybatis-3.1

*Note*: In mybatis-3.2, SQLBuilder has been deprecated, so Koan18 is now vestigial. However, I will leave it in for a while longer in case people are still using older versions and depending on SQLBuilder. You should stop using it. See the MyBatis documentation for more details.

----

**17-Feb-2013**: José Antonio López figured out how to implement the EmailTypeHandler for the Null Object Pattern koan (Koan 19). See his [stackoverflow posting](http://stackoverflow.com/questions/14874547/null-object-pattern-with-a-mybatis-typehandler). We should add that as an alternative solution to the completed koans.

Also, [mybatis-3.2.0-SNAPSHOT](https://code.google.com/p/mybatis/downloads/list?can=3&q=Product%3DMyBatis) recently came out. Anyone tested the koans with that yet? Put that on our TODO list.
Expand Down
22 changes: 17 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>net.thornydev.mybatis</groupId>
<artifactId>mybatis-koans</artifactId>
<version>1.2</version>
<version>1.3</version>

<properties>
<!-- enforce java version -->
Expand All @@ -20,11 +20,11 @@
mybatis or driver versions -->
<dependencies>

<!-- batis http://www.mybatis.org/core/ -->
<!-- mybatis http://www.mybatis.org/core/ -->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.1.1</version>
<version>3.2.0</version>
</dependency>

<!-- H2 JDBC driver and tools http://www.h2database.com/html/main.html -->
Expand Down Expand Up @@ -58,16 +58,28 @@
<version>4.10</version>
</dependency>

<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>

<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>2.2.2</version>
</dependency>

<!-- logging framework http://logback.qos.ch/ -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.5</version>
<version>1.7.2</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.0.6</version>
<version>1.0.9</version>
</dependency>

<!-- utilities to copy files http://commons.apache.org/io/ -->
Expand Down

0 comments on commit 3cae020

Please sign in to comment.