aliostad / CacheCow

An implementation of HTTP Caching in .NET Core and 4.5.2+ for both the client and the server
MIT License
848 stars 171 forks source link

Provide license Url in NuGet #247

Closed jochenz closed 4 years ago

jochenz commented 4 years ago

This would help in automated OSS scans.

aliostad commented 4 years ago

We used to have it (have a look at older versions). Unfortunately it is now deprecated. https://github.com/NuGet/Announcements/issues/32

image

This is in fact the generated nuspec:

<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
  <metadata>
    <id>CacheCow.Server</id>
    <version>2.6.3</version>
    <authors>Ali Kheyrollahi</authors>
    <owners>Ali Kheyrollahi</owners>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <license type="expression">MIT</license>
    <licenseUrl>https://licenses.nuget.org/MIT</licenseUrl>
    <projectUrl>https://github.com/aliostad/CacheCow/</projectUrl>
    <description>CacheCow is an HTTP Caching Library for .NET</description>
    <dependencies>
      <group targetFramework=".NETFramework4.5.2">
        <dependency id="CacheCow.Common" version="2.6.3" exclude="Build,Analyzers" />
        <dependency id="Microsoft.AspNet.WebApi.Client" version="5.2.5" exclude="Build,Analyzers" />
        <dependency id="Microsoft.AspNet.WebApi.Core" version="5.2.5" exclude="Build,Analyzers" />
        <dependency id="Newtonsoft.Json" version="11.0.1" exclude="Build,Analyzers" />
      </group>
      <group targetFramework=".NETStandard2.0">
        <dependency id="CacheCow.Common" version="2.6.3" exclude="Build,Analyzers" />
        <dependency id="Microsoft.AspNet.WebApi.Client" version="5.2.5" exclude="Build,Analyzers" />
        <dependency id="Microsoft.AspNetCore.Mvc" version="2.0.3" exclude="Build,Analyzers" />
        <dependency id="Newtonsoft.Json" version="11.0.1" exclude="Build,Analyzers" />
      </group>
    </dependencies>
  </metadata>
</package>

It has license now hence you should still be able to automate - I would argue much easier now.

jochenz commented 4 years ago

Indeed, we have an OSS scan running and for some reason it did not detect the license in the nuspec. We need to look at our tool. Thanks for your nice implementation!