Coder Social home page Coder Social logo

corda-gradle-plugins's Introduction

Gradle Plugins for Corda and Cordapps

The projects at this level of the project are gradle plugins for cordapps and are published to Maven Local with the rest of the Corda libraries.

From the beginning of development for Corda 4.0 these plugins have been split from the main Corda repository. Any changes to gradle plugins pre-4.0 should be on a release branch within the Corda repo. Any changes after 3.0 belong in this repository.

Version number

To modify the version number edit the root build.gradle.

Until v4.0, the version number was tracking the Corda version number it was built for. Eg; Corda 4.0 was built as 4.0.x. This was broken from v4.3 onwards (Corda 4.3 and plugins 5.0). The major version number will change when there is a breaking change, for example when the minimum (major) version of Gradle changes.

Corda 5 requires Corda Gradle Plugins 7.x.

Getting started

You will need JVM 8 installed and on the path to run and install these plugins. However, some plugins may also require a Java 11 toolchain for testing purposes.

Installing locally

To install locally for testing a new build against Corda you can run the following from the project root;

./gradlew install

Release process

The version number of the "bleeding edge" in master is always a -SNAPSHOT version. To create a new release, a maintainer must create a new branch off the latest commit in this release, remove the -SNAPSHOT from the version number, create a tag and then run the publish to artifactory task for the created tag in Jenkins. The version number in master is then advanced to the next -SNAPSHOT number.

Using the plugins.

These plugins are published to R3's Artifactory. More recently, they are also published to Gradle's own plugins repository and can be imported into your projects using Gradle's plugins DSL.

The plugins themselves fall into two categories: those intended for developing CorDapps, and those which are primarily used to build Corda itself.

Plugins for CorDapp development.

  • net.corda.plugins.cordapp-cpk2
    This plugin generates CPK-format CorDapps that are compatible with Corda 5, and supercedes Corda's original cordapp plugin. It will package your CorDapp classes into an OSGi bundle (a jar whose manifest contains OSGi metadata), and then package that bundle together with its dependencies into a .cpk archive. Dependencies which are added to Gradle's cordaProvided, cordaRuntimeOnly and cordapp configurations are excluded from the .cpk file. Both the OSGi bundle and the CPK archive are signed. The plugin also provides a cordapp Gradle extension so that you can configure your CorDapp's metadata.

    Requires Gradle 7.2

  • net.corda.plugins.quasar-utils
    This plugin configures a Gradle module to use Quasar. Specifically:

    • It allows you to specify the Maven group and version of the quasar-core artifact to use.
    • Adds the quasar-core artifact, along with all of its transitive dependencies, to Gradle's cordaRuntimeOnly configuration.
    • Adds the quasar-core artifact to Gradle's cordaProvided configuration without any of its transitive dependencies.
    • Applies the quasar-core Java agent to all of the module's JavaExec tasks.
    • Applies the quasar-core Java agent to all of the module's Test tasks.
    • Provides a quasar Gradle extension so that you can configure which packages the Quasar Java agent should not instrument at runtime.

    Requires Gradle 7.2

Internal Corda plugins.

These plugins are unlikely to be useful to CorDapp developers outside of R3.

  • net.corda.plugins.api-scanner
    This plugin scans the public and protected classes inside a Gradle module's "primary" jar artifact and writes a summary of their public and protected methods and fields into an output file. The "primary" jar is assumed by default to be the one without an archiveClassifier, although this is configurable. Its goal is to alert Corda developers to accidental breaks in our public ABI for those Corda modules we have declared to be "stable", and is used by the Continuous Integration builds.

    Requires Gradle 7.2

  • net.corda.plugins.jar-filter
    This plugin allows us to delete certain annotated classes, methods and fields from the compiled byte-code inside a jar file. It can also rewrite Kotlin classes' @kotlin.Metadata annotations to make them consistent again with their revised byte-code. It has been successfully tested with Kotlin 1.4.32 and 1.7.0.

    Requires Gradle 7.2

corda-gradle-plugins's People

Contributors

adagys avatar al-r3 avatar andr3ej avatar anthonykeenan avatar blsemo avatar bpaunescu avatar cburlinchon avatar chrisr3 avatar clintonio avatar davidleeuk avatar exfalso avatar fenryka avatar gary-rowe avatar igornitto avatar josephzunigadaly avatar kasiastreich avatar m4ksio avatar mat-rizzo-r3 avatar mikehearn avatar ragmondo avatar rick-r3 avatar roastario avatar ronanbrowne avatar shamsasari avatar sofusmortensen avatar sollecitom avatar szymonsztuka avatar thschroeter avatar vkolomeyko avatar woggioni avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

corda-gradle-plugins's Issues

Add classpath isolation

The deployNodes task is need need of quite a number of dependencies for its execution (Guava, Bouncycastle). In a larger multi-project Gradle project I run into problems because of versioning issues of the dependencies. I did not analyze the issue in detail. I guess some of those dependencies come from the Gradle classpath rather than the application compile classpath. It would be great if the plugin runs more or less fully isolated. Some typical patterns are using a custom classloader isolated from the Gradle classloader or using https://github.com/project-aries/docker-java-shaded.

I managed to get it working by adding all the corda dependencies onto the Gradle classpath, but that is something I really do not want to do:

buildscript{
dependencies{
classpath "net.corda:corda-core:$corda_release_version"
classpath "net.corda:corda-finance:$corda_release_version"
classpath "net.corda:corda-jackson:$corda_release_version"
classpath "net.corda:corda-rpc:$corda_release_version"
classpath "net.corda:corda-webserver-impl:$corda_release_version"
classpath "net.corda:corda:$corda_release_version"
classpath "net.corda:corda-webserver:$corda_release_version"
..
}
}

Cordapp Plugin - Usage of deprecated compile configuration

The Cordapp plugin seems to only include dependencies declared with the compile configuration in the fat jar. Since the compile configuration is deprecated and should be replaced with either implementation or api, the plugin should imho also support including these dependencies. More information on that topic can be found here.

I think the problem is in CordappPlugin.kt#L182. Here the deprecated constant RUNTIME_CONFIGURATION_NAME is used. According to the documentation this constant should be replaced with RUNTIME_ELEMENTS_CONFIGURATION_NAME.

I tested the behavior with the following two tasks:

tasks.register("listd1") {
    doLast {
        println("List RUNTIME_ELEMENTS")
        val runtimeConfiguration = project.configurations.single {it.name == RUNTIME_ELEMENTS_CONFIGURATION_NAME}
        runtimeConfiguration.allDependencies.map { println(it) }
        println("Finished RUNTIME_ELEMENTS")
    }
}

tasks.register("listd2") {
    doLast {
        println("List RUNTIME")
        val runtimeConfiguration = project.configurations.single {it.name == RUNTIME_CONFIGURATION_NAME}
        runtimeConfiguration.allDependencies.map { println(it) }
        println("Finished RUNTIME")
    }
}

From my point of view RUNTIME_ELEMENTS_CONFIGURATION_NAME provides the correct behavior. If you are interested in making the change I could provide a pull request.

Dockerform generates wrong ports for nodes

Hi, trying to generate nodes using Dockerform and getting weird result
Here my config

task deployNodes(type: net.corda.plugins.Dockerform, dependsOn: ['jar']) {
    nodeDefaults {
        projectCordapp {
            deploy = false
        }
        cordapp project(':contracts')
        cordapp project(':workflows')
    }
    node {
        name "O=Notary,L=London,C=GB"
        notary = [validating : false]
        p2pPort 10002
        rpcSettings {
            address("localhost:10003")
            adminAddress("localhost:10043")
        }
    }
    node {
        name "O=Users,L=London,C=GB"
        p2pPort 10005
        rpcSettings {
            address("localhost:10006")
            adminAddress("localhost:10046")
        }
        rpcUsers = [[ user: "user1", "password": "test", "permissions": ["ALL"]]]
    }
}

Running ./gradlew deplyNodes
This I've got for Notary node

// Notary/node.conf

p2pAddress="notary:10002"
rpcSettings {
    address="notary:10003"
    adminAddress="notary:10005"
}

And this for Users node

// Users/node.conf

p2pAddress="users:10005"
rpcSettings {
    address="users:10003"
    adminAddress="users:10005"
}

So it leads to error when trying to run nodes, so I need manually fix the issue. Interesting fact that I don't get such an error when using Cordform

Can't Set devMode From deployNodes

According to https://docs.corda.net/permissioning.html

In development mode (i.e. when devMode = true, see Node configuration for more information), pre-configured keystores are used if the required keystores do not exist.

deployNodes is not able to set devMode

It seems like devMode is set to true by default as certificates are generated if they don't exist.

The documentation should be updated to more clearly reflect that.

It should also be documented to state whether deployNodes should be used for production builds or if it is purely for development purposes.

If it is for production you should be able to set devMode=false so unsafe certificates are not accidentally generated.

NodeRunner isHeadless() check is inappropriate if using Tmux

This issue follows on from #12 - the headless check that NodeRunner performs shouldn't be done if running under Tmux.

Currently the logic is to check if the environment is headless and only if it isn't does it then later (if the environment is Linux) check if it's running under Tmux (in which case it opens Tmux screens) or not (in which case it opens Xterms).

