MariaDB4j / MariaDB4j

MariaDB Embedded in Java JAR

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

More recent version for mac

brendonanderson opened this issue · comments

How can I get a more recent version of MariaDB for OSX when MariaDB4J starts up? Looks like it's getting 5.5.34. Any way to get something in the 10.1 series?

Yes, seems to use an old version just for mac. From code: if (OSX.equals(getOS()))
databaseVersion = "mariadb-5.5.34";
else if (LINUX.equals(getOS()))
databaseVersion = "mariadb-10.1.8";
else if (WIN32.equals(getOS()))
databaseVersion = "mariadb-10.0.13";

Don't know how hard it would be to upgrade, I'll have a quick look to see how much effort that went into to the Linux-upgrade to 10.x.

@brendonanderson & @hanklank thanks for your interest in MariaDB4j!

Would either of you be willing to contribute this? I don't have a Mac... ;-)

Also note the new section on the README re. DB upgrades on https://github.com/vorburger/MariaDB4j/blob/master/README.md#mariadb-database-jars-and-version-upgrades (just introduced in 4c2da73).

I'll try to give it a shot If I can get some time at work to do it, no promises:)

@brendonanderson Can you test the pull request https://github.com/vorburger/MariaDB4j/pull/44?
It works fine for me.

@vorburger I'm certainly no mac-user either (linux all day long), but half of my team uses them, so they would beat me with a stick if I introduced the plugin in our integration tests without updated mac-support.:) Let's hope my patch works fine for other mac-users too.

@hanklank I'm not sure how to test it. I'm assuming I need to pull down the PR and build it locally and then point to a local snapshot? Or is it more involved than that?

@brendonanderson Just git clone my repo at https://github.com/hanklank/MariaDB4j/tree/Issue37_AddMacMariaDB10xSupport and do a mvn clean install when changed branch to Issue37....branch.

@brendonanderson And dont forget to add the mac-jar to your project after that. Gradle-example:
dependencies {
classpath 'ch.vorburger.mariaDB4j:mariaDB4j-core:2.2.1'
classpath 'ch.vorburger.mariaDB4j:mariaDB4j-db-mac64:10.1.9'
}

@hanklank Hmm.. seems to have the same issue you describe in your PR about not finding the jar in Maven Central while building.

[ERROR] Failed to execute goal on project mariaDB4j: Could not resolve dependencies for project ch.vorburger.mariaDB4j:mariaDB4j:jar:2.2.2-SNAPSHOT: Could not find artifact ch.vorburger.mariaDB4j:mariaDB4j-db-mac64:jar:10.1.9 in central (https://repo.maven.apache.org/maven2) -> [Help 1]
$ git branch
* Issue37_AddMacMariaDB10xSupport
  master

@brendonanderson Yes, as the DBs jars are separated from the main project, one needs to build the DB-jar so it ends it up in your local repo first. cd down the DBs subfolder and do a mvn clean install for the DB you want to build i.e. mariaDB4j-db-mac64-10.1.9/ . After that, up again to the project root repository and mvn clean install should work fine. Did it on another machine just now, and worked fine there too. Also do an git pull before this in the DBs folder as I changed a capital J in the folder name to j.

@hanklank Thank you for the build information.

I was able to get it to use the newer version (from the integration test logs):
Unpacked 67 files from classpath*:ch/vorburger/mariadb4j/mariadb-10.1.9/osx/** to /var/folders/n6/d4x2ynk962jc22j19npf_tx00000gn/T/MariaDB4j/base

So, I think it's a 👍

Super! @vorburger @brendonanderson If it works for both of us that wanted it maybe it would be ok to merge? Low risk, not much code changes, it's mostly the addition of scripts.

@hanklank @brendonanderson you guys are cool! Thanks for both of your contributions (@hanklank for dev & doc, which I'll integrate into the README, and @brendonanderson for testing).

I've just integrated https://github.com/vorburger/MariaDB4j/pull/44 (squashed into 1 instead of your 3 commits; using git rebase -i 3863a15).

I've also just deployed it to central; FYI it will take a few hours, I think, to show up there.

I'm hoping to release a 2.2.2 including this once I'm done with one other change I'd like to include.

I'll close this issue as I suppose there is nothing left to do here. Feel free to re-open it if you disagree. Thanks again for your contributions - and please keep involved in MariaDB4j!