Project

Profile

Help

Plugin Planning » History » Sprint/Milestone 3

ananace, 01/28/2018 04:25 PM
Adding information about the NuGet package planning

1 1 bmbouter
# Plugin Planning
2
3 2 bkearney
[[Java Jar Files]]  
4
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.
5
6
uniqueness : group_id + artifact_id + version (maybe, the hash???)  
7
types per unit : 1 pom, many jars. 2 sigs per item  
8
attriubtes : updated date (datetime)
9
10
clients: maven  
11
maybe https://pypi.python.org/pypi/jip
12
13
Content
14
15
  - Root discovery uses the architype-catalog.xml file  
16
    https://maven.repository.redhat.com/ga/archetype-catalog.xml
17
  - Each archtype has a version metadata  
18
    https://maven.repository.redhat.com/ga/org/apache/ant/ant/maven-metadata.xml
19
20
Disovery
21
22
  - It may be nice to have pulling down deps.
23
  - If not, you mirror everything
24
  - Or pull down a single item
25 1 bmbouter
26
[[Debian Deb Packages]]
27
28
[[Ruby Gems]]
29
30 3 ananace
[[NuGet Packages]]  
31
This would manage .nupkg files, which are renamed ZIP files with a special \<id\>.nuspec file in the root.
32
33
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  
34
Uniqueness is determined as a combination of id and version from the spec, with added digest.  
35
Core attributes are id and version. They are both strings and are required to discover NuGet packages.
36
37
Additional simple optional attributes that could be added are;  
38
\- authors : string  
39
\- copyright : string  
40
\- description : string  
41
\- language : string : default en-US  
42
\- owners : string  
43
\- summary : string  
44
\- tags : string  
45
\- title : string
46
47
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.
48
49
For content discovery, a core index JSON lists available services on the registry (https://registry.example/v3/index.json)  
50
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)  
51
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)
52
53
The JSON blobs contain identical metadata to the nuspec XML, just in JSON format.
54
55
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)
56 1 bmbouter
57
[[Helm Support]]
58
59
[[Rust Crate]]
60
61
[[Flatpak]]