However if it's running under Tmux then it shouldn't care about whether the setup is headless (as Tmux doesn't depend on a graphical environment). To fix this find the following like in NodeRunner.kt:

val headless = GraphicsEnvironment.isHeadless() || args.contains(HEADLESS_FLAG)

And change it to:

val headless = (GraphicsEnvironment.isHeadless() && !isTmux()) || args.contains(HEADLESS_FLAG)

As isTmux() is a simple environment variable check it'll work on Linux while not causing issues on non-Linux environments (where the TMUX environment variable is never set so the check will always return false).

deployNodes Doen't Use Right Version Of Java

Java 8 is set in the environment yet ./gradlew deployNodes thinks not.

$ echo $JAVA_HOME
/opt/jdk1.8.0_202
$ java -version
java version "1.8.0_202"
Java(TM) SE Runtime Environment (build 1.8.0_202-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.202-b08, mixed mode)
$ ./gradlew -version
------------------------------------------------------------
Gradle 4.10.1
------------------------------------------------------------
Build time:   2018-09-12 11:33:27 UTC
Revision:     76c9179ea9bddc32810f9125ad97c3315c544919
Kotlin DSL:   1.0-rc-6
Kotlin:       1.2.61
Groovy:       2.4.15
Ant:          Apache Ant(TM) version 1.9.11 compiled on March 23 2018
JVM:          1.8.0_202 (Oracle Corporation 25.202-b08)
OS:           Linux 5.1.0-050100-generic amd64

$ ./gradlew deployNodes
#### Error while generating node info file /Projects/corda-demo/build/nodes/Agent2/logs ####
Error: Unsupported Java version 11.0.3; currently only version 1.8 is supported.

If I run without any user config you can see that the wrong version of Java is coming from the system.

$ env -i bash --norc --noprofile
bash-4.4$ java -version
openjdk version "11.0.3" 2019-04-16
OpenJDK Runtime Environment (build 11.0.3+7-Ubuntu-1ubuntu218.04.1)
OpenJDK 64-Bit Server VM (build 11.0.3+7-Ubuntu-1ubuntu218.04.1, mixed mode, sharing)

If deployNodes is going to spawn another process it should use the environment from the parent and not the system environment.

Facing issue with v5.1.1

Hi,
I'm using Corda version 4.8.11, and due to log4j vulnerability had to move to gradle version 7.0+, and the only corda gradle plugin version 5.1.1 supports gradle version 7.0+.
But when I'm trying to use it in the same way this repo uses: https://github.com/corda/cordapp-template-kotlin/blob/release-V4/build.gradle
I'm getting following error:

> Task :jar
Cordapp metadata not defined for this gradle build file. See https://docs.corda.net/head/cordapp-build-systems.html#separation-of-cordapp-contracts-flows-and-services

> Task :deployNodes FAILED
Running Cordform task
Deleting build/nodes

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':deployNodes'.
> No JAR matching '^corda-(?!(testserver-|webserver-)).*\.jar$' found. Have you deployed the Corda project to Maven?

* 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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.6.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 5s
8 actionable tasks: 5 executed, 3 up-to-date

Although this repo is using old gradle 5.6 and corda gradle plugin is 5.0.12. I could not find any example for corda gradle plugin v5.1.1. There is no proper documentation anywhere on this too. So any kind of help on this would be really great.

Thanks.

dockerForm does not take the additionalP2PAddresses param

This might not be an issue exactly but dockerForm doesn't take the additionalP2PAddresses param.

Example build.gradle node configuration:

node {
    name "O=PartyA,L=London,C=GB"
    p2pPort 10002
    additionalP2PAddresses=[ "18.207.137.39:10002" ]
    rpcSettings {
        address("0.0.0.0:10012")
        adminAddress("0.0.0.0:10042")
    }
    sshdPort 2222
    rpcUsers = [[ user: "user1", "password": "test", "permissions": ["ALL"]]]
}

When building a CorDapp with this node config in the input, the following error will be thrown:

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/davidawad/Desktop/samples-java/Features/customlogging-yocordapp/build.gradle' line: 159

* What went wrong:
A problem occurred evaluating root project 'customlogging-yocordapp'.
> Could not set unknown property 'additionalP2PAddresses' for object of type net.corda.plugins.Node.

* 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 6s

runMigrationScripts=true does not create app-schemas

Corda version: Corda OS 4.7

In my CorDapp, I have defined some custom schemas by implementing queryable state. I have not defined any liquibase migration scripts.

My deploy node task looks like this

task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
    ......
    node {
        name "O=PartyA,L=London,C=GB"
        .......
        runSchemaMigration = true
    }
}

As per this article - https://www.corda.net/blog/continuing-database-harmonization-between-corda-and-corda-enterprise/
Using "runMigrationScripts "will by default run both core and app schemas and node will be ready to run."

I had that in my deployNodes task -> and executed runNodes - It showed exceptions saying there are missing tables [app-tables]

