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

Ability to read S3 URI while dryRun instead of relying on Http(s) #4849

Open
Goel-Akshit opened this issue Jan 6, 2025 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@Goel-Akshit
Copy link

What problem are you trying to solve?

My organization uses AWS S3 for hosting Maven repositories, which are accessed using s3:// URIs. While Maven resolves dependencies correctly using these URIs, the OpenRewrite framework seems unable to handle them. This prevents us from effectively running OpenRewrite commands like rewrite:dryRun and utilizing its functionality in our projects.

Describe the solution you'd like

ability to access the maven repository using s3 URI.

Have you considered any alternatives or workarounds?

  1. I tried using S3 folder URL https://s3.ap-south-1.amazonaws.com/bucketName.maven.repo/release/
  2. I tried using rewrite.yml as
    repositories:
    - id: s3.release
    uri: s3://bucketName.maven.repo/release
    - id: s3.snapshot
    uri: s3://bucketName.maven.repo/snapshot

Additional context

[WARNING] Failed to access maven repository s3://bucketName.maven.repo/release due to: Repository s3://bucketName.maven.repo/release is not HTTP(S).
[WARNING] Failed to access maven repository s3://bucketName.maven.repo/release due to: Repository s3://bucketName.maven.repo/release is not HTTP(S).
[WARNING] Failed to access maven repository s3://bucketName.maven.repo/release due to: Repository s3://bucketName.maven.repo/release is not HTTP(S).
[WARNING] Failed to access maven repository s3://bucketName.maven.repo/release due to: Repository s3://bucketName.maven.repo/release is not HTTP(S).
......

@Goel-Akshit Goel-Akshit added the enhancement New feature or request label Jan 6, 2025
@timtebeek
Copy link
Contributor

Hi @Goel-Akshit ; indeed this has not been added yet, as indicated here.

// can be s3 among potentially other types for which there is a maven wagon implementation
ctx.getResolutionListener().repositoryAccessFailed(repository.getUri(), new IllegalArgumentException("Repository " + repository.getUri() + " is not HTTP(S)."));

If you'd like to help bring this to OpenRewrite that would be much appreciated, or we have plenty of folks willing to build that functionality on contract for you if you can make the business case internally to do so.

@timtebeek timtebeek moved this to Backlog in OpenRewrite Jan 6, 2025
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
Status: Backlog
Development

No branches or pull requests

2 participants