mirror of
https://github.com/corda/corda.git
synced 2025-03-01 04:16:21 +00:00
Add network-management version info on startup (#497)
* Add network-management version info on startup Add version info to manifest file and print it out on network-managemnet startup
This commit is contained in:
parent
351469b765
commit
8239c5d29f
@ -79,6 +79,9 @@ dependencies {
|
||||
// Hibernate audit plugin
|
||||
compile "org.hibernate:hibernate-envers:5.2.11.Final"
|
||||
|
||||
// Manifests: for reading stuff from the manifest file
|
||||
compile "com.jcabi:jcabi-manifests:1.1"
|
||||
|
||||
testCompile project(':test-utils')
|
||||
testCompile project(':node-driver')
|
||||
|
||||
@ -109,3 +112,10 @@ dependencies {
|
||||
compile "org.bouncycastle:bcprov-jdk15on:${bouncycastle_version}"
|
||||
compile "org.bouncycastle:bcpkix-jdk15on:${bouncycastle_version}"
|
||||
}
|
||||
|
||||
jar {
|
||||
classifier "ignore"
|
||||
manifest {
|
||||
attributes('Network-Management-Version': version)
|
||||
}
|
||||
}
|
@ -12,6 +12,7 @@ import net.corda.nodeapi.internal.crypto.X509Utilities
|
||||
import org.bouncycastle.pkcs.PKCS10CertificationRequest
|
||||
import java.time.Instant
|
||||
import kotlin.concurrent.thread
|
||||
import com.jcabi.manifests.Manifests
|
||||
|
||||
data class NetworkMapStartParams(val signer: LocalSigner?, val updateNetworkParameters: NetworkParameters?, val config: NetworkMapConfig)
|
||||
|
||||
@ -41,10 +42,17 @@ class ApproveAllCertificateRequestStorage(private val delegate: CertificationReq
|
||||
}
|
||||
}
|
||||
|
||||
private fun logNetworkManagementVersion() {
|
||||
if (Manifests.exists("Network-Management-Version")) {
|
||||
println("Network Management Version: ${Manifests.read("Network-Management-Version")}")
|
||||
}
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
try {
|
||||
parseParameters(*args).run {
|
||||
println("Starting in $mode mode")
|
||||
logNetworkManagementVersion()
|
||||
when (mode) {
|
||||
Mode.ROOT_KEYGEN -> generateRootKeyPair(
|
||||
rootStorePath ?: throw IllegalArgumentException("The 'rootStorePath' parameter must be specified when generating keys!"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user