samples-kotlin
samples-kotlin copied to clipboard
how to build with cordapp project with corda enterprise?
hi, I try to run our cordapp with corda enterprise. we already get enterprise jars, and its placed at private github repo like https://raw.githubusercontent.com/our_organization/enterprise-maven-repo/master
. with that setting, say, how to modify build.gradle at https://github.com/corda/samples-kotlin/blob/master/Basic/cordapp-example/build.gradle ?
we change https://github.com/corda/samples-kotlin/blob/master/Basic/cordapp-example/build.gradle#L23 to our private repository, with proper github user and token and authentication block like
maven {
url "https://raw.githubusercontent.com/tts-tblock/corda-44-ee/master"
credentials {
username "$gh_user"
password "$gh_token"
}
authentication {
basic(BasicAuthentication)
}
}
then add corda dependency like below
cordaCompile "$corda_release_group:corda-core:$corda_release_version"
cordaRuntime "$corda_enterprise_release_group:corda-node-api:$corda_release_version"
cordaRuntime "$corda_enterprise_release_group:corda:$corda_release_version"
cordaCompile "$corda_enterprise_release_group:corda-jackson:$corda_release_version"
cordaCompile "$corda_enterprise_release_group:corda-rpc:$corda_release_version"
where $corda_enterprise_release_group is 'com.r3.corda', and $corda_release_group is 'net.corda', and $corda_release_version is our corda enterprise version. we run ./gradlew build, confirmed jar files our repository is downloaded.
but when we try to dump our dependency with gradle task like following,
task dumpCompileFiles() {
println project.configurations.compile*.toURI()
}
corda-4.4.jar still points net.corda, not com.r3.corda like /Users/me/.gradle/caches/modules-2/files-2.1/net.corda/corda/4.4/2e287dcc676f08818e151dd6d4116f06246eb51f/corda-4.4.jar
I think with corda enterprise, this path should be like /Users/me/.gradle/caches/modules-2/files-2.1/com.r3.corda/corda/4.4/3ea036905388aee52ba2cf8f445ed5eefce1c31b/corda-4.4.jar
.
its correct result for the cordapp project built with corda enterprise?
regards,
Hi @umegaya Were you able to solve this?
@NiteeshPutla hi, its bit too old and I forgot detail, but we could solve the problem. I think we had to put corde ee jars in our own maven repository to solve the problem. maybe https://raw.githubusercontent.com/tts-tblock/corda-44-ee/master might have something different structure that gradle expected.
hope that helps.
regards,
Thank you @umegaya