-
Notifications
You must be signed in to change notification settings - Fork 136
[MRESOLVER-700] Bundle transport: read support #685
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
Conversation
That is based on slightly improved file transport, that uses FileSystem which can by ZIPFS or JIMFS as well.
Why |
Initial idea is really just to disseminate the idea that one can "mount" ZIP files as remote repositories. Like repository staging, and there, the main use case is usually to perform some sort of "testing" with newly baked artifacts. This PR makes Resolver able to consume these bundle ZIP files (essentially ZIP files containing artifacts laid down on remote repo layout) with all the metadata (maven metadata, checksums, signatures, etc). |
... aand after I commented, I think figured your point 😄 Yes, ultimately Resolver 2 could be used to create and read ZIP bundles. But, IMO we need to be very careful here, like we should allow "create from scratch" (like ZIP file is created from scratch) or "read created bundle", where you really just consume bundle for testing purposes. Existing ZIP bundle should not be modified, or at least, would be risky business. Njord enforces this: it does not allow you to "export" to already existing ZIP files for example. But we should somewhere sit down and have a 🍻 that may be followed by a discussion about these things... |
For example we could achieve this by some extra params:
|
...r-transport-file/src/main/java/org/eclipse/aether/transport/file/FileTransporterFactory.java
Show resolved
Hide resolved
Just one remark (somewhat related to this PR): While I worked on Njord 0.1.2 release, I figured that even if we allow bundle creation with Resolver (like the above mentioned |
Resolve #1435 |
This PR slightly improves the file transport to fully utilize FileSystem, which now can be ZipFileSystem as well. The "old" part remains unchanged.
For factory just added
bundle:
prefix, that now may be in formbundle:fileUri
, wherefileUri
is basically a path of a ZIP file that must exist. The ZIP file is read only.The point of this PR is that user can now use a "bundle" (see https://central.sonatype.org/publish/publish-portal-upload/) just like we did before with staging repositories. Various tools (njord?) can produce bundles. The ZIP file is "mounted" and artifacts from it becomes reachable to Maven just like from any remote repository.
https://issues.apache.org/jira/browse/MRESOLVER-700