How to override a maven package?

I want to override the lemminx package to disable an additional test until the pr lemminx: disable flaky test by tricktron · Pull Request #257784 · NixOS/nixpkgs · GitHub is merged. The lemminx package is produced with the maven.buildMavenPackage function:

which is defined here:

and called through maven with:

As a result, I have the hypothesis that the following overrideAttrs does not work because the mvnParameters will be overriden again with the old values produced by the maven.buildMavenPackage function:

lemminx = prev.lemminx.overrideAttrs(oldAttrs: 
    {
        # disable the flaky DTDValidationExternalResourcesTest as well
        mvnParameters = final.lib.escapeShellArgs 
        [
            "-Dmaven.gitcommitid.skip=true"
            "-Dtest=!XMLValidationCommandTest,
            !XMLValidationExternalResourcesBasedOnDTDTest,
            !XMLSchemaPublishDiagnosticsTest,
            !PlatformTest,
            !XMLValidationExternalResourcesBasedOnXSDTest,
            !XMLExternalTest,
            !XMLSchemaCompletionExtensionsTest,
            !XMLSchemaDiagnosticsTest,
            !MissingChildElementCodeActionTest,
            !XSDValidationExternalResourcesTest,
            !DocumentLifecycleParticipantTest,
            !DTDValidationExternalResourcesTest" 
        ];
    });

How can I make this work? You can more easily test if you set mvnParameters = "" which should fail the build. In addition, are there any patterns to make overriding easier in such a case?