Closed aecollver closed 10 years ago
Here's an untested implementation of the proposed fix:
https://github.com/acollver/ivy-s3-resolver/commit/98142489ea099e73330b75423127480615392a96
I have verified that my proposed fix works with both specific and dynamic versions.
I created a pull request for this issue. Apologies for creating the issue against sbt-s3-resolver when the proposed fix belongs in ivy-s3-resolver:
I updated my pull request to support pagination with AmazonS3.listObject
Hi @acollver! Thanks a lot! Actually, I wanted this feature too, but didn't know how to implement it and didn't have time to investigate. The ivy-s3-resolver is maintained by @evdokim, but he's too busy now to review the code, so I'll just merge it and release a new version.
I just released the new version with the fix: v0.12.0
.
Observed Behavior
Cause
I found that the fm-sbt-s3-resolver is creating a "directory" object in S3 (an empty object that has a key ending in "/"). Creating the same "directory" object from the AWS console allows Ivy to resolve a module published to S3 using sbt-s3-resolver.
Ivy's FileRepository returns a mix of directory and file names (but one level deep unlike the S3 listObjects overload that is currently used): https://github.com/sbt/ivy/blob/2.3.x-sbt/src/java/org/apache/ivy/plugins/repository/file/FileRepository.java#L99-L112
Proposed Fix
Update https://github.com/ohnosequences/ivy-s3-resolver/blob/master/src/main/java/ohnosequences/ivy/S3Repository.java#L114-L133