Incompatible schema change detected. Please run schema migration scripts (node with sub-command run-migration-scripts)
4:45
.../
Caused by: org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: missing table [xyz]
	at org.hibernate.tool.schema.internal.AbstractSchemaValidator.validateTable(AbstractSchemaValidator.java:121) ~[h

But when I used runnodes --allow-hibernate-to-manage-app-schema; It worked; pointing to the fact that the app-schemas werent created, only core-schemas were.

Which is not expected based on the comment in the article. Can you confirm?

signCordappJar breaks Gradle caching semantic

There is a a dedicated signCordappJar task that executed after the jar task and modifies the same file. Gradle caching algorithms require for tasks to make use of disjoint output paths in order to clearly track which file is touched by which tasks. It is probably best to add the signature within the Jar task or alternatively create a new signed jar (maybe the fat jar should be another jar anyway).

Cordform doesn't allow me to specify a log4j config file

On corda 4.6+

I'm not able to properly specify a custom log config file to use, when using the cordform task I have to manually add arguments to it myself.

I have an example cordapp where in the root build.gradle file I have added this config :

        extraConfig = [
                custom: [
                        jvmArgs: ["-Dlog4j.configurationFile=$projectDir/config/dev/log4j2.xml"]
                ]
        ]

and the corda nodes never include this option in the runnodes script.

How to reproduce :

Use this cordapp in the samples repo, https://github.com/corda/samples-java/tree/logging-cordapp/Basic/logging-cordapp

./gradlew deployNodes
./build/nodes/runnodes

Note that the corda nodes do NOT use the config file and do NOT log in json or create a node.json folder in the node's logs folder.

HOWEVER when I manually add that option with the correct path to the command, the nodes correctly log in json.

Thanks for any help.

Exclusions in jvmArgs are missing

The jvm arg of the quasar plugin is set via jvmArgs "-javaagent:${project.configurations.quasar.singleFile}" which results in -javaagent:lib/quasar.jar

An actual node has the jvm arg like:

-javaagent:lib/quasar.jar=x(antlr**;bftsmart**;co.paralleluniverse**;com.codahale**;com.esotericsoftware**;com.fasterxml**;com.google**;com.ibm**;com.intellij**;com.jcabi**;com.nhaarman**;com.opengamma**;com.typesafe**;com.zaxxer**;de.javakaffee**;groovy**;groovyjarjarantlr**;groovyjarjarasm**;io.atomix**;io.github**;io.netty**;jdk**;junit**;kotlin**;net.bytebuddy**;net.i2p**;org.apache**;org.assertj**;org.bouncycastle**;org.codehaus**;org.crsh**;org.dom4j**;org.fusesource**;org.h2**;org.hamcrest**;org.hibernate**;org.jboss**;org.jcp**;org.joda**;org.junit**;org.mockito**;org.objectweb**;org.objenesis**;org.slf4j**;org.w3c**;org.xml**;org.yaml**;reflectasm**;rx**;org.jolokia**)

All the exclusions in the quasar plugin are missing.
Visible on https://github.com/corda/corda/pull/4808/files

Grade build cache is not working properly

Clone the samples-kotlin project

git clone https://github.com/corda/samples-kotlin.git

Go to the negotiation cordapp

cd samples-kotlin/Advanced/negotiation-cordapp/

Remove gradle build cache

rm -rf ~/.gradle/caches/build-cache-1

Clean the output directory

./gradlew clean

Now compile the workflows-kotlin module using the gradle build cache:

./gradlew :workflows-kotlin:compileKotlin --build-cache --info

That's part of the output

Task :contracts-kotlin:compileKotlin
Build cache key for task ':contracts-kotlin:compileKotlin' is a28ea2174b89889611f6e999ebf92bd8
Task ':contracts-kotlin:compileKotlin' is not up-to-date because:
Output property 'destinationDir' file /workspace/samples-kotlin/Advanced/negotiation-cordapp/contracts-kotlin/build/classes/kotlin/main has been removed.
Output property 'destinationDir' file /workspace/samples-kotlin/Advanced/negotiation-cordapp/contracts-kotlin/build/classes/kotlin/main/META-INF has been removed.
Output property 'destinationDir' file /workspace/samples-kotlin/Advanced/negotiation-cordapp/contracts-kotlin/build/classes/kotlin/main/META-INF/contracts-kotlin.kotlin_module has been removed.
All input files are considered out-of-date for incremental task ':contracts-kotlin:compileKotlin'.
file or directory '/workspace/samples-kotlin/Advanced/negotiation-cordapp/contracts-kotlin/src/main/java', not found
file or directory '/workspace/samples-kotlin/Advanced/negotiation-cordapp/contracts-kotlin/src/main/java', not found
Packing task ':contracts-kotlin:compileKotlin'
:contracts-kotlin:compileKotlin (Thread[Execution worker for ':',5,main]) completed. Took 4.547 secs.
:contracts-kotlin:compileJava (Thread[Execution worker for ':',5,main]) started.

Task :contracts-kotlin:compileJava NO-SOURCE
file or directory '/workspace/samples-kotlin/Advanced/negotiation-cordapp/contracts-kotlin/src/main/java', not found
Skipping task ':contracts-kotlin:compileJava' as it has no source files and no previous output files.
:contracts-kotlin:compileJava (Thread[Execution worker for ':',5,main]) completed. Took 0.002 secs.
:contracts-kotlin:processResources (Thread[Execution worker for ':',5,main]) started.

Task :contracts-kotlin:processResources NO-SOURCE
file or directory '/workspace/samples-kotlin/Advanced/negotiation-cordapp/contracts-kotlin/src/main/resources', not found
Skipping task ':contracts-kotlin:processResources' as it has no source files and no previous output files.
:contracts-kotlin:processResources (Thread[Execution worker for ':',5,main]) completed. Took 0.0 secs.
:contracts-kotlin:classes (Thread[Execution worker for ':',5,main]) started.

Task :contracts-kotlin:classes UP-TO-DATE
Skipping task ':contracts-kotlin:classes' as it has no actions.
:contracts-kotlin:classes (Thread[Execution worker for ':',5,main]) completed. Took 0.0 secs.
:contracts-kotlin:configureCordappFatJar (Thread[Execution worker for ':',5,main]) started.

Task :contracts-kotlin:configureCordappFatJar
Custom actions are attached to task ':contracts-kotlin:configureCordappFatJar'.
Caching disabled for task ':contracts-kotlin:configureCordappFatJar' because:
Caching has not been enabled for the task
Task ':contracts-kotlin:configureCordappFatJar' is not up-to-date because:
Task has not declared any outputs despite executing actions.
Finding direct non-corda dependencies for inclusion in CorDapp JAR
:contracts-kotlin:configureCordappFatJar (Thread[Execution worker for ':',5,main]) completed. Took 0.029 secs.
:contracts-kotlin:inspectClassesForKotlinIC (Thread[Execution worker for ':',5,main]) started.

Task :contracts-kotlin:inspectClassesForKotlinIC
Caching disabled for task ':contracts-kotlin:inspectClassesForKotlinIC' because:
Caching has not been enabled for the task
Task ':contracts-kotlin:inspectClassesForKotlinIC' is not up-to-date because:
Output property 'classesListFile$kotlin_gradle_plugin' file /workspace/samples-kotlin/Advanced/negotiation-cordapp/contracts-kotlin/build/kotlin/contractskotlin02jar-classes.txt has been removed.
file or directory '/workspace/samples-kotlin/Advanced/negotiation-cordapp/contracts-kotlin/build/classes/java/main', not found
:contracts-kotlin:inspectClassesForKotlinIC (Thread[Execution worker for ':',5,main]) completed. Took 0.007 secs.
:contracts-kotlin:jar (Thread[Execution worker for ':',5,main]) started.
[ant:signjar] jar signed.
[ant:signjar]
[ant:signjar] Warning:
[ant:signjar] The signer's certificate is self-signed.
[ant:signjar] Enter Passphrase for keystore: Enter key password for cordacodesign:

Task :contracts-kotlin:jar
Custom actions are attached to task ':contracts-kotlin:jar'.
Caching disabled for task ':contracts-kotlin:jar' because:
Caching has not been enabled for the task
Task ':contracts-kotlin:jar' is not up-to-date because:
Output property 'archiveFile' file /workspace/samples-kotlin/Advanced/negotiation-cordapp/contracts-kotlin/build/libs/contracts-kotlin-0.2.jar has been removed.
CorDapp JAR signing with the default Corda development key, suitable for Corda running in development mode only.
Jar signing with following options: {alias=cordacodesign, storepass=cordacadevpass, keystore=/tmp/cordadevcakeys3771095016112066472jks, storetype=JKS, keypass=cordacadevkeypass, jar=/workspace/samples-kotlin/Advanced/negotiation-cordapp/contracts-kotlin/build/libs/contracts-kotlin-0.2.jar}
[ant:signjar] Signing JAR: /workspace/samples-kotlin/Advanced/negotiation-cordapp/contracts-kotlin/build/libs/contracts-kotlin-0.2.jar to /workspace/samples-kotlin/Advanced/negotiation-cordapp/contracts-kotlin/build/libs/contracts-kotlin-0.2.jar as cordacodesign
:contracts-kotlin:jar (Thread[Execution worker for ':',5,main]) completed. Took 1.522 secs.
:workflows-kotlin:compileKotlin (Thread[Execution worker for ':',5,main]) started.

Task :workflows-kotlin:compileKotlin
Build cache key for task ':workflows-kotlin:compileKotlin' is 63f7d28e8a5e95419ee5890a84f912fd
Task ':workflows-kotlin:compileKotlin' is not up-to-date because:
Output property 'destinationDir' file /workspace/samples-kotlin/Advanced/negotiation-cordapp/workflows-kotlin/build/classes/kotlin/main has been removed.
Output property 'destinationDir' file /workspace/samples-kotlin/Advanced/negotiation-cordapp/workflows-kotlin/build/classes/kotlin/main/META-INF has been removed.
Output property 'destinationDir' file /workspace/samples-kotlin/Advanced/negotiation-cordapp/workflows-kotlin/build/classes/kotlin/main/META-INF/workflows-kotlin.kotlin_module has been removed.
All input files are considered out-of-date for incremental task ':workflows-kotlin:compileKotlin'.
file or directory '/workspace/samples-kotlin/Advanced/negotiation-cordapp/workflows-kotlin/src/main/java', not found
file or directory '/workspace/samples-kotlin/Advanced/negotiation-cordapp/workflows-kotlin/src/main/java', not found
Packing task ':workflows-kotlin:compileKotlin'
:workflows-kotlin:compileKotlin (Thread[Execution worker for ':',5,main]) completed. Took 1.306 secs.

Both tasks :contracts-kotlin:compileKotlin and :workflows-kotlin:compileKotlin are executed as expected as the cache is empty.

Clean the output directory one more time

./gradlew clean

Now compile the workflows-kotlin module using the gradle build cache:

./gradlew :workflows-kotlin:compileKotlin --build-cache --info

That's part of the output

Task :contracts-kotlin:compileKotlin FROM-CACHE
Build cache key for task ':contracts-kotlin:compileKotlin' is a28ea2174b89889611f6e999ebf92bd8
Task ':contracts-kotlin:compileKotlin' is not up-to-date because:
Output property 'destinationDir' file /workspace/samples-kotlin/Advanced/negotiation-cordapp/contracts-kotlin/build/classes/kotlin/main has been removed.
Output property 'destinationDir' file /workspace/samples-kotlin/Advanced/negotiation-cordapp/contracts-kotlin/build/classes/kotlin/main/META-INF has been removed.
Output property 'destinationDir' file /workspace/samples-kotlin/Advanced/negotiation-cordapp/contracts-kotlin/build/classes/kotlin/main/META-INF/contracts-kotlin.kotlin_module has been removed.
Origin for org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution@40bdaad4: {executionTime=4520, hostName=mrpoopybutthole, operatingSystem=Linux, buildInvocationId=7z7ip7sm3vblnp4xqzdd24g2me, creationTime=1601893169735, identity=:contracts-kotlin:compileKotlin, type=org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.TaskExecution, userName=diegomrsantos, gradleVersion=5.4.1, rootPath=/workspace/samples-kotlin/Advanced/negotiation-cordapp}
Unpacked trees for task ':contracts-kotlin:compileKotlin' from cache.
:contracts-kotlin:compileKotlin (Thread[Execution worker for ':',5,main]) completed. Took 0.057 secs.
:contracts-kotlin:compileJava (Thread[Execution worker for ':',5,main]) started.

Task :contracts-kotlin:compileJava NO-SOURCE
file or directory '/workspace/samples-kotlin/Advanced/negotiation-cordapp/contracts-kotlin/src/main/java', not found
Skipping task ':contracts-kotlin:compileJava' as it has no source files and no previous output files.
:contracts-kotlin:compileJava (Thread[Execution worker for ':',5,main]) completed. Took 0.001 secs.
:contracts-kotlin:processResources (Thread[Execution worker for ':',5,main]) started.

Task :contracts-kotlin:processResources NO-SOURCE
file or directory '/workspace/samples-kotlin/Advanced/negotiation-cordapp/contracts-kotlin/src/main/resources', not found
Skipping task ':contracts-kotlin:processResources' as it has no source files and no previous output files.
:contracts-kotlin:processResources (Thread[Execution worker for ':',5,main]) completed. Took 0.0 secs.
:contracts-kotlin:classes (Thread[Execution worker for ':',5,main]) started.

Task :contracts-kotlin:classes UP-TO-DATE
Skipping task ':contracts-kotlin:classes' as it has no actions.
:contracts-kotlin:classes (Thread[Execution worker for ':',5,main]) completed. Took 0.0 secs.
:contracts-kotlin:configureCordappFatJar (Thread[Execution worker for ':',5,main]) started.

Task :contracts-kotlin:configureCordappFatJar
Custom actions are attached to task ':contracts-kotlin:configureCordappFatJar'.
Caching disabled for task ':contracts-kotlin:configureCordappFatJar' because:
Caching has not been enabled for the task
Task ':contracts-kotlin:configureCordappFatJar' is not up-to-date because:
Task has not declared any outputs despite executing actions.
Finding direct non-corda dependencies for inclusion in CorDapp JAR
:contracts-kotlin:configureCordappFatJar (Thread[Execution worker for ':',5,main]) completed. Took 0.02 secs.
:contracts-kotlin:inspectClassesForKotlinIC (Thread[Execution worker for ':',5,main]) started.

Task :contracts-kotlin:inspectClassesForKotlinIC
Caching disabled for task ':contracts-kotlin:inspectClassesForKotlinIC' because:
Caching has not been enabled for the task
Task ':contracts-kotlin:inspectClassesForKotlinIC' is not up-to-date because:
Output property 'classesListFile$kotlin_gradle_plugin' file /workspace/samples-kotlin/Advanced/negotiation-cordapp/contracts-kotlin/build/kotlin/contractskotlin02jar-classes.txt has been removed.
file or directory '/workspace/samples-kotlin/Advanced/negotiation-cordapp/contracts-kotlin/build/classes/java/main', not found
:contracts-kotlin:inspectClassesForKotlinIC (Thread[Execution worker for ':',5,main]) completed. Took 0.003 secs.
:contracts-kotlin:jar (Thread[Execution worker for ':',5,main]) started.
[ant:signjar] jar signed.
[ant:signjar]
[ant:signjar] Warning:
[ant:signjar] The signer's certificate is self-signed.
[ant:signjar] Enter Passphrase for keystore: Enter key password for cordacodesign:

Task :contracts-kotlin:jar
Custom actions are attached to task ':contracts-kotlin:jar'.
Caching disabled for task ':contracts-kotlin:jar' because:
Caching has not been enabled for the task
Task ':contracts-kotlin:jar' is not up-to-date because:
Output property 'archiveFile' file /workspace/samples-kotlin/Advanced/negotiation-cordapp/contracts-kotlin/build/libs/contracts-kotlin-0.2.jar has been removed.
CorDapp JAR signing with the default Corda development key, suitable for Corda running in development mode only.
Jar signing with following options: {alias=cordacodesign, storepass=cordacadevpass, keystore=/tmp/cordadevcakeys9052883946585902024jks, storetype=JKS, keypass=cordacadevkeypass, jar=/workspace/samples-kotlin/Advanced/negotiation-cordapp/contracts-kotlin/build/libs/contracts-kotlin-0.2.jar}
[ant:signjar] Signing JAR: /workspace/samples-kotlin/Advanced/negotiation-cordapp/contracts-kotlin/build/libs/contracts-kotlin-0.2.jar to /workspace/samples-kotlin/Advanced/negotiation-cordapp/contracts-kotlin/build/libs/contracts-kotlin-0.2.jar as cordacodesign
:contracts-kotlin:jar (Thread[Execution worker for ':',5,main]) completed. Took 1.313 secs.
:workflows-kotlin:compileKotlin (Thread[Execution worker for ':',5,main]) started.

Task :workflows-kotlin:compileKotlin
Build cache key for task ':workflows-kotlin:compileKotlin' is b88a78d738bfb64a3ed2ad4cdbfe8726
Task ':workflows-kotlin:compileKotlin' is not up-to-date because:
Output property 'destinationDir' file /workspace/samples-kotlin/Advanced/negotiation-cordapp/workflows-kotlin/build/classes/kotlin/main has been removed.
Output property 'destinationDir' file /workspace/samples-kotlin/Advanced/negotiation-cordapp/workflows-kotlin/build/classes/kotlin/main/META-INF has been removed.
Output property 'destinationDir' file /workspace/samples-kotlin/Advanced/negotiation-cordapp/workflows-kotlin/build/classes/kotlin/main/META-INF/workflows-kotlin.kotlin_module has been removed.
All input files are considered out-of-date for incremental task ':workflows-kotlin:compileKotlin'.
file or directory '/workspace/samples-kotlin/Advanced/negotiation-cordapp/workflows-kotlin/src/main/java', not found
file or directory '/workspace/samples-kotlin/Advanced/negotiation-cordapp/workflows-kotlin/src/main/java', not found
Packing task ':workflows-kotlin:compileKotlin'
:workflows-kotlin:compileKotlin (Thread[Execution worker for ':',5,main]) completed. Took 1.043 secs.

The task :contracts-kotlin:compileKotlin is retrieved from the cache, but the task :workflows-kotlin:compileKotlin is not. Nothing was modified in the project.

If we enable gradle caching debug

./gradlew :workflows-kotlin:compileKotlin --build-cache -Dorg.gradle.caching.debug=true

We see this in the output

Task :workflows-kotlin:compileKotlin
Appending implementation to build cache key: org.jetbrains.kotlin.gradle.tasks.KotlinCompile_Decorated@e8fbdc73afb94883285acc9e7cbf2508
Appending additional implementation to build cache key: org.jetbrains.kotlin.gradle.tasks.KotlinCompile_Decorated@e8fbdc73afb94883285acc9e7cbf2508
Appending input value fingerprint for 'coroutinesStr$kotlin_gradle_plugin' to build cache key: f11c69e19062475a4bd6447e0c6820fc
Appending input value fingerprint for 'filteredArgumentsMap' to build cache key: e81e29e68b39c6ecb6cbd133e65b8357
Appending input value fingerprint for 'incremental' to build cache key: c06857e9ea338f3f3a24bb78f8fbdf6f
Appending input value fingerprint for 'javaPackagePrefix' to build cache key: f6bd6b3389b872033d462029172c8612
Appending input value fingerprint for 'moduleName$kotlin_gradle_plugin' to build cache key: 0fa93a7a9b880d78afcfacb36fa1410f
Appending input value fingerprint for 'sourceCompatibility' to build cache key: 12f0ae79f405c46e9045f83b66543728
Appending input value fingerprint for 'targetCompatibility' to build cache key: 12f0ae79f405c46e9045f83b66543728
Appending input value fingerprint for 'useFallbackCompilerSearch$kotlin_gradle_plugin' to build cache key: c06857e9ea338f3f3a24bb78f8fbdf6f
Appending input value fingerprint for 'useModuleDetection$kotlin_gradle_plugin' to build cache key: c06857e9ea338f3f3a24bb78f8fbdf6f
Appending input value fingerprint for 'usePreciseJavaTracking' to build cache key: f6d7ed39fe24031e22d54f3fe65b901c
Appending input file fingerprints for 'additionalClasspath' to build cache key: 5fd1e7396e8de4cb5c23dc6aadd7787a
Appending input file fingerprints for 'classpath' to build cache key: a205213469fbbde7b4c86c707b7c78fc
Appending input file fingerprints for 'commonSourceSet$kotlin_gradle_plugin' to build cache key: 5fd1e7396e8de4cb5c23dc6aadd7787a
Appending input file fingerprints for 'computedCompilerClasspath$kotlin_gradle_plugin' to build cache key: c12986a46a8f661947b468a6ba1ffa03
Appending input file fingerprints for 'pluginClasspath' to build cache key: 529f254376edfb889ce878d49a799ca1
Appending input file fingerprints for 'source' to build cache key: 8550e60cdcf6a5b2e4b9266e8a95617a
Appending output property name to build cache key: destinationDir
Build cache key for task ':workflows-kotlin:compileKotlin' is 1d889453d3f2244e8731dc3fbe4c6e36

The classpath input for the task :workflows-kotlin:compileKotlin is changing in every run. Even if nothing was modified in the project.

Where is the latest version published?

I need to use the latest version of the gradle plugins (4.0.47) because they have a bugfix that affects me, but I can't figure out which repository they are published to.

I tried:
buildscript {

repositories {
mavenLocal()
mavenCentral()
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
}

dependencies {
// option 1
classpath "gradle.plugin.net.corda.plugins:cordformation:4.0.47"
// option 2
classpath "net.corda.plugins:cordformation:4.0.47"
}
}

The error I get:

Could not resolve all artifacts for configuration ':classpath'.
Could not find net.corda.plugins:cordapp:4.0.47.
Searched in the following locations:
- file:/home/voddan/.m2/repository/net/corda/plugins/cordapp/4.0.47/cordapp-4.0.47.pom
- file:/home/voddan/.m2/repository/net/corda/plugins/cordapp/4.0.47/cordapp-4.0.47.jar
- https://repo.maven.apache.org/maven2/net/corda/plugins/cordapp/4.0.47/cordapp-4.0.47.pom
- https://repo.maven.apache.org/maven2/net/corda/plugins/cordapp/4.0.47/cordapp-4.0.47.jar
- https://jcenter.bintray.com/net/corda/plugins/cordapp/4.0.47/cordapp-4.0.47.pom
- https://jcenter.bintray.com/net/corda/plugins/cordapp/4.0.47/cordapp-4.0.47.jar
- https://plugins.gradle.org/m2/net/corda/plugins/cordapp/4.0.47/cordapp-4.0.47.pom
- https://plugins.gradle.org/m2/net/corda/plugins/cordapp/4.0.47/cordapp-4.0.47.jar
Required by:
project : > gradle.plugin.net.corda.plugins:cordformation:4.0.47

Cordformation not implicitly handling Groovy GString for config parsing.

Version 5.0.15
Applies to Cordform and Dockerform

Issue:

First four def vars resolve and behave correctly but placing the variable in an embedded string such as extraConfig throws error not valid to create ConfigValue from: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5004.

Solution is to convert the enclosing string "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=$baseDebugPort".toString() with toString.

This might be something done behind the scenes or transparent to user though as it's not immediately apparent how to fix.

    def p2pBasePort = 10014
    def rpcBasePort = 10015
    def rpcAdminBasePort = 10055
    def sshdBasePort = 2225
    def baseDebugPort = 5004
    for (i in 0..investorNumber) {
        node {
            name "O=Investor$i,L=Vancouver,C=CA"
            p2pPort p2pBasePort//10014
            p2pAddress "0.0.0.0"
            rpcSettings {
                address("0.0.0.0:$rpcBasePort")
                adminAddress("0.0.0.0:$rpcAdminBasePort")
            }
            rpcUsers = [
                    [ user: "user1", "password": "test", "permissions": ["ALL"]],
                    [ user: "admin", "password": "test", "permissions": ["ALL"]],
                    [ user: "agency", "password": "test", "permissions": ["ALL"]],
                    [ user: "issuer", "password": "test", "permissions": ["ALL"]],
                    [ user: "banker", "password": "test", "permissions": ["ALL"]],
                    [ user: "investor", "password": "test", "permissions": ["ALL"]],
            ]
            extraConfig = [
                    'custom.jvmArgs': [
                            "-Xmx1G",
                            "-XX:+UseG1GC",
                            "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=$baseDebugPort"
                    ]
            ]
            sshdPort sshdBasePort
        }
        p2pBasePort++
        rpcBasePort++
        rpcAdminBasePort++
        sshdBasePort++
        baseDebugPort++
    }
Execution failed for task ':createDockerNodes'.
> bug in method caller: not valid to create ConfigValue from: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5004
* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':createDockerNodes'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$3.accept(ExecuteActionsTaskExecuter.java:166)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$3.accept(ExecuteActionsTaskExecuter.java:163)
at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:191)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:156)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:62)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:108)
at org.gradle.api.internal.tasks.execution.ResolveBeforeExecutionOutputsTaskExecuter.execute(ResolveBeforeExecutionOutputsTaskExecuter.java:67)
at org.gradle.api.internal.tasks.execution.ResolveAfterPreviousExecutionStateTaskExecuter.execute(ResolveAfterPreviousExecutionStateTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:94)
at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:95)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:416)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:406)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:43)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:355)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:343)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:336)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:322)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:134)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:129)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:202)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:193)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:129)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
Caused by: com.typesafe.config.ConfigException$BugOrBroken: bug in method caller: not valid to create ConfigValue from: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5004
at com.typesafe.config.impl.ConfigImpl.fromAnyRef(ConfigImpl.java:281)
at com.typesafe.config.impl.ConfigImpl.fromAnyRef(ConfigImpl.java:273)
at com.typesafe.config.impl.PropertiesParser.fromPathMap(PropertiesParser.java:152)
at com.typesafe.config.impl.PropertiesParser.fromPathMap(PropertiesParser.java:82)
at com.typesafe.config.impl.ConfigImpl.fromAnyRef(ConfigImpl.java:264)
at com.typesafe.config.impl.ConfigImpl.fromPathMap(ConfigImpl.java:200)
at com.typesafe.config.ConfigFactory.parseMap(ConfigFactory.java:1038)
at com.typesafe.config.ConfigFactory.parseMap(ConfigFactory.java:1049)
at net.corda.plugins.Node.configureProperties(Node.kt:488)
at net.corda.plugins.Node.installDockerConfig$cordformation(Node.kt:667)
at net.corda.plugins.Dockerform.build(Dockerform.kt:95)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:103)

