From 3e8d8a9c7677ab0e5cb626f3a6895da7d6dc7c37 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Tue, 15 Sep 2026 14:08:53 +0200 Subject: [PATCH] Add maven run config (#4317) to run app with maven --- README.md | 14 +++++++ pom.xml | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 122 insertions(+) diff --git a/README.md b/README.md index 27a2cfef3..40f3f5f18 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,20 @@ For more information on the security details visit [cryptomator.org](https://doc This will build all the jars and bundle them together with their OS-specific dependencies under `target`. This can now be used to build native packages. +### Running the app + +``` +./mvnw -Prun compile exec:exec +``` + +This starts the app with the defaults defined in `pom.xml`. The OS-specific parameters are picked automatically. + +Add the `dev` profile to use the `Cryptomator-Dev` settings, log and mount directories instead, so a development run does not interfere with an installed Cryptomator: + +``` +./mvnw -Prun,dev compile exec:exec +``` + ## License This project is dual-licensed under the GPLv3 for FOSS projects as well as a commercial license for independent software vendors and resellers. If you want to modify this application under different conditions, feel free to contact our support team. diff --git a/pom.xml b/pom.xml index 2d43aa712..71bde59ea 100644 --- a/pom.xml +++ b/pom.xml @@ -72,9 +72,16 @@ 3.11.0 3.5.6 3.5.0 + 3.5.1 + + + Cryptomator + + @{userhome}/Cryptomator + -Dcryptomator.updateMechanism=org.cryptomator.macos.update.DmgUpdateMechanism @@ -324,6 +331,11 @@ dependency-check-maven ${dependency-check.version} + + org.codehaus.mojo + exec-maven-plugin + ${mvn-exec.version} + @@ -597,6 +609,102 @@ + + + + run + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + build-run-modulepath + validate + + build-classpath + + + runtime + ${nonModularGroupIds} + run.modulePath + + + + build-run-classpath + validate + + build-classpath + + + runtime + ${nonModularGroupIds} + run.classPath + + + + + + org.codehaus.mojo + exec-maven-plugin + + ${java.home}/bin/java + --module-path "${project.build.outputDirectory}${path.separator}${run.modulePath}" --class-path "${run.classPath}" ${run.jvmArgs} --module org.cryptomator.desktop/org.cryptomator.launcher.Cryptomator + + + + + + + + + dev + + Cryptomator-Dev + -Dfuse.experimental="true" + @{userhome}/Library/Application Support/Cryptomator-Dev/mnt + + + + + + run-win + + + windows + + + + -Dcryptomator.settingsPath="@{appdata}/${run.appDir}/settings.json;@{userhome}/AppData/Roaming/${run.appDir}/settings.json" -Dcryptomator.ipcSocketPath="@{localappdata}/${run.appDir}/ipc.socket" -Dcryptomator.logDir="@{localappdata}/${run.appDir}" -Dcryptomator.pluginDir="@{appdata}/${run.appDir}/Plugins" -Dcryptomator.integrationsWin.keychainPaths="@{appdata}/${run.appDir}/keychain.json;@{userhome}/AppData/Roaming/${run.appDir}/keychain.json" -Dcryptomator.integrationsWin.windowsHelloKeychainPaths="@{appdata}/${run.appDir}/windowsHelloKeychain.json;@{userhome}/AppData/Roaming/${run.appDir}/windowsHelloKeychain.json" -Dcryptomator.p12Path="@{appdata}/${run.appDir}/key.p12;@{userhome}/AppData/Roaming/${run.appDir}/key.p12" -Dcryptomator.mountPointsDir="@{userhome}/${run.appDir}" -Dcryptomator.showTrayIcon=true -Dcryptomator.hub.enableTrustOnFirstUse=true -Xss2m -Xmx512m --enable-preview --enable-native-access=org.cryptomator.jfuse.win,org.cryptomator.integrations.win,javafx.graphics + + + + + run-mac + + + mac + + + + -Dapple.awt.enableTemplateImages=true -Dcryptomator.settingsPath="@{userhome}/Library/Application Support/${run.appDir}/settings.json" -Dcryptomator.p12Path="@{userhome}/Library/Application Support/${run.appDir}/key.p12" -Dcryptomator.ipcSocketPath="@{userhome}/Library/Application Support/${run.appDir}/ipc.socket" -Dcryptomator.logDir="@{userhome}/Library/Logs/${run.appDir}" -Dcryptomator.pluginDir="@{userhome}/Library/Application Support/${run.appDir}/Plugins" -Dcryptomator.mountPointsDir="${run.macMountPointsDir}" -Dcryptomator.showTrayIcon=true -Dcryptomator.integrationsMac.keychainServiceName=Cryptomator ${run.macUpdateArgs} -Dcryptomator.hub.enableTrustOnFirstUse=true -Xss2m -Xmx512m -ea --enable-preview --enable-native-access=org.cryptomator.jfuse.mac,javafx.graphics + + + + + run-linux + + + unix + linux + + + + -Dcryptomator.settingsPath="@{userhome}/.config/${run.appDir}/settings.json" -Dcryptomator.p12Path="@{userhome}/.config/${run.appDir}/key.p12" -Dcryptomator.ipcSocketPath="@{userhome}/.config/${run.appDir}/ipc.socket" -Dcryptomator.logDir="@{userhome}/.local/share/${run.appDir}/logs" -Dcryptomator.pluginDir="@{userhome}/.local/share/${run.appDir}/plugins" -Dcryptomator.mountPointsDir="@{userhome}/.local/share/${run.appDir}/mnt" -Dcryptomator.showTrayIcon=true -Dcryptomator.hub.enableTrustOnFirstUse=true ${run.linuxFuseArgs} -Xss20m -Xmx512m --enable-preview --enable-native-access=org.cryptomator.jfuse.linux.amd64,org.cryptomator.jfuse.linux.aarch64,org.purejava.appindicator,javafx.graphics + +