Open adastraperangusta opened 3 days ago
Thanks for the clear steps to reproduce @adastraperangusta ! Indeed it seems Maven is more tolerant as compared to our own parser. We had added this check a while back for cases where there was neither a pom.xml nor a local .jar file, as that would lead to missing type information in our models that made it hard to troubleshoot the inevitable missed recipe changes. It seems we could relax that somewhat again provided the .jar is available. That would still not be ideal from our perspective, but would allow more projects to run. Any help towards that would be appreciated!
Hello,
I have projects with external dependencies that have been installed manually into a local maven repository. These artefacts don't have a pom in the repository. On these projects 'mvn clean install' succeeds and there is only a warning about the missing pom :
However when I try to run any openrewrite maven recipes on this kind of project, it fails with :
Why openrewrite maven recipes would fail when a maven build succeeds with warnings ? How to fix this ?
You can reproduce this bug with this minimal project : project.zip
Just install any jar locally with :
Then 'mvn clean install' will give :
Then running 'mvn org.openrewrite.maven:rewrite-maven-plugin:run -Drewrite.activeRecipes=org.openrewrite.maven.cleanup.PrefixlessExpressions`will fail with :