"Slim-JAR" from CordApp project (for RPC/re-use outside of Corda)

We are currently programming against Corda 4 and we feel that the way the cordapp plugin achieves its goal makes our gradle setup unnecessarily bloated.

Expected

We maintain our flows/contracts/states in one gradle project. We can configure this gradle project to produce

  • a CordApp (semi-fat JAR) for deployment in the network
  • a traditional (slim) JAR that other gradle projects can consume to trigger the flows that our CordApp offers via RPC
  • consumers of the traditional JAR can fetch the slim JAR from a maven repository.
  • The CordApp and slim JAR have the same artifact name, but different qualifiers

Actual

  • The cordapp plugin 'hijacks' the jar task that the java library plugin has set up. This means that if we (corda users) want to have a "normal" jar task, we have to re-implement java library plugin functionality to create an "unmodified" jar task.
  • The cordapp plugin manipulates all generated Maven POMs (injecting the DelegatedPom/FilteredPom). This means that consumers of the slim JAR won't have dependency information and need to specify transitive dependencies manually.

Workaround

Naturally, we can set up a second gradle project that produces the slim "client"/"api" JAR:

  • The "api" JAR contains our contract/state/flows. It's normal Java library and gets consumed by code that communicates with the Corda node via RPC
  • A separate "cordapp" project contains no code and just references the "api" JAR to produce a semi-fat CordApp JAR.

Drawbacks of the workaround:

  • Two distinct artifact names
  • More complex project model

Ideas

CordApp feels a bit like a WAR/EAR. There is a CordApp-specific manifest file and it contains its dependencies (albeit unpacked).

Would be an option to structure the CordappPlugin more like the WarPlugin so that it configures a type: CordApp task (subclass of Jar) that is independent of any jar task configured by the JavaLibraryPlugin?

As for the generated Maven POM, it should be possible to control the POM that gets used via the MavenPublication.

Dockerform NoSuchMethodError on representScalar for Kotlin project

Any ideas on what could be causing the below error? It's isolated to a particular project, I am able to run the dockerform task in another project successfully - using the exact same task configuration.

Below are the properties, task, and result...

