You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The gradle templates for the Java client are using gradle 6.7.1 which was released on Nov 16, 2020. The generated build.gradle uses the maven plugin which has been deprecated.
Can we change to the maven-publish plugin and upgrade to gradle 7.2?
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.7.1/userguide/command_line_interface.html#sec:command_line_warnings
# ./gradlew --warning-mode all
> Configure project :
The maven plugin has been deprecated. This is scheduled to be removed in Gradle 7.0. Please use the maven-publish plugin instead. Consult the upgrading guide for further information: https://docs.gradle.org/6.7.1/userguide/upgrading_version_5.html#legacy_publication_system_is_deprecated_and_replaced_with_the_publish_plugins
at build_aqveneaidw399nnycjnuu168c.run(/home/serosset/goroot/src/bitbucket-eng-sjc1.cisco.com/an/ui-an-apidocs/.build/sdk/intersight_java/build.gradle:80)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
Describe the solution you'd like
Use maven-publish plugin instead of maven. It has been deprecated and was removed in gradle 7.0.
Generated gradlew file should have permission +x (currently it is 644).
Remove jcenter() method. It has been deprecated and will be removed in gradle 8.0.
Use the mainClass property instead of JavaExec.main property. It has been deprecated and will be removed in gradle 8.0.
Describe alternatives you've considered
The purpose of the gradlew wrapper is to help provide repeatable builds. To make it work, all generated gradlew scripts should have permission 755.
If the build environment has gradle version >= 7.x, the OpenAPI Java jersey2 build fails because it uses deprecated maven plugin.
The gradlew script doesn’t rely on a local Gradle installation. It goes and fetches a Gradle installation from the internet the first time it runs on your local machine, and caches it.
The RepositoryHandler.jcenter() method has been deprecated. This is scheduled to be removed in Gradle 8.0. JFrog announced JCenter's sunset in February 2021. Use mavenCentral() instead. Consult the upgrading guide for further information: https://docs.gradle.org/7.2/userguide/upgrading_version_6.html#jcenter_deprecation
at build_aqveneaidw399nnycjnuu168c$_run_closure1$_closure2.doCall(/home/serosset/goroot/src/bitbucket-eng-sjc1.cisco.com/an/ui-an-apidocs/.build/sdk/intersight_java/build.gradle:11)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
The JavaExec.main property has been deprecated. This is scheduled to be removed in Gradle 8.0. Please use the mainClass property instead. See https://docs.gradle.org/7.2/dsl/org.gradle.api.tasks.JavaExec.html#org.gradle.api.tasks.JavaExec:main for more details.
at build_aqveneaidw399nnycjnuu168c$_run_closure7.doCall(/home/serosset/goroot/src/bitbucket-eng-sjc1.cisco.com/an/ui-an-apidocs/.build/sdk/intersight_java/build.gradle:100)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
Notes:
In gradle 7.2, dependency verification is promoted to a stable feature.
The text was updated successfully, but these errors were encountered:
sebastien-rosset
changed the title
[REQ] Upgrade Java templates to gradle 7.x
[REQ] Upgrade Java templates to gradle 7.x, remove 'maven' plugin
Oct 3, 2021
sebastien-rosset
changed the title
[REQ] Upgrade Java templates to gradle 7.x, remove 'maven' plugin
[REQ] Java client: Upgrade to gradle 7.2, remove deprecated 'maven' plugin
Oct 4, 2021
Is your feature request related to a problem? Please describe.
The gradle templates for the Java client are using gradle 6.7.1 which was released on Nov 16, 2020. The generated
build.gradle
uses themaven
plugin which has been deprecated.Can we change to the
maven-publish
plugin and upgrade to gradle 7.2?The following templates would be impacted:
Here is the output of gradle:
Describe the solution you'd like
maven-publish
plugin instead ofmaven
. It has been deprecated and was removed in gradle 7.0.maven
plugin deprecation notice.gradlew
file should have permission+x
(currently it is 644).jcenter()
method. It has been deprecated and will be removed in gradle 8.0.mainClass
property instead ofJavaExec.main
property. It has been deprecated and will be removed in gradle 8.0.Describe alternatives you've considered
The purpose of the
gradlew
wrapper is to help provide repeatable builds. To make it work, all generated gradlew scripts should have permission 755.If the build environment has gradle version >= 7.x, the OpenAPI Java jersey2 build fails because it uses deprecated
maven
plugin.The gradlew script doesn’t rely on a local Gradle installation. It goes and fetches a Gradle installation from the internet the first time it runs on your local machine, and caches it.
https://tomgregory.com/gradle-vs-gradlew-difference/
Additional context
Notes:
The text was updated successfully, but these errors were encountered: