Resetting the Corda Runtime Gradle Plugin
The CorDapp template creates temporary files to store data required to generate and upload CPI Corda Package Installer. A signed ZIP/JAR combination of a CPB and a Group Policy File that defines not only the application code that a virtual node will run, but also the details of the MGM with which to register, and the details of network PKI requirements. files and manage the Corda cluster. If these files are modified, deleted, or otherwise get out of sync with the actual state of the Corda cluster, the CorDapp template Gradle tasks may not function correctly. For example:
- A Corda cluster is started without using the
startCorda
task or by runningstartCorda
from a different CorDapp template repository. - A CPI file is uploaded without using the CorDapp template Gradle task.
This section describes how to reset the CorDapp template to handle these situations or other occasions when the CorDapp template tasks are not working as expected. This process does the following:
- Stops any processes related to the Corda cluster.
- Removes the existing Corda cluster software (but not the Corda CLI A command line tool that supports various Corda-related tasks, including Corda Package Installer (CPI) creation and Corda cluster management. ).
- Deletes all of the temporary files that the CorDapp template creates and uses.
- Runs the Gradle
clean
task to remove any CPI build artifacts.
The instructions in this section use the following terms:
project-root-dir
— the project directory of the IntelliJ project contained in the repo. For example, if you git-cloned thecorda/cordapp-template-kotlin
repo to/Users/charlie.smith/DevWork/DevExWork
,<project-root-dir>
is/Users/charlie.smith/DevWork/DevExWork/cordapp-template-kotlin
.user-home
— the user home directory.- On Windows, this is typically something like
C:\Users\Charlie.Smith
. - On macOS, this is typically something like
/Users/charlie.smith
. - On Linux, this is typically something like
/home/charlie.smith
.
- On Windows, this is typically something like
To reset the Corda runtime Gradle plugin:
Run the following command, to stop and remove Docker containers and network used by the Corda cluster, where:
config/combined-worker-compose.yaml
is the path to the compose file. This should match the value of thecomposeFilePath
property in thecordaRuntimeGradlePlugin
section of thebuild.gradle
file.corda-cluster
should match thecomposeNetworkName
property.corda-cluster
is the default value and is not set in the template code.
docker compose -f config/combined-worker-compose.yaml -p corda-cluster down
Run the Gradle clean task:
<project-root-dir>/gradlew clean
Delete the
<user-home>/.corda/corda5
directory and its contents.Delete the
<project-root-dir>/workspace
directory and its contents.You should now be able to run all CorDapp template Gradle tasks again. These tasks download the Corda cluster software and recreate all of the temporary files, as required.
Was this page helpful?
Thanks for your feedback!
Chat with us
Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.
Propose documentation improvements directly
Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.
We're sorry this page wasn't helpful. Let us know how we can make it better!
Chat with us
Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.
Create an issue
Create a new GitHub issue in this repository - submit technical feedback, draw attention to a potential documentation bug, or share ideas for improvement and general feedback.
Propose documentation improvements directly
Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.