cordaVersion=4.7
cordaCoreVersion=4.7
gradlePluginsVersion=5.0.12
kotlinVersion=1.2.71
junitVersion=4.12
quasarVersion=0.7.10
log4jVersion=2.11.2
platformVersion=8
slf4jVersion=1.7.25
nettyVersion=4.1.22.Final
freighterVersion=0.7.4-SNAPSHOT
httpTestServer=20070405
springBootVersion = 2.0.2.RELEASE
springBootGradlePluginVersion = 2.1.1.RELEASE
task prepareDockerNodes(type: net.corda.plugins.Dockerform, dependsOn: ['jar']) {

    dockerImage = "corda/corda-zulu-java1.8-" + corda_release_version + ":latest"

    nodeDefaults {
        projectCordapp {
            deploy = false
        }
        rpcUsers = [[user: "user1", "password": "test", "permissions": ["ALL"]]]
    }

    node {
        name "O=Notary,L=London,C=GB"
        notary = [validating: false]
        p2pPort 10001
        p2pAddress "0.0.0.0"
        rpcSettings {
            address("0.0.0.0:10011")
            adminAddress("0.0.0.0:10041")
        }
        sshdPort 2221
    }

    node {
        name "O=PartyA,L=London,C=GB"
        p2pPort 10002
        p2pAddress "0.0.0.0"
        rpcSettings {
            address("0.0.0.0:10012")
            adminAddress("0.0.0.0:10042")
        }
        sshdPort 2222
    }

    node {
        name "O=PartyB,L=New York,C=US"
        p2pPort 10003
        p2pAddress "0.0.0.0"
        rpcSettings {
            address("0.0.0.0:10013")
            adminAddress("0.0.0.0:10043")
        }
        sshdPort 2223
    }
}
Execution failed for task ':prepareDockerNodes'.
> net.corda.plugins.Dockerform$DockerComposeRepresenter.representScalar(Lorg/yaml/snakeyaml/nodes/Tag;Ljava/lang/String;Ljava/lang/Character;)Lorg/yaml/snakeyaml/nodes/Node;

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':prepareDockerNodes'.
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$3.accept(ExecuteActionsTaskExecuter.java:166)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$3.accept(ExecuteActionsTaskExecuter.java:163)
	at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:191)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:156)
	at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:62)
	at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:108)
	at org.gradle.api.internal.tasks.execution.ResolveBeforeExecutionOutputsTaskExecuter.execute(ResolveBeforeExecutionOutputsTaskExecuter.java:67)
	at org.gradle.api.internal.tasks.execution.ResolveAfterPreviousExecutionStateTaskExecuter.execute(ResolveAfterPreviousExecutionStateTaskExecuter.java:46)
	at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:94)
	at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
	at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:95)
	at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
	at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:416)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:406)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102)
	at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
	at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:43)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:355)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:343)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:336)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:322)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:134)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:129)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:202)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:193)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:129)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
Caused by: java.lang.NoSuchMethodError: net.corda.plugins.Dockerform$DockerComposeRepresenter.representScalar(Lorg/yaml/snakeyaml/nodes/Tag;Ljava/lang/String;Ljava/lang/Character;)Lorg/yaml/snakeyaml/nodes/Node;
	at net.corda.plugins.Dockerform$DockerComposeRepresenter.access$representScalar(Dockerform.kt:219)
	at net.corda.plugins.Dockerform$DockerComposeRepresenter$RepresentQuotedString.representData(Dockerform.kt:224)
	at org.yaml.snakeyaml.representer.BaseRepresenter.representData(BaseRepresenter.java:89)
	at org.yaml.snakeyaml.representer.BaseRepresenter.representSequence(BaseRepresenter.java:134)
	at org.yaml.snakeyaml.representer.SafeRepresenter$RepresentList.representData(SafeRepresenter.java:190)
	at org.yaml.snakeyaml.representer.BaseRepresenter.representData(BaseRepresenter.java:95)
	at org.yaml.snakeyaml.representer.BaseRepresenter.representMapping(BaseRepresenter.java:157)
	at org.yaml.snakeyaml.representer.SafeRepresenter$RepresentMap.representData(SafeRepresenter.java:321)
	at org.yaml.snakeyaml.representer.BaseRepresenter.representData(BaseRepresenter.java:95)
	at org.yaml.snakeyaml.representer.BaseRepresenter.representMapping(BaseRepresenter.java:157)
	at org.yaml.snakeyaml.representer.SafeRepresenter$RepresentMap.representData(SafeRepresenter.java:321)
	at org.yaml.snakeyaml.representer.BaseRepresenter.representData(BaseRepresenter.java:95)
	at org.yaml.snakeyaml.representer.BaseRepresenter.representMapping(BaseRepresenter.java:157)
	at org.yaml.snakeyaml.representer.SafeRepresenter$RepresentMap.representData(SafeRepresenter.java:321)
	at org.yaml.snakeyaml.representer.BaseRepresenter.representData(BaseRepresenter.java:95)
	at org.yaml.snakeyaml.representer.BaseRepresenter.represent(BaseRepresenter.java:65)
	at org.yaml.snakeyaml.Yaml.dumpAll(Yaml.java:275)
	at org.yaml.snakeyaml.Yaml.dumpAll(Yaml.java:243)
	at org.yaml.snakeyaml.Yaml.dump(Yaml.java:220)
	at net.corda.plugins.Dockerform.build(Dockerform.kt:212)
	at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:103)

Dockerform generated docker image version "corda/corda-zulu-4.3" is not available in docker hub

Description
docker-compose file is created via net.corda.plugins.Dockerform gradle plugin using following task from the documentation contains the docker image image: corda/corda-zulu-4.3 not available in the docker hub which results below error.

Only by downgraing the app to 4.1 solved the issue.

Error

ERROR: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

gradle task

    nodeDefaults {
        cordapp project(":contracts")
    }
    node {
        name "O=Notary,L=London,C=GB"
        notary = [validating : false]
        p2pPort 10002
        rpcSettings {
            address("localhost:10003")
            adminAddress("localhost:10023")
        }
        projectCordapp {
            deploy = false
        }
        cordapps.clear()
    }
    node {
        name "O=PartyA,L=London,C=GB"
        p2pPort 10002
        rpcSettings {
            address("localhost:10003")
            adminAddress("localhost:10023")
        }
        rpcUsers = [[user: "user1", "password": "test", "permissions": ["ALL"]]]
    }
    node {
        name "O=PartyB,L=New York,C=US"
        p2pPort 10002
        rpcSettings {
            address("localhost:10003")
            adminAddress("localhost:10023")
        }
        rpcUsers = [[user: "user1", "password": "test", "permissions": ["ALL"]]]
    }
}`

**generated docker-compose.yml**

```version: '3'
services:
  notary:
    volumes:
    - /home/rimash/Work/Corda/cordapp-template-java/build/nodes/Notary/node.conf:/etc/corda/node.conf
    - /home/rimash/Work/Corda/cordapp-template-java/build/nodes/Notary/certificates:/opt/corda/certificates
    - /home/rimash/Work/Corda/cordapp-template-java/build/nodes/Notary/logs:/opt/corda/logs
    - /home/rimash/Work/Corda/cordapp-template-java/build/nodes/Notary/persistence:/opt/corda/persistence
    - /home/rimash/Work/Corda/cordapp-template-java/build/nodes/Notary/cordapps:/opt/corda/cordapps
    - /home/rimash/Work/Corda/cordapp-template-java/build/nodes/Notary/network-parameters:/opt/corda/network-parameters
    - /home/rimash/Work/Corda/cordapp-template-java/build/nodes/Notary/additional-node-infos:/opt/corda/additional-node-infos
    - /home/rimash/Work/Corda/cordapp-template-java/build/nodes/Notary/drivers:/opt/corda/drivers
    ports:
    - 10003
    - 22022
    **image: corda/corda-zulu-4.3**
  partya:
    volumes:
    - /home/rimash/Work/Corda/cordapp-template-java/build/nodes/PartyA/node.conf:/etc/corda/node.conf
    - /home/rimash/Work/Corda/cordapp-template-java/build/nodes/PartyA/certificates:/opt/corda/certificates
    - /home/rimash/Work/Corda/cordapp-template-java/build/nodes/PartyA/logs:/opt/corda/logs
    - /home/rimash/Work/Corda/cordapp-template-java/build/nodes/PartyA/persistence:/opt/corda/persistence
    - /home/rimash/Work/Corda/cordapp-template-java/build/nodes/PartyA/cordapps:/opt/corda/cordapps
    - /home/rimash/Work/Corda/cordapp-template-java/build/nodes/PartyA/network-parameters:/opt/corda/network-parameters
    - /home/rimash/Work/Corda/cordapp-template-java/build/nodes/PartyA/additional-node-infos:/opt/corda/additional-node-infos
    - /home/rimash/Work/Corda/cordapp-template-java/build/nodes/PartyA/drivers:/opt/corda/drivers
    ports:
    - 10003
    - 22022
    **image: corda/corda-zulu-4.3**
  partyb:
    volumes:
    - /home/rimash/Work/Corda/cordapp-template-java/build/nodes/PartyB/node.conf:/etc/corda/node.conf
    - /home/rimash/Work/Corda/cordapp-template-java/build/nodes/PartyB/certificates:/opt/corda/certificates
    - /home/rimash/Work/Corda/cordapp-template-java/build/nodes/PartyB/logs:/opt/corda/logs
    - /home/rimash/Work/Corda/cordapp-template-java/build/nodes/PartyB/persistence:/opt/corda/persistence
    - /home/rimash/Work/Corda/cordapp-template-java/build/nodes/PartyB/cordapps:/opt/corda/cordapps
    - /home/rimash/Work/Corda/cordapp-template-java/build/nodes/PartyB/network-parameters:/opt/corda/network-parameters
    - /home/rimash/Work/Corda/cordapp-template-java/build/nodes/PartyB/additional-node-infos:/opt/corda/additional-node-infos
    - /home/rimash/Work/Corda/cordapp-template-java/build/nodes/PartyB/drivers:/opt/corda/drivers
    ports:
    - 10003
    - 22022
    **image: corda/corda-zulu-4.3**

Steps to recreate

Follow the documentation

Versions

cordaVersion=4.3
gradlePluginsVersion=5.0.4
kotlinVersion=1.2.71
junitVersion=4.12
quasarVersion=0.7.10
log4jVersion =2.11.2
platformVersion=5
slf4jVersion=1.7.25
nettyVersion=4.1.22.Final

space issue in the path in windows system.

Hi Team,
Spaces issue in the path in windows system not yet resolved it seems.
I have given the node/directory name as "Bank of Apples" but it is generating as "BankofApples"
removing white spaces from the path while generating nodes. I have used the gradle plugins version, 5.0.10 , 5.0.12 as well as 5.0.13. In all version of the plugin i can see the space issue in the path in windows system.

