Skip to content

Instantly share code, notes, and snippets.

@fsans
Last active December 13, 2023 18:38
Show Gist options
  • Save fsans/289ee4c592da54fbcff4122a7142bd90 to your computer and use it in GitHub Desktop.
Save fsans/289ee4c592da54fbcff4122a7142bd90 to your computer and use it in GitHub Desktop.
Make yout own Maven repositories for FileMaker JDBC Drivers

Create local maven repositories for FileMaker JDBC Drivers

Simple method to create your own (local) maven repositories for FileMaker JDBC Drivers using the distributed jar files.

Get a copy of the FileMaker JDBC Driver, fmjdbc.jar, from the FileMaker Server installer package (Extras/xDBC folder), or from public distributiuons here:

https://support.claris.com/s/answerview?language=en_US&anum=12921

Generate repo and install the JAR into your local Maven repository

Use Maven install plugin to create a local repository (usually should be ~/.m2 ) as follows:

mvn install:install-file\
-Dfile=path_to_the_driver_file/fmjdbc.jar\
-DgroupId=com.filemaker.jdbc.driver\
-DartifactId=fmjdbc\
-Dversion=20.1\
-Dpackaging=jar\
-DgeneratePom=true

Latest versions of FileMaker JDBC drivers [^version history]

The command should return (if no errors)) the following:

[] Installing (omited full path)/20.1/fmjdbc.jar to ~/.m2/repository/com/filemaker/jdbc/driver/fmjdbc/20.1/fmjdbc-20.1.jar
[] Installing /var/folders/tt/_k9fwwcj60v1ln2kdx1ct7hm0000gn/T/mvninstall3540250749779221010.pom to ~/.m2/repository/com/filemaker/jdbc/driver/fmjdbc/20.1/fmjdbc-20.1.pom

so we have our driver installed in our local repo, and the generated pom.xml file looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.filemaker.jdbc.driver</groupId>
  <artifactId>fmjdbc</artifactId>
  <version>20.1</version>
  <description>POM was created from install:install-file</description>
</project>

Add the dependencies in the pom.xml file:

edit the application pom.xml file and add the dependency under "dependencies" group

...
    <!-- fmjdbc driver -->
    <dependency>
        <groupId>com.filemaker.jdbc.driver</groupId>
        <artifactId>fmjdbc</artifactId>
        <version>20.1</version>
    </dependency>

    <!-- xxx-needle-maven-add-dependency -->
...

Do not miss the version that should match that one we just installed in our maven local repo

Next: add Hibernate Dialect for FileMaker as well, from here

version history

FileMaker JDBC Driver “v19”

  • versio 19.6.1 JDBC3 build1 (provided with FileMaker Pro/Server 19.6.x)

FileMaker JDBC Driver “v20”

  • versio 20.1.4 JDBC3 build1 (provided with FileMaker Pro/Server 20.1)

TODO

  • Create github public repositories
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment