Project

Profile

Help

Plugin Planning » History » Revision 3

Revision 2 (bkearney, 01/28/2018 03:58 PM) → Revision 3/12 (ananace, 01/28/2018 04:25 PM)

# Plugin Planning 

 [[Java Jar Files]]   
 I think this should actually be a maven plugin, since it needs to download both jar files and pom files which are maven artifacts. With each, there is a sha and md5 signature. 

 uniqueness : group_id + artifact_id + version (maybe, the hash???)   
 types per unit : 1 pom, many jars. 2 sigs per item   
 attriubtes : updated date (datetime) 

 clients: maven   
 maybe https://pypi.python.org/pypi/jip 

 Content 

   - Root discovery uses the architype-catalog.xml file   
     https://maven.repository.redhat.com/ga/archetype-catalog.xml 
   - Each archtype has a version metadata   
     https://maven.repository.redhat.com/ga/org/apache/ant/ant/maven-metadata.xml 

 Disovery 

   - It may be nice to have pulling down deps. 
   - If not, you mirror everything 
   - Or pull down a single item 

 [[Debian Deb Packages]] 

 [[Ruby Gems]] 

 [[NuGet Packages]]   
 This would manage .nupkg files, which are renamed ZIP files with a special \<id\>.nuspec file in the root. 

 The .nuspec is documented with an xsd on GitHub: https://github.com/NuGet/NuGet.Client/blob/dev/src/NuGet.Core/NuGet.Packaging/compiler/resources/nuspec.xsd   
 Uniqueness is determined as a combination of id and version from the spec, with added digest.   
 Core attributes are id and version. They are both strings and are required to discover NuGet packages. 

 Additional simple optional attributes that could be added are;   
 \- authors : string   
 \- copyright : string   
 \- description : string   
 \- language : string : default en-US   
 \- owners : string   
 \- summary : string   
 \- tags : string   
 \- title : string 

 Clients that access NuGet packages are; nuget (Both by itself as well as a package-manager plugin for Visual Studio), the dotnet CLI tool, the Chocolatey tool, and just plain curl works too. 

 For content discovery, a core index JSON lists available services on the registry (https://registry.example/v3/index.json)   
 The Catalog/3.0.0 service provides json blobs for full content listing, split into several "pages" of JSON. (https://docs.microsoft.com/en-us/nuget/guides/api/query-for-all-published-packages)   
 Additionally, the PackageBaseAddress/3.0.0 service provides the base address for generating a download URL from {@id}/{LOWER_ID}/{LOWER_VERSION}/{LOWER_ID}.{LOWER_VERSION}.nupkg (https://docs.microsoft.com/en-us/nuget/api/package-base-address-resource) 

 The JSON blobs contain identical metadata to the nuspec XML, just in JSON format. 

 To make the client happy about finding packages in large registries, the SearchQueryService would probably have to be implemented as well - as a live API. (https://docs.microsoft.com/en-us/nuget/api/search-query-service-resource) 

 [[Helm Support]] 

 [[Rust Crate]] 

 [[Flatpak]]