Fix irs-demo dependency issues (#4438)

* Fix irs-demo dependency issues

* Fixed a problem with the IRS demo test JAR.

* Fixed deployNodes problem and log4j info statement.
This commit is contained in:
Anthony Keenan 2018-12-20 12:31:16 +00:00 committed by GitHub
parent 830959c9f7
commit af75a05502
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 81 additions and 10 deletions

View File

@ -13,7 +13,7 @@ To run from the command line in Unix:
2. Run ``./gradlew samples:irs-demo:web:deployWebapps`` to install configs and tools for running webservers 2. Run ``./gradlew samples:irs-demo:web:deployWebapps`` to install configs and tools for running webservers
3. Move to the ``samples/irs-demo/`` directory 3. Move to the ``samples/irs-demo/`` directory
4. Run ``./cordapp/build/nodes/runnodes`` to open up three new terminals with the three nodes (you may have to install xterm) 4. Run ``./cordapp/build/nodes/runnodes`` to open up three new terminals with the three nodes (you may have to install xterm)
5. On Linux, run ``./web/build/webapps/runwebapps`` to open three more terminals for associated webservers. On macOS, 5. On Linux, run ``./web/build/webapps/runwebapps.sh`` to open three more terminals for associated webservers. On macOS,
use the following command instead: ``osascript ./web/build/webapps/runwebapps.scpt`` use the following command instead: ``osascript ./web/build/webapps/runwebapps.scpt``
To run from the command line in Windows: To run from the command line in Windows:

View File

@ -31,12 +31,13 @@ dependencies {
// Corda integration dependencies // Corda integration dependencies
cordaRuntime project(path: ":node:capsule", configuration: 'runtimeArtifacts') cordaRuntime project(path: ":node:capsule", configuration: 'runtimeArtifacts')
cordaCompile project(':core') cordaCompile project(':core')
cordaRuntime project(':node-api')
// Cordapp dependencies // Cordapp dependencies
// Specify your cordapp's dependencies below, including dependent cordapps // Specify your cordapp's dependencies below, including dependent cordapps
compile group: 'commons-io', name: 'commons-io', version: '2.5' compile group: 'commons-io', name: 'commons-io', version: '2.5'
cordaCompile project(':node-driver') testCompile project(':node-driver')
testCompile "junit:junit:$junit_version" testCompile "junit:junit:$junit_version"
testCompile "org.assertj:assertj-core:${assertj_version}" testCompile "org.assertj:assertj-core:${assertj_version}"
} }
@ -164,12 +165,18 @@ idea {
} }
jar { jar {
from sourceSets.test.output from sourceSets.main.output
duplicatesStrategy = DuplicatesStrategy.EXCLUDE duplicatesStrategy = DuplicatesStrategy.EXCLUDE
} }
task testJar(type: Jar) {
classifier "test"
from sourceSets.main.output
from sourceSets.test.output
}
artifacts { artifacts {
demoArtifacts jar demoArtifacts testJar
} }
cordapp { cordapp {

View File

@ -17,7 +17,6 @@ buildscript {
import org.yaml.snakeyaml.DumperOptions import org.yaml.snakeyaml.DumperOptions
plugins { plugins {
id 'com.craigburke.client-dependencies' version '1.4.0' id 'com.craigburke.client-dependencies' version '1.4.0'
} }
@ -66,11 +65,15 @@ dependencies {
exclude module: "spring-boot-starter-logging" exclude module: "spring-boot-starter-logging"
exclude module: "logback-classic" exclude module: "logback-classic"
} }
compile('org.springframework.boot:spring-boot-starter-log4j2')
runtime("org.apache.logging.log4j:log4j-web:$log4j_version")
compile("com.fasterxml.jackson.module:jackson-module-kotlin:$jackson_version") compile("com.fasterxml.jackson.module:jackson-module-kotlin:$jackson_version")
compile project(":client:rpc") compile project(":client:rpc")
compile project(":client:jackson") compile project(":client:jackson")
compile project(":test-utils") compile project(":samples:irs-demo:cordapp")
compile project(path: ":samples:irs-demo:cordapp", configuration: "demoArtifacts")
testCompile project(":test-utils")
testCompile project(path: ":samples:irs-demo:cordapp", configuration: "demoArtifacts")
// JOpt: for command line flags. // JOpt: for command line flags.
compile "net.sf.jopt-simple:jopt-simple:$jopt_simple_version" compile "net.sf.jopt-simple:jopt-simple:$jopt_simple_version"
@ -82,7 +85,7 @@ dependencies {
} }
jar { jar {
from sourceSets.test.output from sourceSets.main.output
dependsOn clientInstall dependsOn clientInstall
} }

View File

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="info">
<Properties>
<Property name="log-path">logs</Property>
<Property name="log-name">node-${hostName}</Property>
<Property name="archive">${log-path}/archive</Property>
</Properties>
<ThresholdFilter level="trace"/>
<Appenders>
<Console name="Console-Appender" target="SYSTEM_OUT">
<PatternLayout pattern="[%-5level] %date{HH:mm:ss,SSSZ} [%t] %c{2}.%method - %msg%n"/>
</Console>
<!-- Required for printBasicInfo -->
<Console name="Console-Appender-Println" target="SYSTEM_OUT">
<PatternLayout pattern="%msg%n" />
</Console>
<!-- Will generate up to 10 log files for a given day. During every rollover it will delete
those that are older than 60 days, but keep the most recent 10 GB -->
<RollingFile name="RollingFile-Appender"
fileName="${log-path}/${log-name}.log"
filePattern="${archive}/${log-name}.%date{yyyy-MM-dd}-%i.log.gz">
<PatternLayout pattern="[%-5level] %date{ISO8601}{UTC}Z [%t] %c{2} - %msg%n"/>
<Policies>
<TimeBasedTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="10MB"/>
</Policies>
<DefaultRolloverStrategy min="1" max="10">
<Delete basePath="${archive}" maxDepth="1">
<IfFileName glob="${log-name}*.log.gz"/>
<IfLastModified age="60d">
<IfAny>
<IfAccumulatedFileSize exceeds="10 GB"/>
</IfAny>
</IfLastModified>
</Delete>
</DefaultRolloverStrategy>
</RollingFile>
</Appenders>
<Loggers>
<Root level="trace">
<AppenderRef ref="Console-Appender" level="info"/>
<AppenderRef ref="RollingFile-Appender" level="debug"/>
</Root>
<Logger name="BasicInfo" additivity="false">
<AppenderRef ref="Console-Appender-Println"/>
<AppenderRef ref="RollingFile-Appender" />
</Logger>
</Loggers>
</Configuration>

View File

@ -5,6 +5,7 @@ apply plugin: 'com.jfrog.artifactory'
dependencies { dependencies {
compile project(':core') compile project(':core')
compile project(':node-api') compile project(':node-api')
compile project(':tools:cliutils')
// Unit testing helpers. // Unit testing helpers.
compile "junit:junit:$junit_version" compile "junit:junit:$junit_version"

View File

@ -21,10 +21,10 @@ dependencies {
} }
jar { jar {
baseName = "cliutils" baseName = "corda-tools-cliutils"
} }
publish { publish {
name 'corda-tools-cliutils' name jar.baseName
} }