Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for artifact recipes as file #800

Conversation

jonesbusy
Copy link
Contributor

Hi,

The plugin already support recipeArtifactCoordinates that will resolve artifact from a remote repository and it's transitive dependency. I would like to support loading recipes directly from the file system without having the artifact published to a remote repository.

My use case imply that I don't want to add necessary maven repositories (via pom or settings) So I must resolve recipes locally.

I've just verified that tests are passing, but I didn't add any.

I've tested on a sample project

Right now recipeArtifactCoordinatestakes precedence on recipeArtifactFileswhen we can imagine support both by adding more classloader to the environment

mvn -Drewrite.activeRecipes=my.test.receipe.TestRecipe -Drewrite.recipeArtifactFiles=myjar.jar org.openrewrite.maven:rewrite-maven-plugin:5.34.0-SNAPSHOT:run

What's changed?

See before

What's your motivation?

See before

Anyone you would like to review specifically?

@timtebeek

Have you considered any alternatives or workarounds?

Yes by publishing to a remote temporary repository and updating maven repository. But is not convenient on my use case that I don't want to use any custom settings or update poms.

Any additional context

The GSoC 2024 https://summerofcode.withgoogle.com/programs/2024/projects/anaMmWRR

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

@timtebeek timtebeek self-requested a review June 16, 2024 10:02
@timtebeek timtebeek added the enhancement New feature or request label Jun 16, 2024
@jonesbusy jonesbusy closed this Jun 16, 2024
@jonesbusy
Copy link
Contributor Author

Closing the PR, at the end I can use the recipeArtifactCoordinates and get artifact from the local repository

@jonesbusy jonesbusy deleted the feature/support-for-artifact-file branch June 16, 2024 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants