[DEBUG]
java.lang.IllegalArgumentException: Unable to find runtime dependencies beginning with: 'spring-boot', 'spring-web'
at org.openrewrite.java.JavaParser.dependenciesFromClasspath (JavaParser.java:86)
at org.openrewrite.java.JavaParser$Builder.classpath (JavaParser.java:220)
at org.openrewrite.java.spring.boot2.GetErrorAttributes$GetErrorAttributesVisitor.lambda$visitMethodInvocation$0 (GetErrorAttributes.java:75)
at org.openrewrite.java.internal.template.JavaTemplateParser.compileTemplate (JavaTemplateParser.java:243)
at org.openrewrite.java.internal.template.JavaTemplateParser.lambda$parseMethodArguments$9 (JavaTemplateParser.java:193)
at org.openrewrite.java.internal.template.JavaTemplateParser.cache (JavaTemplateParser.java:252)
at org.openrewrite.java.internal.template.JavaTemplateParser.parseMethodArguments (JavaTemplateParser.java:192)
at org.openrewrite.java.JavaTemplate$2.visitMethodInvocation (JavaTemplate.java:388)
at org.openrewrite.java.JavaTemplate$2.visitMethodInvocation (JavaTemplate.java:102)
at org.openrewrite.java.tree.J$MethodInvocation.acceptJava (J.java:3237)
at org.openrewrite.java.tree.J.accept (J.java:64)
at org.openrewrite.TreeVisitor.visit (TreeVisitor.java:193)
at org.openrewrite.TreeVisitor.visit (TreeVisitor.java:144)
at org.openrewrite.java.JavaTemplate.withTemplate (JavaTemplate.java:486)
at org.openrewrite.java.JavaTemplate.withTemplate (JavaTemplate.java:42)
at org.openrewrite.java.tree.J.withTemplate (J.java:93)
at org.openrewrite.java.spring.boot2.GetErrorAttributes$GetErrorAttributesVisitor.visitMethodInvocation (GetErrorAttributes.java:72)
Running the
rewrite-spring#GetErrorAttributes
recipe from therewrite-maven-plugin
throws anIllegalArgumentException
The rewrite-spring GetErrorAttributes recipes leverages a JavaTemplate having a JavaParser with a defined classpath.