gnodet opened a new issue, #12432:
URL: https://github.com/apache/maven/issues/12432

   ## Summary
   
   `gmavenplus-plugin` fails with `UnsupportedOperationException` when 
executing `removeStubs` under Maven 4. This affects **even the latest version 
(4.1.1)**, meaning there is no version that mvnup could upgrade to.
   
   The plugin likely calls a method on a Maven API object that returns an 
immutable list in Maven 4 (similar to scala-maven-plugin#911 which was fixed by 
returning mutable copies). The `removeStubs` goal tries to mutate a list 
returned by the Maven API.
   
   ## Affected projects (from Maven 4 compatibility testing)
   
   - **jackrabbit-oak** — `gmavenplus-plugin:3.0.2:removeStubs` → 
`UnsupportedOperationException`
   - **tinkerpop** — `gmavenplus-plugin:4.1.1:removeStubs` → 
`UnsupportedOperationException` (latest version!)
   
   ## Error output
   
   ```
   [ERROR] Failed to execute goal 
org.codehaus.gmavenplus:gmavenplus-plugin:4.1.1:removeStubs (default) 
     on project gremlin-groovy: Execution default of goal 
     org.codehaus.gmavenplus:gmavenplus-plugin:4.1.1:removeStubs failed. 
UnsupportedOperationException -> [Help 1]
   org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute 
goal 
     org.codehaus.gmavenplus:gmavenplus-plugin:4.1.1:removeStubs (default) [...]
   Caused by: org.apache.maven.plugin.PluginExecutionException: Execution 
default [...]
   Caused by: java.lang.UnsupportedOperationException
   ```
   
   ## Analysis
   
   This is the same class of issue as `scala-maven-plugin < 4.9.5` (already in 
`known-issues.json`): Maven 4 returns immutable collections from API methods 
that returned mutable lists in Maven 3. The scala-maven-plugin fixed this in 
4.9.5 by copying the list before modifying it.
   
   For gmavenplus-plugin, the fix needs to be done upstream 
(https://github.com/groovy/GMavenPlus). Since even version 4.1.1 (latest) is 
broken, this should be:
   1. Reported upstream to GMavenPlus
   2. Added to `known-issues.json` in the testing framework
   3. Once fixed upstream, added to mvnup's `PLUGIN_UPGRADES` list
   
   ## Relevant upstream
   
   - GMavenPlus repo: https://github.com/groovy/GMavenPlus
   - Similar fix in scala-maven-plugin: 
https://github.com/davidB/scala-maven-plugin/commit/e6d922eb


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to