Thank you!
Regards
Sherali

./gradlew deployNodes: java.lang.StackOverflowError (no error message)

Expected Behavior

  • The deployNodes task runs successfully.

Actual Behavior

  • The task fails with the following output:

                      ./gradlew clean deployNodes --no-daemon --warning-mode=all
                      
                      > Task :app:workflows:compileJava
                      Note: Some input files use unchecked or unsafe operations.
                      Note: Recompile with -Xlint:unchecked for details.
                      
                      > Task :jar
                      Cordapp metadata not defined for this gradle build file. See https://docs.corda.net/head/cordapp-build-systems.html#separation-of-cordapp-contracts-flows-and-services
                      
                      > Task :deployNodes FAILED
                      Running Cordform task
                      Deleting /home/user/cordapps/build/nodes
                      Bootstrapping local test network in /home/user/cordapps/build/nodes
                      Generating node directory for Notary
                      Generating node directory for PartyA
                      Generating node directory for PartyB
                      
                      FAILURE: Build failed with an exception.
                      
                      * What went wrong:
                      Execution failed for task ':deployNodes'.
                      > org.gradle.api.InvalidUserCodeException (no error message)
                         > java.lang.StackOverflowError (no error message)
                      
                      * 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 26s
                      49 actionable tasks: 39 executed, 10 up-to-date
                      Exception in thread "Thread-46" java.lang.NoClassDefFoundError: kotlin/Unit
                              at net.corda.node.utilities.logging.AsyncLoggerContextSelectorNoThreadLocal$1.invoke(AsyncLoggerContextSelectorNoThreadLocal.kt:12)
                              at net.corda.nodeapi.internal.ShutdownHookKt$addShutdownHook$hook$1.run(ShutdownHook.kt:15)
                              at java.lang.Thread.run(Thread.java:748)
                      Caused by: java.lang.ClassNotFoundException: kotlin.Unit
                              at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
                              at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
                              at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
                              ... 3 more
    

Specifications

  • Version:
    • gradle: 5.6.4

    • gradle dependencies copied grom latest java cordapp examples:

                       cordaReleaseGroup=net.corda
                       cordaCoreReleaseGroup=net.corda
                       cordaVersion=4.8.5
                       cordaCoreVersion=4.8.5
                       gradlePluginsVersion=5.0.12
                       kotlinVersion=1.2.71
                       junitVersion=4.12
                       quasarVersion=0.7.10
                       log4jVersion =2.17.1
                       platformVersion=10
                       slf4jVersion=1.7.25
                       nettyVersion=4.1.22.Final
      

Context

My task was originally working fine, but then I started to see the above error when I added a new dependency (no code changes). The dependency was a custom library for producing Red Hat AMQ messages and has the following child dependencies:

      org.springframework.boot:spring-boot-starter-web:2.2.0.RELEASE
      org.apache.activemq:artemis-jms-client:2.10.1 (*)
      org.springframework:spring-jms:2.5
      javax.json:javax.json-api:1.0

Any idea whats going on here?

Update 1: The cordapp jar builds fine. It's only the deployNodes task that fails.

dockerform task doesn't work after 4.5 + ?

Thank you for choosing to report an issue with Corda.

When reporting an issue please make sure it contains;

  • A clear description of the issue
  • Any logs or stack traces that you can provide (use a site like https://pastebin.com for larger logs)
  • Steps to reproduce the issue
  • The version/tag/release or commit hash it occured on

When trying to use the dockerform plugin artemis seems to fail without much explanation.
This seems to occur for various versions of corda after 4.4. I can't pin down what specifically is causing this issue.

steps to reproduce

Add the following simple dockerform config to any project in samples-java or samples-kotlin.

note that the image version doesn't seem to make a big difference it just has to match the corda properties specified.

task prepareDockerNodes(type: net.corda.plugins.Dockerform, dependsOn: ['jar']) {

    dockerImage="corda/corda-zulu-java1.8-4.6"

    nodeDefaults {
        projectCordapp {
            deploy = false
        }
        cordapp project(':contracts')
        cordapp project(':workflows')
    }

    node {
        name "O=Notary,L=London,C=GB"
        notary = [validating : false]
        p2pPort 10001
        rpcSettings {
            address("localhost:10001")
            adminAddress("localhost:10041")
        }
        sshdPort 2221
    }

    node {
        name "O=PartyA,L=London,C=GB"
        p2pPort 10002
        rpcSettings {
            address("localhost:10002")
            adminAddress("localhost:10042")
        }
        sshdPort 2222
        rpcUsers = [[ user: "user1", "password": "test", "permissions": ["ALL"]]]
    }

    node {
        name "O=PartyB,L=New York,C=US"
        p2pPort 10003
        rpcSettings {
            address("localhost:10003")
            adminAddress("localhost:10043")
        }
        sshdPort 2223
        rpcUsers = [[ user: "user1", "password": "test", "permissions": ["ALL"]]]
    }


    node {
        name "O=PartyC,L=New York,C=US"
        p2pPort 10004
        rpcSettings {
            address("localhost:10004")
            adminAddress("localhost:10044")
        }
        sshdPort 2224
        rpcUsers = [[ user: "user1", "password": "test", "permissions": ["ALL"]]]
    }
}

Then after running ./gradlew prepareDockerNodes; and docker-compose -f build/nodes/docker-compose.yml up

I'll get the following error from docker-compose:

partyc_1  | Advertised P2P messaging addresses      : partyc:10004
partyc_1  | RPC connection address                  : partyc:10004
partyc_1  | RPC admin connection address            : partyc:10044
partyb_1  | Advertised P2P messaging addresses      : partyb:10003
partyb_1  | RPC connection address                  : partyb:10003
partyb_1  | RPC admin connection address            : partyb:10043
partya_1  | Advertised P2P messaging addresses      : partya:10002
partya_1  | RPC connection address                  : partya:10002
partya_1  | RPC admin connection address            : partya:10042
notary_1  | Advertised P2P messaging addresses      : notary:10001
notary_1  | RPC connection address                  : notary:10001
notary_1  | RPC admin connection address            : notary:10041
partyc_1  | [ERROR] 18:51:01+0000 [main] core.server. - AMQ224000: Failure in initialisation
partyc_1  | [ERROR] 18:51:01+0000 [main] rpc.ArtemisRpcBroker. - Unable to start message broker
partyc_1  | Shutting down ...
partyc_1  | [ERROR] 18:51:03+0000 [main] internal.NodeStartupLogging. - Failed to bind on an address in [partyc:10044, partyc:10004].
partyb_1  | [ERROR] 18:51:03+0000 [main] core.server. - AMQ224000: Failure in initialisation
partyb_1  | [ERROR] 18:51:03+0000 [main] rpc.ArtemisRpcBroker. - Unable to start message broker
partyb_1  | Shutting down ...
partya_1  | [ERROR] 18:51:04+0000 [main] core.server. - AMQ224000: Failure in initialisation
partya_1  | [ERROR] 18:51:04+0000 [main] rpc.ArtemisRpcBroker. - Unable to start message broker
partya_1  | Shutting down ...
partyb_1  | [ERROR] 18:51:04+0000 [main] internal.NodeStartupLogging. - Failed to bind on an address in [partyb:10043, partyb:10003].
nodes_partyc_1 exited with code 1
notary_1  | [ERROR] 18:51:05+0000 [main] core.server. - AMQ224000: Failure in initialisation
notary_1  | [ERROR] 18:51:05+0000 [main] rpc.ArtemisRpcBroker. - Unable to start message broker
notary_1  | Shutting down ...
partya_1  | [ERROR] 18:51:05+0000 [main] internal.NodeStartupLogging. - Failed to bind on an address in [partya:10042, partya:10002].
notary_1  | [ERROR] 18:51:06+0000 [main] internal.NodeStartupLogging. - Failed to bind on an address in [notary:10041, notary:10001].
nodes_partyb_1 exited with code 1
nodes_partya_1 exited with code 1
nodes_notary_1 exited with code 1

To summarize

I can't get the dockerform task to work on corda 4.6. I'm not sure why artemis would be falling as code examples that have worked previously now do not.

Please let me know if the issue is the image or if there are missing config params.

Thanks

FastClasspathScanner is outdated -- consider porting to ClassGraph

Your project, corda/corda-gradle-plugins, depends on the outdated library FastClasspathScanner in the following source files:

FastClasspathScanner has been significantly reworked since the version your code depends upon:

  • a significant number of bugs have been fixed
  • some nontrivial API changes have been made to simplify and unify the API
  • FastClasspathScanner has been renamed to ClassGraph: https://github.com/classgraph/classgraph

ClassGraph is a significantly more robust library than FastClasspathScanner, and is more future-proof. All future development work will be focused on ClassGraph, and FastClasspathScanner will see no future development.

Please consider porting your code over to the new ClassGraph API, particularly if your project is in production or has downstream dependencies:

Feel free to close this bug report if this code is no longer in use. (You were sent this bug report because your project depends upon FastClasspathScanner, and has been starred by 5 users. Apologies if this bug report is not helpful.)

dockerForm task generates invalid corda nodeInfo objects?

I have a config for Party C (in this case) that I'm running through the dockerForm task.

node {
   name "O=PartyC,L=New York,C=US"
   p2pPort 10004
   p2pAddress "34.239.158.190"
   rpcSettings {
       address("0.0.0.0:10014")
       adminAddress("0.0.0.0:10044")
   }
   sshdPort 2224
   rpcUsers = [[ user: "user1", "password": "test", "permissions": ["ALL"]]]
}

When I used this config on my local machine to generate a config to be run on ANOTHER machine, I noticed that the the node-info file generated expects all docker containers to be on the same machine.

If we look at the additional node info struct on the other side we get something like this which contains the invalid hostname of partyc, but in fact if this node config folder was copied onto another machine it can't resolve.

$java -jar corda-tools-blob-inspector-4.7.jar additional-node-infos/nodeInfo-2D1CA190724B008EF2466321520ABFD47CE0A9EC94FE17B034DE975A056082F3
net.corda.nodeapi.internal.SignedNodeInfo
---
raw:
  class: "net.corda.core.node.NodeInfo"
  deserialized:
    addresses:
    - "partyc:10004"
    legalIdentitiesAndCerts:
    - "O=PartyC, L=New York, C=US"
    platformVersion: 8
    serial: 1616002976601
signatures:
- !!binary |-
  P3VG+gyQ4909whdsoENUwaAhwiYt+mqJE+5PK+7aE9wOlIoFWUy9GMoMVjATLLLQeFNDVGi7tJT2\nNijpDYkQAw==

note that there's a partyc as the hostname and not the actual IP I provided in the p2pAddress.

Dockerform fails with error when you specify a directory other than 'nodes'

Thank you for choosing to report an issue with Corda.

When reporting an issue please make sure it contains;

  • A clear description of the issue

If you specify an alternate directory to the Dockerform task by using the directory field, the task fails because it still relies on the default node directory.

i.e.

task dockerNodes(type: net.corda.plugins.Dockerform, dependsOn: ['jar']) {
directory "./build/small"
...

  • Any logs or stack traces that you can provide (use a site like https://pastebin.com for larger logs)

  • What went wrong:
    Execution failed for task ':dockerNodes'.

java.nio.file.NoSuchFileException: /Users/barry/Code/ebx_cordapp/build/nodes/docker-compose.yml

  • Steps to reproduce the issue

Set the directory for the task to something other than nodes

  • The version/tag/release or commit hash it occurred on

ext.corda_gradle_plugins_version = '4.0.25'

Node runnodes does not work well on mac

The runnodes generated script does not works well on Mac it fails to lunch all the nodes terminal windows, it never works with the cordapp-example.

Maybe possible improvements could be using something like :

  • cross-platform Kotlin Native exec
  • Apache Commons Exec
  • GoLang cross-platform exec

To start a new bash process for the node and just print in the console output the ssh port to connect to the started Node once the Node has started.

Thank you, kindly
Luis Oscar Trigueiros

In headless mode NodeRunner passes --no-local-shell to WebServer causing it to fail

When you use runnodes this invokes NodeRunner and if the environment is headless or you specify --headless the it uses HeadlessJavaCommand which causes the executable jars that are found to all be started with the additional argument --no-local-shell.

The Corda nodes know how to consume this argument as they use an ArgParser that expects this.

However the WebServer processes choke on this argument as they use a different ArgParser that doesn't know what to do with this argument.

So when you use runnode you see something like this:

$ ./runnodes
Starting nodes in /vagrant
Starting corda.jar in /vagrant/PartyB on debug port 5005
Starting corda-webserver.jar in /vagrant/PartyB on debug port 5006
Started 2 processes
Finished starting nodes
Listening for transport dt_socket at address: 5006
Unknown command line arguments: no-local-shell is not a recognized optionUnknown command line arguments: no-local-shell is not a recognized option

I.e. here you see it starting both a Corda node and a webserver process but the webserver quickly exits with the Unknown command line arguments: no-local-shell error.

This means the introductory corda app fails fairly mysteriously if you try running it on e.g. a headless VM (as I guess is typical with people using things like Docker or, in my case, Vagrant).

SerializationWhitelist: Error reading configuration file

When running ./gradlew deployNodes in my project based on Corda 3.3, with some regularity (but intermittently) the build will fail with this error:

Execution failed for task ':deployNodes'.
> net.corda.core.serialization.SerializationWhitelist: Error reading configuration file

Restarting the gradle daemon always fixes this problem. I'll try to see if I can get a stack trace next time.

Option to turn off plain text passwords in stdout during signing

It appears that the current release outputs the signing storepass and keypass passwords as plain text to files. This is a problem for open source cordapps that expose the build output to contributors. Can we please have an option to not print out passwords? Ideally this should be environment driven so that it cannot be turned off by contributors.

Thanks.

Dockerfile breaks because of missing nss

I've hacked an issue that I raised to run DockerForm, I need to manually copy a docker-compose to the build nodes directory which I need to create before I can run deployNodes.

Once that is done the build runs through, I docker-compose up, the images are built and the startup of the container fails as there is a missing nss on the --nocache line of the Dockerfile in the plugins resources.

I can get around it by manually adding the nss dependency. I found out that there is a known issue around it and the recommended approach is the one I mentioned.

Can this nss dependency be added/does it make sense to issue the pull request on it?

The error on startup is:

โžœ nodes git:(release-V4) โœ— docker-compose up
Removing nodes_notary_1
Removing nodes_partyb_1
Recreating nodes_partya_1 ... done
Recreating b412436a4bb5_nodes_notary_1 ... done
Recreating a2ab1d363205_nodes_partyb_1 ... done
Attaching to nodes_partyb_1, nodes_notary_1, nodes_partya_1
notary_1 | Exception in thread "main" java.lang.ExceptionInInitializerError
notary_1 | at net.corda.core.crypto.Crypto.(Crypto.kt:78)
notary_1 | at net.corda.node.internal.NodeStartup.initialiseAndRun(NodeStartup.kt:139)
notary_1 | at net.corda.node.internal.NodeStartupCli.runProgram(NodeStartup.kt:108)
notary_1 | at net.corda.cliutils.CordaCliWrapper.call(CordaCliWrapper.kt:184)
notary_1 | at net.corda.cliutils.CordaCliWrapper.call(CordaCliWrapper.kt:152)
notary_1 | at picocli.CommandLine.execute(CommandLine.java:1056)
notary_1 | at picocli.CommandLine.access$900(CommandLine.java:142)
notary_1 | at picocli.CommandLine$RunLast.handle(CommandLine.java:1246)
notary_1 | at picocli.CommandLine$RunLast.handle(CommandLine.java:1214)
notary_1 | at picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:1122)
notary_1 | at picocli.CommandLine.parseWithHandlers(CommandLine.java:1405)
notary_1 | at net.corda.cliutils.CordaCliWrapperKt.start(CordaCliWrapper.kt:72)
notary_1 | at net.corda.node.Corda.main(Corda.kt:13)
notary_1 | Caused by: java.security.ProviderException: Could not initialize NSS
notary_1 | at sun.security.pkcs11.SunPKCS11.(SunPKCS11.java:223)
notary_1 | at sun.security.pkcs11.SunPKCS11.(SunPKCS11.java:103)
notary_1 | at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
notary_1 | at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
notary_1 | at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
notary_1 | at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
notary_1 | at sun.security.jca.ProviderConfig$2.run(ProviderConfig.java:224)
notary_1 | at sun.security.jca.ProviderConfig$2.run(ProviderConfig.java:206)
notary_1 | at java.security.AccessController.doPrivileged(Native Method)
notary_1 | at sun.security.jca.ProviderConfig.doLoadProvider(ProviderConfig.java:206)
notary_1 | at sun.security.jca.ProviderConfig.getProvider(ProviderConfig.java:187)
notary_1 | at sun.security.jca.ProviderList.loadAll(ProviderList.java:282)
notary_1 | at sun.security.jca.ProviderList.removeInvalid(ProviderList.java:299)
notary_1 | at sun.security.jca.Providers.getFullProviderList(Providers.java:173)
notary_1 | at java.security.Security.insertProviderAt(Security.java:395)
notary_1 | at net.corda.core.crypto.internal.ProviderMapKt.(ProviderMap.kt:28)
notary_1 | ... 13 more
notary_1 | Caused by: java.io.FileNotFoundException: /usr/lib/libnss3.so
notary_1 | at sun.security.pkcs11.Secmod.initialize(Secmod.java:193)
notary_1 | at sun.security.pkcs11.SunPKCS11.(SunPKCS11.java:218)
notary_1 | ... 28 more
partyb_1 | Exception in thread "main" java.lang.ExceptionInInitializerError
partyb_1 | at net.corda.core.crypto.Crypto.(Crypto.kt:78)
partyb_1 | at net.corda.node.internal.NodeStartup.initialiseAndRun(NodeStartup.kt:139)
partyb_1 | at net.corda.node.internal.NodeStartupCli.runProgram(NodeStartup.kt:108)
partyb_1 | at net.corda.cliutils.CordaCliWrapper.call(CordaCliWrapper.kt:184)
partyb_1 | at net.corda.cliutils.CordaCliWrapper.call(CordaCliWrapper.kt:152)
partyb_1 | at picocli.CommandLine.execute(CommandLine.java:1056)
partyb_1 | at picocli.CommandLine.access$900(CommandLine.java:142)
partyb_1 | at picocli.CommandLine$RunLast.handle(CommandLine.java:1246)
partyb_1 | at picocli.CommandLine$RunLast.handle(CommandLine.java:1214)
partyb_1 | at picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:1122)
partyb_1 | at picocli.CommandLine.parseWithHandlers(CommandLine.java:1405)
partyb_1 | at net.corda.cliutils.CordaCliWrapperKt.start(CordaCliWrapper.kt:72)
partyb_1 | at net.corda.node.Corda.main(Corda.kt:13)
partyb_1 | Caused by: java.security.ProviderException: Could not initialize NSS
partyb_1 | at sun.security.pkcs11.SunPKCS11.(SunPKCS11.java:223)
partyb_1 | at sun.security.pkcs11.SunPKCS11.(SunPKCS11.java:103)
partyb_1 | at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
partyb_1 | at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
partyb_1 | at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
partyb_1 | at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
partyb_1 | at sun.security.jca.ProviderConfig$2.run(ProviderConfig.java:224)
partyb_1 | at sun.security.jca.ProviderConfig$2.run(ProviderConfig.java:206)
partyb_1 | at java.security.AccessController.doPrivileged(Native Method)
partyb_1 | at sun.security.jca.ProviderConfig.doLoadProvider(ProviderConfig.java:206)
partyb_1 | at sun.security.jca.ProviderConfig.getProvider(ProviderConfig.java:187)
partyb_1 | at sun.security.jca.ProviderList.loadAll(ProviderList.java:282)
partyb_1 | at sun.security.jca.ProviderList.removeInvalid(ProviderList.java:299)
partyb_1 | at sun.security.jca.Providers.getFullProviderList(Providers.java:173)
partyb_1 | at java.security.Security.insertProviderAt(Security.java:395)
partyb_1 | at net.corda.core.crypto.internal.ProviderMapKt.(ProviderMap.kt:28)
partyb_1 | ... 13 more
partyb_1 | Caused by: java.io.FileNotFoundException: /usr/lib/libnss3.so
partyb_1 | at sun.security.pkcs11.Secmod.initialize(Secmod.java:193)
partyb_1 | at sun.security.pkcs11.SunPKCS11.(SunPKCS11.java:218)
partyb_1 | ... 28 more
partya_1 | Exception in thread "main" java.lang.ExceptionInInitializerError
partya_1 | at net.corda.core.crypto.Crypto.(Crypto.kt:78)
partya_1 | at net.corda.node.internal.NodeStartup.initialiseAndRun(NodeStartup.kt:139)
partya_1 | at net.corda.node.internal.NodeStartupCli.runProgram(NodeStartup.kt:108)
partya_1 | at net.corda.cliutils.CordaCliWrapper.call(CordaCliWrapper.kt:184)
partya_1 | at net.corda.cliutils.CordaCliWrapper.call(CordaCliWrapper.kt:152)
partya_1 | at picocli.CommandLine.execute(CommandLine.java:1056)
partya_1 | at picocli.CommandLine.access$900(CommandLine.java:142)
partya_1 | at picocli.CommandLine$RunLast.handle(CommandLine.java:1246)
partya_1 | at picocli.CommandLine$RunLast.handle(CommandLine.java:1214)
partya_1 | at picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:1122)
partya_1 | at picocli.CommandLine.parseWithHandlers(CommandLine.java:1405)
partya_1 | at net.corda.cliutils.CordaCliWrapperKt.start(CordaCliWrapper.kt:72)
partya_1 | at net.corda.node.Corda.main(Corda.kt:13)
partya_1 | Caused by: java.security.ProviderException: Could not initialize NSS
partya_1 | at sun.security.pkcs11.SunPKCS11.(SunPKCS11.java:223)
partya_1 | at sun.security.pkcs11.SunPKCS11.(SunPKCS11.java:103)
partya_1 | at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
partya_1 | at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
partya_1 | at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
partya_1 | at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
partya_1 | at sun.security.jca.ProviderConfig$2.run(ProviderConfig.java:224)
partya_1 | at sun.security.jca.ProviderConfig$2.run(ProviderConfig.java:206)
partya_1 | at java.security.AccessController.doPrivileged(Native Method)
partya_1 | at sun.security.jca.ProviderConfig.doLoadProvider(ProviderConfig.java:206)
partya_1 | at sun.security.jca.ProviderConfig.getProvider(ProviderConfig.java:187)
partya_1 | at sun.security.jca.ProviderList.loadAll(ProviderList.java:282)
partya_1 | at sun.security.jca.ProviderList.removeInvalid(ProviderList.java:299)
partya_1 | at sun.security.jca.Providers.getFullProviderList(Providers.java:173)
partya_1 | at java.security.Security.insertProviderAt(Security.java:395)
partya_1 | at net.corda.core.crypto.internal.ProviderMapKt.(ProviderMap.kt:28)
partya_1 | ... 13 more
partya_1 | Caused by: java.io.FileNotFoundException: /usr/lib/libnss3.so
partya_1 | at sun.security.pkcs11.Secmod.initialize(Secmod.java:193)
partya_1 | at sun.security.pkcs11.SunPKCS11.(SunPKCS11.java:218)
partya_1 | ... 28 more
nodes_notary_1 exited with code 1
nodes_partyb_1 exited with code 1
nodes_partya_1 exited with code 1

