Fix a bug in the trader-demo gradle that prevented the sample from working when run from the command line.

This commit is contained in:
Mike Hearn 2016-11-17 18:04:12 +01:00
parent 179975fe2b
commit 0a6cdb77c3

View File

@ -82,10 +82,12 @@ dependencies {
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: [':install']) { task deployNodes(type: net.corda.plugins.Cordform, dependsOn: [':install']) {
directory "./build/nodes" directory "./build/nodes"
networkMap "Controller" // This name "Notary" is hard-coded into TraderDemoClientApi so if you change it here, change it there too.
// In this demo the node that runs a standalone notary also acts as the network map server.
networkMap "Notary"
node { node {
name "Controller" name "Notary"
dirName "controller" dirName "notary"
nearestCity "London" nearestCity "London"
advertisedServices = ["corda.notary.validating"] advertisedServices = ["corda.notary.validating"]
artemisPort 10002 artemisPort 10002
@ -137,3 +139,17 @@ publishing {
} }
} }
} }
task runBuyer(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
main = 'net.corda.traderdemo.TraderDemoKt'
args '--role'
args 'BUYER'
}
task runSeller(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
main = 'net.corda.traderdemo.TraderDemoKt'
args '--role'
args 'SELLER'
}