CORDA-3024 Rename the webserver (#5489)

This commit is contained in:
Tudor Malene 2019-09-26 10:20:49 +01:00 committed by Shams Asari
parent f945e57c17
commit 298d8ba69c
38 changed files with 42 additions and 42 deletions

View File

@ -384,7 +384,7 @@ dependencies {
// Set to corda compile to ensure it exists now deploy nodes no longer relies on build
compile project(path: ":node:capsule", configuration: 'runtimeArtifacts')
compile project(path: ":webserver:webcapsule", configuration: 'runtimeArtifacts')
compile project(path: ":testing:testserver:testcapsule:", configuration: 'runtimeArtifacts')
// For the buildCordappDependenciesJar task
runtime project(':client:jfx')
@ -394,7 +394,7 @@ dependencies {
runtime project(':confidential-identities')
runtime project(':finance:workflows')
runtime project(':finance:contracts')
runtime project(':webserver')
runtime project(':testing:testserver')
testCompile project(':test-utils')
detekt 'io.gitlab.arturbosch.detekt:detekt-cli:1.0.1'
}
@ -481,8 +481,8 @@ bintrayConfig {
'corda-test-utils',
'corda-test-db',
'corda-jackson',
'corda-webserver-impl',
'corda-webserver',
'corda-testserver-impl',
'corda-testserver',
'corda-node-driver',
'corda-confidential-identities',
'corda-shell',

View File

@ -3,7 +3,7 @@
# their own projects. So don't get fancy with syntax!
cordaVersion=4.3-SNAPSHOT
gradlePluginsVersion=5.0.2
gradlePluginsVersion=5.0.3
kotlinVersion=1.2.71
java8MinUpdateVersion=171
# ***************************************************************#

View File

@ -53,11 +53,11 @@ For example: with cordapp-example (IOU app) the following commands would be run:
./gradlew deployNodes
./kotlin-source/build/nodes/runnodes
Then start the Corda webserver
Then start the Corda test webserver
.. sourcecode:: shell
find ~/dev/cordapp-example/kotlin-source/ -name corda-webserver.jar -execdir sh -c 'java -jar {} &' \;
find ~/dev/cordapp-example/kotlin-source/ -name corda-testserver.jar -execdir sh -c 'java -jar {} &' \;
You can now interact with your running CorDapp. See the instructions `here <https://docs.corda.net/tutorial-cordapp.html#via-http>`__.

View File

@ -103,7 +103,7 @@ Connect to one of your Corda nodes (make sure this is not the Notary node) using
Build the yo cordapp sample which you can find here: |os_samples_branch|/yo-cordapp and install it in the cordapp directory.
Now restart Corda and the Corda webserver using the following commands or restart your Corda VM from the Azure portal:
Now restart Corda and the Corda test webserver using the following commands or restart your Corda VM from the Azure portal:
.. sourcecode:: shell

View File

@ -6,6 +6,8 @@ release, see :doc:`app-upgrade-notes`.
Unreleased
----------
* Moved and renamed the testing web server to the ``testing`` subproject. Also renamed the published artifact to ``corda-testserver.jar``.
* Support for Java 11 (compatibility mode). Please read https://github.com/corda/corda/pull/5356.
* Removed the RPC exception privacy feature. Previously, in production mode, the exceptions thrown on the node were stripped of all content

View File

@ -16,7 +16,7 @@ This class allows you to connect to your node via a message queue protocol and p
interacting with the node. You make calls on a JVM object as normal, and the marshalling back-and-forth is handled for
you.
.. warning:: The built-in Corda webserver is deprecated and unsuitable for production use. If you want to interact with
.. warning:: The built-in Corda test webserver is deprecated and unsuitable for production use. If you want to interact with
your node via HTTP, you will need to stand up your own webserver that connects to your node using the
`CordaRPCClient`_ class. You can find an example of how to do this using the popular Spring Boot server
`here <https://github.com/corda/spring-webserver>`_.

View File

@ -126,8 +126,6 @@ Here is an overview of the various Corda dependencies:
* ``corda-tools-explorer`` - The Node Explorer tool. Do not depend on
* ``corda-tools-network-bootstrapper`` - The Network Builder tool. Useful in build scripts
* ``corda-tools-shell-cli`` - The Shell CLI tool. Useful in build scripts
* ``corda-webserver-impl`` - The Corda webserver fat JAR. Deprecated. Usually only used by build scripts
* ``corda-websever`` - The Corda webserver library. Deprecated. Use a standard webserver library such as Spring instead
Dependencies on other CorDapps
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -308,7 +306,7 @@ Below is a sample CorDapp Gradle dependencies block. When building your own CorD
cordaCompile "net.corda:corda-node-api:$corda_release_version"
cordaCompile "net.corda:corda-webserver-impl:$corda_release_version"
cordaRuntime "net.corda:corda:$corda_release_version"
cordaRuntime "net.corda:corda-webserver:$corda_release_version"
cordaRuntime "net.corda:corda-testserver:$corda_release_version"
testCompile "net.corda:corda-test-utils:$corda_release_version"
// Corda Plugins: dependent flows and services

View File

@ -126,7 +126,7 @@ current working directory of the JVM):
corda/
corda.jar
corda-webserver.jar
corda-testserver.jar
explorer/
node-explorer.jar
cordapps/

View File

@ -9,7 +9,7 @@ Deploying a node to a server
Linux: Installing and running Corda as a system service
-------------------------------------------------------
We recommend creating system services to run a node and the optional webserver. This provides logging and service
We recommend creating system services to run a node and the optional test webserver. This provides logging and service
handling, and ensures the Corda service is run at boot.
**Prerequisites**:
@ -123,7 +123,7 @@ handling, and ensures the Corda service is run at boot.
* ``sudo chown root:root /etc/init/corda.conf``
* ``sudo chmod 644 /etc/init/corda.conf``
.. note:: The Corda webserver provides a simple interface for interacting with your installed CorDapps in a browser.
.. note:: The Corda test webserver provides a simple interface for interacting with your installed CorDapps in a browser.
Running the webserver is optional.
10. **SystemD**: Create a ``corda-webserver.service`` file based on the example below and save it in the ``/etc/systemd/system/``

View File

@ -40,7 +40,7 @@ dependencies {
compile project(':core')
compile project(':client:jfx')
compile project(':node-driver')
compile project(':webserver')
compile project(':testing:testserver')
testCompile project(':test-utils')
@ -51,7 +51,7 @@ dependencies {
}
cordaRuntime project(path: ":node:capsule", configuration: 'runtimeArtifacts')
cordaRuntime project(path: ":webserver:webcapsule", configuration: 'runtimeArtifacts')
cordaRuntime project(path: ":testing:testserver:testcapsule:", configuration: 'runtimeArtifacts')
// CorDapps: dependent flows and services
compile project(':finance:contracts')

View File

@ -44,7 +44,7 @@ dependencies {
// Corda integration dependencies
cordaRuntime project(path: ":node:capsule", configuration: 'runtimeArtifacts')
cordaRuntime project(path: ":webserver:webcapsule", configuration: 'runtimeArtifacts')
cordaRuntime project(path: ":testing:testserver:testcapsule:", configuration: 'runtimeArtifacts')
cordapp project(':samples:attachment-demo:contracts')
cordapp project(':samples:attachment-demo:workflows')
@ -64,7 +64,7 @@ dependencies {
testCompile "org.assertj:assertj-core:$assertj_version"
integrationTestCompile project(':webserver')
integrationTestCompile project(':testing:testserver')
}
task integrationTest(type: Test, dependsOn: []) {
@ -73,7 +73,7 @@ task integrationTest(type: Test, dependsOn: []) {
}
def nodeTask = tasks.getByPath(':node:capsule:assemble')
def webTask = tasks.getByPath(':webserver:webcapsule:assemble')
def webTask = tasks.getByPath(':testing:testserver:testcapsule::assemble')
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar', nodeTask, webTask]) {
ext.rpcUsers = [['username': "demo", 'password': "demo", 'permissions': ["StartFlow.net.corda.attachmentdemo.AttachmentDemoFlow",
"InvokeRpc.partiesFromName",

View File

@ -19,11 +19,11 @@ dependencies {
// Corda integration dependencies
cordaRuntime project(path: ":node:capsule", configuration: 'runtimeArtifacts')
cordaRuntime project(path: ":webserver:webcapsule", configuration: 'runtimeArtifacts')
cordaRuntime project(path: ":testing:testserver:testcapsule:", configuration: 'runtimeArtifacts')
cordaCompile project(':core')
cordaCompile project(':client:jfx')
cordaCompile project(':client:rpc')
cordaCompile (project(':webserver')) {
cordaCompile(project(':testing:testserver')) {
exclude group: "org.apache.logging.log4j"
}
cordaCompile (project(':node-driver')) {
@ -43,7 +43,7 @@ dependencies {
}
def nodeTask = tasks.getByPath(':node:capsule:assemble')
def webTask = tasks.getByPath(':webserver:webcapsule:assemble')
def webTask = tasks.getByPath(':testing:testserver:testcapsule::assemble')
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar', nodeTask, webTask]) {
nodeDefaults {
cordapp project(':finance:workflows')

View File

@ -16,7 +16,7 @@ dependencies {
}
def nodeTask = tasks.getByPath(':node:capsule:assemble')
def webTask = tasks.getByPath(':webserver:webcapsule:assemble')
def webTask = tasks.getByPath(':testing:testserver:testcapsule::assemble')
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar', nodeTask, webTask]) {
directory file("$buildDir/nodes")
nodeDefaults {

View File

@ -31,7 +31,7 @@ dependencies {
}
def nodeTask = tasks.getByPath(':node:capsule:assemble')
def webTask = tasks.getByPath(':webserver:webcapsule:assemble')
def webTask = tasks.getByPath(':testing:testserver:testcapsule::assemble')
task deployNodes(dependsOn: ['deployNodesSingle', 'deployNodesRaft', 'deployNodesBFT', 'deployNodesCustom'])

View File

@ -41,9 +41,9 @@ dependencies {
// Corda integration dependencies
cordaRuntime project(path: ":node:capsule", configuration: 'runtimeArtifacts')
cordaRuntime project(path: ":webserver:webcapsule", configuration: 'runtimeArtifacts')
cordaRuntime project(path: ":testing:testserver:testcapsule:", configuration: 'runtimeArtifacts')
cordaCompile project(':core')
cordaCompile (project(':webserver')) {
cordaCompile(project(':testing:testserver')) {
exclude group: "org.apache.logging.log4j"
}
@ -82,7 +82,7 @@ jar {
}
def nodeTask = tasks.getByPath(':node:capsule:assemble')
def webTask = tasks.getByPath(':webserver:webcapsule:assemble')
def webTask = tasks.getByPath(':testing:testserver:testcapsule::assemble')
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar', nodeTask, webTask]) {
directory file("$buildDir/nodes")
nodeDefaults {

View File

@ -25,8 +25,8 @@ include 'client:jfx'
include 'client:mock'
include 'client:rpc'
include 'docker'
include 'webserver'
include 'webserver:webcapsule'
include 'testing:testserver'
include 'testing:testserver:testcapsule:'
include 'experimental'
include 'experimental:avalanche'
include 'experimental:blobwriter'

View File

@ -76,7 +76,7 @@ task integrationTest(type: Test) {
}
jar {
baseName 'corda-webserver-impl'
baseName 'corda-testserver-impl'
}
publish {

View File

@ -26,12 +26,12 @@ capsule {
task buildWebserverJar(type: FatCapsule, dependsOn: project(':node').tasks.jar) {
applicationClass 'net.corda.webserver.WebServer'
archiveName "corda-webserver-${corda_release_version}.jar"
archiveName "corda-testserver-${corda_release_version}.jar"
applicationSource = files(
project(':webserver').configurations.runtimeClasspath,
project(':webserver').tasks.jar,
project(':webserver').sourceSets.main.java.outputDir.toString() + '/CordaWebserverCaplet.class',
project(':webserver').sourceSets.main.java.outputDir.toString() + '/CordaWebserverCaplet$1.class',
project(':testing:testserver').configurations.runtimeClasspath,
project(':testing:testserver').tasks.jar,
project(':testing:testserver').sourceSets.main.java.outputDir.toString() + '/CordaWebserverCaplet.class',
project(':testing:testserver').sourceSets.main.java.outputDir.toString() + '/CordaWebserverCaplet$1.class',
project(':node').buildDir.toString() + '/resources/main/reference.conf',
"$rootDir/config/dev/log4j2.xml",
project(':node:capsule').projectDir.toString() + '/NOTICE' // Copy CDDL notice
@ -66,5 +66,5 @@ artifacts {
publish {
disableDefaultJar = true
name 'corda-webserver'
name 'corda-testserver'
}

View File

@ -31,7 +31,7 @@ apply plugin: 'kotlin'
apply plugin: 'application'
evaluationDependsOn(':tools:explorer:capsule')
evaluationDependsOn(':webserver:webcapsule')
evaluationDependsOn(':testing:testserver:testcapsule:')
mainClassName = 'net.corda.demobench.DemoBench'
applicationDefaultJvmArgs = [
@ -85,7 +85,7 @@ dependencies {
compile ':purejavacomm-0.0.18'
testCompile project(':test-utils')
testCompile project(':webserver')
testCompile project(':testing:testserver')
testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}"
testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}"
@ -139,8 +139,8 @@ distributions {
into 'corda'
fileMode = 0444
}
from(project(':webserver:webcapsule').tasks.buildWebserverJar) {
rename 'corda-webserver-(.*)', 'corda-webserver.jar'
from(project(':testing:testserver:testcapsule:').tasks.buildWebserverJar) {
rename 'corda-testserver-(.*)', 'corda-testserver.jar'
into 'corda'
fileMode = 0444
}

View File

@ -5,7 +5,7 @@ import tornadofx.*
class WebServerController : Controller() {
private val jvm by inject<JVMConfig>()
private val webserverPath = jvm.applicationDir.resolve("corda").resolve("corda-webserver.jar")
private val webserverPath = jvm.applicationDir.resolve("corda").resolve("corda-testserver.jar")
init {
log.info("Web Server JAR: $webserverPath")