Fixes to the deployNodes tasks for the samples. Improve the error message in the cordformation plugin.

This commit is contained in:
Mike Hearn 2016-11-17 17:15:39 +01:00
parent f630e15528
commit f247bc5647
7 changed files with 19 additions and 15 deletions

View File

@ -1,14 +1,13 @@
package net.corda.plugins
import org.gradle.api.internal.file.AbstractFileCollection
import org.gradle.api.Project
import java.nio.file.Files
import java.nio.charset.StandardCharsets
import com.typesafe.config.Config
import com.typesafe.config.ConfigFactory
import com.typesafe.config.ConfigValueFactory
import com.typesafe.config.ConfigRenderOptions
import com.typesafe.config.ConfigValueFactory
import org.gradle.api.Project
import java.nio.charset.StandardCharsets
import java.nio.file.Files
/**
* Represents a node that will be installed.
*/
@ -212,7 +211,7 @@ class Node {
private File verifyAndGetCordaJar() {
def maybeCordaJAR = project.configurations.runtime.filter { it.toString().contains("corda-${project.corda_version}.jar")}
if(maybeCordaJAR.size() == 0) {
throw new RuntimeException("No Corda Capsule JAR found. Have you deployed the Corda project to Maven?")
throw new RuntimeException("No Corda Capsule JAR found. Have you deployed the Corda project to Maven? Looked for \"corda-${project.corda_version}.jar\"")
} else {
def cordaJar = maybeCordaJAR.getSingleFile()
assert(cordaJar.isFile())

View File

@ -1,9 +1,9 @@
# Corda Samples Repository #
# Sample applications
Please refer to `README.md` in the individual project folders. Currently this repo provides the following demos:
Please refer to `README.md` in the individual project folders. There are the following demos:
* **attachment-demo** A simple demonstration of sending a transaction with an attachment from one node to another, and then accessing the attachment on the remote node.
* **irs-demo** TODO.
* **irs-demo** A demo showing two nodes agreeing to an interest rate swap and doing fixings using an oracle.
* **trader-demo** A simple driver for exercising the two party trading protocol. In this scenario, a buyer wants to purchase some commercial paper by swapping his cash for commercial paper. The seller learns that the buyer exists, and sends them a message to kick off the trade. The seller, having obtained his CP, then quits and the buyer goes back to waiting. The buyer will sell as much CP as he can! **We recommend starting with this demo.**
* **Network-visualiser** A tool that uses a simulation to visualise the interaction and messages between nodes on the Corda network. Currently only works for the IRS demo.
* **simm-valudation-demo** TODO.
* **simm-valudation-demo** A demo showing two nodes reaching agreement on the valuation of a derivatives portfolio.

View File

@ -62,6 +62,7 @@ dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
// Corda integration dependencies
compile "net.corda:corda:$corda_version" // TODO
compile project(':core')
compile project(':client')
compile project(':node')
@ -77,7 +78,7 @@ dependencies {
}
}
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['build']) {
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: [':install']) {
directory "./build/nodes"
networkMap "Controller"
node {

View File

@ -60,6 +60,7 @@ dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
// Corda integration dependencies
compile "net.corda:corda:$corda_version" // TODO
compile project(':core')
compile project(':client')
compile project(':node')
@ -74,7 +75,7 @@ dependencies {
compile 'com.squareup.okhttp3:okhttp:3.3.1'
}
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['build']) {
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: [':install']) {
directory "./build/nodes"
networkMap "Controller"
node {

View File

@ -33,6 +33,7 @@ dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
// Corda integration dependencies
compile "net.corda:corda:$corda_version" // TODO
compile project(':core')
compile project(':client')
compile project(':node')
@ -57,7 +58,7 @@ idea {
}
task deployVisualiser(type: FatCapsule) {
applicationClass 'com.r3cev.corda.netmap.NetworkExplorerKt'
applicationClass 'net.corda.netmap.NetworkExplorerKt'
reallyExecutable
capsuleManifest {
minJavaVersion = '1.8.0'

View File

@ -54,6 +54,7 @@ dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
// Corda integration dependencies
compile "net.corda:corda:$corda_version" // TODO
compile project(':core')
compile project(':client')
compile project(':node')
@ -77,7 +78,7 @@ dependencies {
compile "com.opengamma.strata:strata-math:${strata_version}"
}
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['build']) {
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: [':install']) {
directory "./build/nodes"
networkMap "Controller"
node {

View File

@ -60,6 +60,7 @@ dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
// Corda integration dependencies
compile "net.corda:corda:$corda_version" // TODO
compile project(':core')
compile project(':client')
compile project(':node')
@ -79,7 +80,7 @@ dependencies {
// Specify your cordapp's dependencies below, including dependent cordapps
}
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['build']) {
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: [':install']) {
directory "./build/nodes"
networkMap "Controller"
node {