Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facing issue with v5.1.1 #599

Open
sandeepnRES opened this issue Feb 27, 2024 · 3 comments
Open

Facing issue with v5.1.1 #599

sandeepnRES opened this issue Feb 27, 2024 · 3 comments

Comments

@sandeepnRES
Copy link

Hi,
I'm using Corda version 4.8.11, and due to log4j vulnerability had to move to gradle version 7.0+, and the only corda gradle plugin version 5.1.1 supports gradle version 7.0+.
But when I'm trying to use it in the same way this repo uses: https://github.com/corda/cordapp-template-kotlin/blob/release-V4/build.gradle
I'm getting following error:

> Task :jar
Cordapp metadata not defined for this gradle build file. See https://docs.corda.net/head/cordapp-build-systems.html#separation-of-cordapp-contracts-flows-and-services

> Task :deployNodes FAILED
Running Cordform task
Deleting build/nodes

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':deployNodes'.
> No JAR matching '^corda-(?!(testserver-|webserver-)).*\.jar$' found. Have you deployed the Corda project to Maven?

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.6.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 5s
8 actionable tasks: 5 executed, 3 up-to-date

Although this repo is using old gradle 5.6 and corda gradle plugin is 5.0.12. I could not find any example for corda gradle plugin v5.1.1. There is no proper documentation anywhere on this too. So any kind of help on this would be really great.

Thanks.

@adelel1
Copy link

adelel1 commented Feb 27, 2024

@sandeepnRES
Copy link
Author

@adelel1 Thanks for quick response. I tried 4.9.2 and even latest 4.11, I still get the same error as above.
This is how my constants.properties looks like:

cordaReleaseGroup=net.corda
cordaCoreReleaseGroup=net.corda
cordaVersion=4.9.2
cordaCoreVersion=4.9.2
gradlePluginsVersion=5.1.1
kotlinVersion=1.3.72
junitVersion=4.12
log4jVersion =2.17.2
platformVersion=10
slf4jVersion=1.7.36
nettyVersion=4.1.22.Final
arrowVersion=0.10.4
springBootVersion=2.0.2.RELEASE

build.gradle is almost same as above shared link to corda-samples, except that I'm using task dockerform.

@sandeepnRES
Copy link
Author

I was able to solve the issue by using build.gradle from a test file here (which is very deep buried):
https://github.com/corda/corda-gradle-plugins/blob/release/5.1.1/cordformation/src/test/resources/net/corda/plugins/DeployTwoNodeCordappWithDocker.gradle

My issue was not using corda but using cordaProvided as in earlier versions it was cordaCompile for net.corda:corda dependency.

Would recommend to add link to these files in readme as samples for users to refer to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants