mirror of
https://github.com/corda/corda.git
synced 2025-04-26 13:59:56 +00:00
ENT-1741 Build standalone shell JAR distribution - fix (#3474)
This commit is contained in:
parent
62cb443892
commit
0a700fd3f0
@ -53,6 +53,7 @@ buildscript {
|
|||||||
ext.crash_version = 'cadb53544fbb3c0fb901445da614998a6a419488'
|
ext.crash_version = 'cadb53544fbb3c0fb901445da614998a6a419488'
|
||||||
ext.jsr305_version = constants.getProperty("jsr305Version")
|
ext.jsr305_version = constants.getProperty("jsr305Version")
|
||||||
ext.shiro_version = '1.4.0'
|
ext.shiro_version = '1.4.0'
|
||||||
|
ext.shadow_version = '2.0.2'
|
||||||
ext.artifactory_plugin_version = constants.getProperty('artifactoryPluginVersion')
|
ext.artifactory_plugin_version = constants.getProperty('artifactoryPluginVersion')
|
||||||
ext.artifactory_contextUrl = 'https://ci-artifactory.corda.r3cev.com/artifactory'
|
ext.artifactory_contextUrl = 'https://ci-artifactory.corda.r3cev.com/artifactory'
|
||||||
ext.snake_yaml_version = constants.getProperty('snakeYamlVersion')
|
ext.snake_yaml_version = constants.getProperty('snakeYamlVersion')
|
||||||
@ -341,7 +342,7 @@ bintrayConfig {
|
|||||||
'corda-node-driver',
|
'corda-node-driver',
|
||||||
'corda-confidential-identities',
|
'corda-confidential-identities',
|
||||||
'corda-shell',
|
'corda-shell',
|
||||||
'corda-shell-cli',
|
'corda-tools-shell-cli',
|
||||||
'corda-serialization',
|
'corda-serialization',
|
||||||
'corda-serialization-deterministic',
|
'corda-serialization-deterministic',
|
||||||
'corda-tools-blob-inspector',
|
'corda-tools-blob-inspector',
|
||||||
|
@ -106,7 +106,7 @@ Linux and MacOS
|
|||||||
|
|
||||||
.. code:: bash
|
.. code:: bash
|
||||||
|
|
||||||
./shell [--config-file PATH | --cordpass-directory PATH --commands-directory PATH --host HOST --port PORT
|
java -jar corda-tools-shell-cli-VERSION_NUMBER.jar [--config-file PATH | --cordpass-directory PATH --commands-directory PATH --host HOST --port PORT
|
||||||
--user USER --password PASSWORD --sshd-port PORT --sshd-hostkey-directory PATH --keystore-password PASSWORD
|
--user USER --password PASSWORD --sshd-port PORT --sshd-hostkey-directory PATH --keystore-password PASSWORD
|
||||||
--keystore-file FILE --truststore-password PASSWORD --truststore-file FILE | --help]
|
--keystore-file FILE --truststore-password PASSWORD --truststore-file FILE | --help]
|
||||||
|
|
||||||
@ -115,7 +115,7 @@ Windows
|
|||||||
|
|
||||||
.. code:: bash
|
.. code:: bash
|
||||||
|
|
||||||
shell.bat [--config-file PATH | --cordpass-directory PATH --commands-directory PATH --host HOST --port PORT
|
java -jar corda-tools-shell-cli-VERSION_NUMBER.jar [--config-file PATH | --cordpass-directory PATH --commands-directory PATH --host HOST --port PORT
|
||||||
--user USER --password PASSWORD --sshd-port PORT --sshd-hostkey-directory PATH --keystore-password PASSWORD
|
--user USER --password PASSWORD --sshd-port PORT --sshd-hostkey-directory PATH --keystore-password PASSWORD
|
||||||
--keystore-file FILE --truststore-password PASSWORD --truststore-file FILE | --help]
|
--keystore-file FILE --truststore-password PASSWORD --truststore-file FILE | --help]
|
||||||
|
|
||||||
|
12
tools/shell-cli/README.md
Normal file
12
tools/shell-cli/README.md
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
Standalone Shell
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Documentation for shell CLI can be found [here](http://docs.corda.net/website/releases/docs_head/shell.html)
|
||||||
|
|
||||||
|
To build this from the command line on Unix or MacOS:
|
||||||
|
|
||||||
|
Run ``./gradlew tools:shell-cli:buildShellCli`` to create a fat JAR in ``tools/shell-cli/build/``
|
||||||
|
|
||||||
|
To build this from the command line on Windows:
|
||||||
|
|
||||||
|
Run ``gradlew tools:shell-cli:buildShellCli`` to create a fat JAR in ``tools/shell-cli/build/``
|
@ -1,103 +1,55 @@
|
|||||||
buildscript {
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
mavenLocal()
|
|
||||||
mavenCentral()
|
|
||||||
jcenter()
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
classpath "org.jetbrains.kotlin:kotlin-noarg:$kotlin_version"
|
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
||||||
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.1'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
mavenLocal()
|
|
||||||
mavenCentral()
|
|
||||||
jcenter()
|
|
||||||
}
|
|
||||||
|
|
||||||
apply plugin: 'kotlin'
|
|
||||||
apply plugin: 'java'
|
|
||||||
apply plugin: 'application'
|
|
||||||
apply plugin: 'net.corda.plugins.publish-utils'
|
|
||||||
apply plugin: 'com.jfrog.artifactory'
|
|
||||||
apply plugin: 'com.github.johnrengelman.shadow'
|
|
||||||
apply plugin: 'maven-publish'
|
|
||||||
|
|
||||||
description 'Corda Shell CLI'
|
description 'Corda Shell CLI'
|
||||||
|
|
||||||
configurations {
|
buildscript {
|
||||||
integrationTestCompile.extendsFrom testCompile
|
repositories {
|
||||||
integrationTestRuntime.extendsFrom testRuntime
|
maven {
|
||||||
}
|
url "https://plugins.gradle.org/m2/"
|
||||||
|
|
||||||
sourceSets {
|
|
||||||
integrationTest {
|
|
||||||
kotlin {
|
|
||||||
compileClasspath += main.output + test.output
|
|
||||||
runtimeClasspath += main.output + test.output
|
|
||||||
srcDir file('src/integration-test/kotlin')
|
|
||||||
}
|
|
||||||
resources {
|
|
||||||
srcDir file('src/integration-test/resources')
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
test {
|
|
||||||
resources {
|
|
||||||
srcDir file('src/test/resources')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
classpath "com.github.jengelman.gradle.plugins:shadow:$shadow_version"
|
||||||
testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
|
classpath 'de.sebastianboegl.gradle.plugins:shadow-log4j-transformer:2.1.1'
|
||||||
|
|
||||||
compile project(':tools:shell')
|
|
||||||
|
|
||||||
// Unit testing helpers.
|
|
||||||
testCompile "junit:junit:$junit_version"
|
|
||||||
testCompile "org.assertj:assertj-core:${assertj_version}"
|
|
||||||
testCompile project(':test-utils')
|
|
||||||
testCompile project(':finance')
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
apply plugin: 'application'
|
||||||
|
apply plugin: 'com.github.johnrengelman.shadow'
|
||||||
|
apply plugin: 'net.corda.plugins.publish-utils'
|
||||||
|
apply plugin: 'com.jfrog.artifactory'
|
||||||
|
|
||||||
mainClassName = 'net.corda.tools.shell.StandaloneShellKt'
|
mainClassName = 'net.corda.tools.shell.StandaloneShellKt'
|
||||||
|
|
||||||
jar {
|
dependencies {
|
||||||
baseName 'corda-shell-cli'
|
compile project(':tools:shell')
|
||||||
|
compile group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.25'
|
||||||
|
|
||||||
|
testCompile project(':test-utils')
|
||||||
}
|
}
|
||||||
|
|
||||||
processResources {
|
processResources {
|
||||||
from file("$rootDir/config/dev/log4j2.xml")
|
from file("$rootDir/config/dev/log4j2.xml")
|
||||||
}
|
}
|
||||||
|
|
||||||
task integrationTest(type: Test) {
|
|
||||||
testClassesDirs = sourceSets.integrationTest.output.classesDirs
|
|
||||||
classpath = sourceSets.integrationTest.runtimeClasspath
|
|
||||||
}
|
|
||||||
|
|
||||||
publishing {
|
|
||||||
publications {
|
|
||||||
shadow(MavenPublication) { publication ->
|
|
||||||
project.shadow.component(publication)
|
|
||||||
artifactId = "corda-tools-shell-cli"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
shadowJar {
|
shadowJar {
|
||||||
//transform(de.sebastianboegl.gradle.plugins.shadow.transformers.Log4j2PluginsFileTransformer)
|
//transform(de.sebastianboegl.gradle.plugins.shadow.transformers.Log4j2PluginsFileTransformer)
|
||||||
archiveName = "corda-shell-cli-${version}.jar"
|
archiveName = "shell-cli-${version}.jar"
|
||||||
|
|
||||||
baseName = 'corda-shell-cli'
|
|
||||||
classifier = null
|
|
||||||
mainClassName = 'net.corda.tools.shell.StandaloneShellKt'
|
|
||||||
mergeServiceFiles()
|
mergeServiceFiles()
|
||||||
}
|
}
|
||||||
|
|
||||||
task buildShellCli(dependsOn: shadowJar)
|
task buildShellCli(dependsOn: shadowJar)
|
||||||
|
|
||||||
|
artifacts {
|
||||||
|
publish shadowJar {
|
||||||
|
classifier ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
jar {
|
||||||
|
classifier "ignore"
|
||||||
|
}
|
||||||
|
|
||||||
|
publish {
|
||||||
|
name 'corda-tools-shell-cli'
|
||||||
|
disableDefaultJar = true
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user