Gradle-maven-settings-plugin does not work with Gradle 8.2

I am a developer from a major streaming service in Denmark, and working on Android development. We have been using the maven-settings plugin in conjunction with maven-publish to publish Android libraries to Azure Devops. We have been using the setup for multiple years, but have now experienced issues when trying to update Gradle to 8.2.
I have created tickets in the github repository but it seems there is never anyone answering in there at all… I have created tickets in Azure Developer Community as well, and they told me to create an issue in here.

What we are experiencing is that from gradle 8.2 the build of maven-publish fails due to unsupported functions being used in the maven-settings plugin.

I have attached the console below, and hope that someone can help us, as this error basically makes it impossible to upgrade to Gradle 8.2.

FAILURE: Build failed with an exception.

* What went wrong:
Configuration cache problems found in this build.

1 problem was found storing the configuration cache.
- Plugin 'net.linguica.maven-settings': external process started 'env'
  See https://docs.gradle.org/8.2/userguide/configuration_cache.html#config_cache:requirements:external_processes

See the complete report at file:///Users/runner/work/1/s/build/reports/configuration-cache/bf5990qu3jevy8o8crnmpt4x7/8vbc41lcq8gwzfj2h91grztxz/configuration-cache-report.html
> Starting an external process 'env' during configuration time is unsupported.

* 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./

BUILD FAILED in 8m

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

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

For more on this, please refer to https://docs.gradle.org/8.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
76 actionable tasks: 76 executed
Configuration cache entry discarded with 1 problem.
Error: The process '/Users/runner/work/1/s/gradlew' failed with exit code 1
    at ExecState._setResult (/Users/runner/work/_tasks/Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4/2.231.0/node_modules/azure-pipelines-task-lib/toolrunner.js:943:25)
    at ExecState.CheckComplete (/Users/runner/work/_tasks/Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4/2.231.0/node_modules/azure-pipelines-task-lib/toolrunner.js:926:18)
    at ChildProcess.<anonymous> (/Users/runner/work/_tasks/Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4/2.231.0/node_modules/azure-pipelines-task-lib/toolrunner.js:839:19)
    at ChildProcess.emit (node:events:513:28)
    at maybeClose (node:internal/child_process:1100:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
##[error]Error: The process '/Users/runner/work/1/s/gradlew' failed with exit code 1
Finishing: Assemble and run unit tests (:tv:app module)```

Well, you are using a plugin that had its last release - a 0.5 version - 8.5 years ago, its last commit 5.5 years ago, its last comment by the owner in any issue or PR 5.5 years ago, with 16 open issues and 3 open PRs, while still contribution actively and recently to other repositories.

To me this looks like the plugin is abandoned even if not documented somewhere, and if “AZ Artifacts recommends this plugin” that might be a documentation bug in the meantime.

It seems the plugin is not compatible with newer versions of Gradle, or at least not with the configuration cache. If you disable the configuration cache in projects where you use that plugin you might be lucky and it might still work for the time being maybe.

But you might still want to search for a replacement or fork, because sooner or later it is quite likely it will become completely incompatible even if you do not use configuration cache. And even if working it might also already cause other subtle problems or preformance drains if it was not maintained and adapted to newer APIs for such a long time.

Hi Björn,

We are aware that the plugin is probrably not supported at all anymore, but we are using it because it is the official documented way by the Azure Artifacts team to publish maven packages to their artifacts feeds, so that it why we use it unfortunately. If i knew of an alternative way to authenticate using the .m2 file on the computer for maven.publish, I would have done it that way instead.

Thanks for the suggestions disabling the configuration cache, we will try that while raising awareness to the Azure team that they really should be finding/making an alternative and updating their documentation instead of using this very old unsupported plugin.

Having a quick look at the Azure docs, it seems the only purpose of the plugin is to read the username and “password” from the Maven settings file as plain text. The only instance where this might be infinitesimally helpful is, if you publish via Gradle and Maven and want to avoid duplicating the information. Otherwise it is quite useless and you could as well simply use the Gradle way, putting them properly named into your user-level gradle.properties.

https://docs.gradle.org/current/userguide/declaring_repositories_adv.html#sec:handling_credentials