For a Java console application, we are trying to an embed H2 database in a MacOS App Bundle.
We are using Maven and Eclipse but are totally open to any tool recommendations.
We made some progress with the following Maven plugin:
<groupId>sh.tak.appbundler</groupId>
<artifactId>appbundle-maven-plugin</artifactId>
...
<configuration>
...
<!-- Add resource to the APP - NOT working -->
<additionalBundledClasspathResources>
<fileSet>
<directory>src/main/resources/database</directory>
<includes>
<include>*</include>
</includes>
</fileSet>
</additionalBundledClasspathResources>
<!-- This placed in DMG not App -->
<additionalResources>
<additionalResource>
<directory>database</directory>
</additionalResource>
</additionalResources>
...
</configuration>
This plugin placed the H2 database file in the DMG. We would prefer that the H2 database file is placed inside the app bundle.
We believe the H2 database file should reside in
Contents / Resources
folder in the app bundle.