rewrite-gradle-plugin icon indicating copy to clipboard operation
rewrite-gradle-plugin copied to clipboard

`classPath` not declared as required input

Open koppor opened this issue 7 months ago • 2 comments

I am using this plugin together with gradlex-org/extra-java-module-info.

When running, I get

caused by: java.lang.RuntimeException: File does not exist: /home/runner/work/jabref/jabref/test-support/build/libs/test-support.jar
  This is likely because a tool or another plugin performs early dependency resolution.
  You can prevent this error by setting 'skipLocalJars = true'.

https://github.com/JabRef/jabref/actions/runs/16052632080/job/45298938588

The workaround is to execute all GUI tests in the before openrewrite:

xvfb-run --auto-servernum ./gradlew --no-configuration-cache :jabgui:test :rewriteDryRun

Instead of

./gradlew --no-configuration-cache :rewriteDryRun

(See https://github.com/JabRef/jabref/pull/13448)

I filed an issue at that plugin (https://github.com/gradlex-org/extra-java-module-info/issues/188), but the response is that I should ask here:

If I read the code correctly the plugin is doing dependency resolution (accessing files on a classpath), without declaring the that classpath input to the task.

Thus, the question if you could add classpath as required input.

koppor avatar Jul 04 '25 06:07 koppor