DockerForm expects docker-compose in build directory

I implemented a DockerForm gradle task, DockerForm expects a docker-compose.yml though in the build directory (I used a corda-starter-template project).

Looking at the DockerForm implementation I cannot find a way to override the location it is expecting a docker-compose file, it seems to be hardcoded to build/nodes. This directory is a build generated one obviously so I am not sure if this is a chicken or egg issue.

What is the proposed way to make use of the DockerForm, currently I manually copy an empty docker-compose file which can only mean that I don't understand the concept.

If anyone can give me a hint, would be great.

The error message on a clean(ed) build is:

19:36:09: Executing task 'deployNodes'...

Task :contracts:compileKotlin UP-TO-DATE
Task :contracts:compileJava NO-SOURCE
Task :contracts:processResources NO-SOURCE
Task :contracts:classes UP-TO-DATE
Task :contracts:configureCordappFatJar
Task :contracts:inspectClassesForKotlinIC UP-TO-DATE
Task :contracts:jar UP-TO-DATE
Task :workflows:compileKotlin UP-TO-DATE
Task :workflows:compileJava NO-SOURCE
Task :workflows:processResources UP-TO-DATE
Task :workflows:classes UP-TO-DATE
Task :workflows:configureCordappFatJar
Task :workflows:inspectClassesForKotlinIC UP-TO-DATE
Task :workflows:jar UP-TO-DATE
Task :compileKotlin NO-SOURCE
Task :compileJava NO-SOURCE
Task :processResources UP-TO-DATE
Task :classes UP-TO-DATE
Task :configureCordappFatJar
Task :inspectClassesForKotlinIC UP-TO-DATE
Task :jar UP-TO-DATE
Task :deployNodes FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem was found with the configuration of task ':deployNodes'.

File '/Users/sassit/Documents/Workspace/corda/cordapp-template/build/nodes/docker-compose.yml' specified for property 'dockerComposePath' does not exist.

  • 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 0s
14 actionable tasks: 4 executed, 10 up-to-date
File '/Users/sassit/Documents/Workspace/corda/cordapp-template/build/nodes/docker-compose.yml' specified for property 'dockerComposePath' does not exist.
19:36:10: Task execution finished 'deployNodes'.

Cordformation Plugin - Kotlin DSL

I managed to create a deployNodes task in Kotlin DSL following the examples from the corda examples repo. See the following example:

tasks.register<Cordform>("deployNodes") {
    dependsOn.add("jar")

    val notaryConfig = mapOf("validating" to false)

    val rpcUsersConfig = listOf(
        mapOf(
            "user" to "user1",
            "password" to "test",
            "permissions" to listOf("ALL")
        )
    )

    // nodeDefaults not working because of protected setter
    nodeDefaults = closureOf<net.corda.plugins.Node> {
        projectCordapp(closureOf<net.corda.plugins.Cordapp> {
            deploy = false
        })

        runSchemaMigration = true
    }

    node {
        name("O=Notary,L=London,C=GB")
        p2pPort(60000)

        notary = notaryConfig

        rpcSettings(closureOf<RpcSettings> {
            address("localhost:60001")
            adminAddress("localhost:60002")
        })
        true.also { runSchemaMigration = it }
    }

    node {
        name("O=party1,L=London,C=GB")
        p2pPort(10000)

        rpcSettings(closureOf<RpcSettings> {
            address("localhost:10001")
            adminAddress("localhost:10002")
        })

        rpcUsersConfig.also { rpcUsers = it }
        true.also { runSchemaMigration = it }
    }
}

This works fine. The only issue is that I can not use the nodeDefaults field because it has a protected setter.

See: Baseform.kt

If there is no reason why this setter should stay protected, I can provide a pull request which makes it public.

dockerForm task doesn't use relative paths

This is perhaps more of a feature request, but right now when the dockerform task generates a docker-compose file it uses the full path, which means that this docker-compose configuration isn't portable to another machine.

version: '3'
services:
  notary:
    volumes:
    - /Users/davidawad/Desktop/samples-java/Features/customlogging-yocordapp/build/nodes/Notary/node.conf:/etc/corda/node.conf
    - /Users/davidawad/Desktop/samples-java/Features/customlogging-yocordapp/build/nodes/Notary/certificates:/opt/corda/certificates
    - /Users/davidawad/Desktop/samples-java/Features/customlogging-yocordapp/build/nodes/Notary/logs:/opt/corda/logs

It would be quite nice if there was an option to just have it output the relative paths in order for the configuration to be portable to another machine if someone wanted to do that.

version: '3'
services:
  notary:
    volumes:
    - ./Notary/node.conf:/etc/corda/node.conf
    - ./Notary/certificates:/opt/corda/certificates
    - ./Notary/logs:/opt/corda/logs

Gradle error with version >= 4.0.38

When I try to publish a Corda artifact with Gradle 5.2.1 and CorDapp plugin version >= 4.0.38, I get the following stack trace:

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':generatePomFileForMavenJavaPublication'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$2.accept(ExecuteActionsTaskExecuter.java:121)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$2.accept(ExecuteActionsTaskExecuter.java:117)
        at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:184)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:110)
        at org.gradle.api.internal.tasks.execution.ResolveIncrementalChangesTaskExecuter.execute(ResolveIncrementalChangesTaskExecuter.java:84)
        at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:91)
        at org.gradle.api.internal.tasks.execution.ResolveBeforeExecutionStateTaskExecuter.execute(ResolveBeforeExecutionStateTaskExecuter.java:74)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:109)
        at org.gradle.api.internal.tasks.execution.ResolveBeforeExecutionOutputsTaskExecuter.execute(ResolveBeforeExecutionOutputsTaskExecuter.java:67)
        at org.gradle.api.internal.tasks.execution.ResolveAfterPreviousExecutionStateTaskExecuter.execute(ResolveAfterPreviousExecutionStateTaskExecuter.java:46)
        at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:93)
        at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:45)
        at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:94)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:63)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:49)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:46)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:416)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:406)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102)
        at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:46)
        at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:43)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:355)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:343)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:336)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:322)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:134)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:129)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:202)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:193)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:129)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
Caused by: java.lang.AbstractMethodError: net.corda.plugins.FilteredPom.getVersionMappingStrategy()Lorg/gradle/api/publish/internal/versionmapping/VersionMappingStrategyInternal;
        at org.gradle.api.publish.maven.tasks.GenerateMavenPom.doGenerate(GenerateMavenPom.java:125)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:103)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:48)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:41)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:28)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:705)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:672)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$4.run(ExecuteActionsTaskExecuter.java:338)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:402)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:394)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:92)
        at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:327)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:312)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.access$200(ExecuteActionsTaskExecuter.java:75)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.execute(ExecuteActionsTaskExecuter.java:158)
        at org.gradle.internal.execution.impl.steps.ExecuteStep.execute(ExecuteStep.java:46)
        at org.gradle.internal.execution.impl.steps.CancelExecutionStep.execute(CancelExecutionStep.java:34)
        at org.gradle.internal.execution.impl.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:69)
        at org.gradle.internal.execution.impl.steps.TimeoutStep.execute(TimeoutStep.java:49)
        at org.gradle.internal.execution.impl.steps.CatchExceptionStep.execute(CatchExceptionStep.java:34)
        at org.gradle.internal.execution.impl.steps.CreateOutputsStep.execute(CreateOutputsStep.java:49)
        at org.gradle.internal.execution.impl.steps.SnapshotOutputStep.execute(SnapshotOutputStep.java:42)
        at org.gradle.internal.execution.impl.steps.SnapshotOutputStep.execute(SnapshotOutputStep.java:28)
        at org.gradle.internal.execution.impl.steps.CacheStep.executeWithoutCache(CacheStep.java:133)
        at org.gradle.internal.execution.impl.steps.CacheStep.lambda$execute$5(CacheStep.java:83)
        at org.gradle.internal.execution.impl.steps.CacheStep.execute(CacheStep.java:82)
        at org.gradle.internal.execution.impl.steps.CacheStep.execute(CacheStep.java:37)
        at org.gradle.internal.execution.impl.steps.PrepareCachingStep.execute(PrepareCachingStep.java:33)
        at org.gradle.internal.execution.impl.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:38)
        at org.gradle.internal.execution.impl.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:23)
        at org.gradle.internal.execution.impl.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:95)
        at org.gradle.internal.execution.impl.steps.SkipUpToDateStep.lambda$execute$0(SkipUpToDateStep.java:88)
        at org.gradle.internal.execution.impl.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:52)
        at org.gradle.internal.execution.impl.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:36)
        at org.gradle.internal.execution.impl.DefaultWorkExecutor.execute(DefaultWorkExecutor.java:34)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:109)
        ... 37 more

Works fine with 4.0.37

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.