commit 8d1165ed8de27544ef7e5a58a7f1d3bdaf63dd8a Author: djmil Date: Thu Aug 3 11:44:43 2023 +0200 Add Home diff --git a/Home.md b/Home.md new file mode 100644 index 0000000..ed4d4b9 --- /dev/null +++ b/Home.md @@ -0,0 +1,76 @@ +# Post installation + +In order for the `CSDE-cordapp-template` app to work on MacOS with VsCode, these steps must be made: + +## Add `$rootDir` prefix in `build.gradle` + +For some reason, to run gradle tasks from VsCode, the default `build.gradle` must be updated with absolute paths. Unpatched file works just fine for commands from CLI. + +```diff + // Configure the CSDE + csde { + cordaClusterURL = "https://localhost:8888" +- networkConfigFile = "config/static-network-config.json" +- r3RootCertFile = "config/r3-ca-key.pem" ++ networkConfigFile = "$rootDir/config/static-network-config.json" ++ r3RootCertFile = "$rootDir/config/r3-ca-key.pem" + corDappCpiName = "MyCorDapp" + notaryCpiName = "NotaryServer" + cordaRpcUser = "admin" + cordaRpcPasswd ="admin" + workflowsModuleName = workflowsModule +- csdeWorkspaceDir = "workspace" ++ csdeWorkspaceDir = "$rootDir/workspace" + notaryVersion = cordaNotaryPluginsVersion + combinedWorkerVersion = combinedWorkerJarVersion + postgresJdbcVersion = "42.4.3" + cordaDbContainerName = "CSDEpostgresql" + cordaBinDir = "${System.getProperty("user.home")}/.corda/corda5" + cordaCliBinDir = "${System.getProperty("user.home")}/.corda/cli" + } +``` + +## JDK + +[Install](https://docs.azul.com/core/zulu-openjdk/install/macos) recommend JDK (Azul Zulu 11) and tell gradle to use it. + +*`gradle.properties`* +```diff ++ # Use JDK Zulu 11 ++ org.gradle.java.home=/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home +``` + +### List all the Java versions installed on Mac + +```shell + /usr/libexec/java_home -V +``` + +Otherwise, funny errors might happen: + +```bash +oxbee@MacBook HelloCorda % ./gradlew 5-vNodesSetup +Starting a Gradle Daemon, 1 busy and 3 incompatible and 2 stopped Daemons could not be reused, use --status for details + +> Task :1-createGroupPolicy FAILED +Group policy up to date. + +FAILURE: Build failed with an exception. + +* What went wrong: +Execution failed for task ':1-createGroupPolicy'. +> net.corda.plugins.csde.CsdeException: Unable to find the Corda CLI, has it been installed? + +* Try: +> Run with --stacktrace option to get the stack trace. +> Run with --info or --debug option to get more log output. +> Run with --scan to get full insights. + +* Get more help at https://help.gradle.org + +BUILD FAILED in 14s +2 actionable tasks: 2 executed +``` + + +