sw360portal icon indicating copy to clipboard operation
sw360portal copied to clipboard

In LicenseInfo Generation: Use Name of License Entry in SPDX file

Open bs-jokri opened this issue 7 years ago • 4 comments

From @bs-jokri on September 18, 2017 14:22

Currently, the license ref ID is used as license name from sPDX files. However, in Protex SPDX reports you also have a name field. It would be good, if this field is used, if present.

Should work for DOCX, Text, HTML

Copied from original issue: bsinno/sw360#486

bs-jokri avatar Oct 11 '17 08:10 bs-jokri

Example SPDX file with structure

http://www.apache.org/licenses/LICENSE-2.0 
Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.</spdx:licenseText>
    <rdfs:seeAlso>http://www.apache.org/licenses/LICENSE-2.0</rdfs:seeAlso>
    <rdfs:seeAlso>http://www.opensource.org/licenses/Apache-2.0</rdfs:seeAlso>
    <spdx:name>Apache License 2.0</spdx:name>
    <spdx:licenseId>Apache-2.0</spdx:licenseId>
    <rdf:type rdf:resource="http://spdx.org/rdf/terms#License"/>
  </rdf:Description>

bs-jokri avatar Oct 11 '17 08:10 bs-jokri

@maxhbr please check what you already did here and tell @bodetc

bs-jokri avatar Oct 11 '17 08:10 bs-jokri

@maxhbr: Isn't it already exactly was we have in the code? See here: https://github.com/bsinno/sw360/blob/baccfb7fb92480cfd93e05e2d7ef6b9c4683bc1d/backend/src/src-licenseinfo/src/main/java/org/eclipse/sw360/licenseinfo/parsers/SPDXParserTools.java#L45-L47

bodetc avatar Dec 05 '17 15:12 bodetc

One has to check with an report from protex, whether their license names are displayed correctly.

EDIT: The licenseName might not be filled correctly

maxhbr avatar Dec 05 '17 15:12 maxhbr