Skip to content

Commit

Permalink
Downloader: Fix broken links
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Nonnenmacher <martin.nonnenmacher@here.com>
  • Loading branch information
mnonnenmacher authored and sschuberth committed Feb 17, 2021
1 parent ce99e9f commit 278d520
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions analyzer/src/main/kotlin/managers/utils/NodeSupport.kt
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ fun expandNpmShortcutURL(url: String): String {
if (path.startsWith("git@") || path.startsWith("github.com") || path.startsWith("gitlab.com")) return url

return if (!path.isNullOrEmpty() && listOf(uri.authority, uri.query).all { it == null }) {
// See https://docs.npmjs.com/files/package.json#github-urls.
// See https://docs.npmjs.com/cli/v7/configuring-npm/package-json#github-urls.
val revision = if (uri.hasRevisionFragment()) "#${uri.fragment}" else ""

// See https://docs.npmjs.com/files/package.json#repository.
// See https://docs.npmjs.com/cli/v7/configuring-npm/package-json#repository.
when (uri.scheme) {
null, "github" -> "https://github.com/$path.git$revision"
"gist" -> "https://gist.github.com/$path$revision"
Expand Down
4 changes: 2 additions & 2 deletions downloader/src/main/kotlin/Downloader.kt
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,11 @@ object Downloader {
"see: https://guides.rubygems.org/specification-reference/#metadata"
"Gradle" -> " Please make sure the published POM file includes the SCM connection, see: " +
"https://docs.gradle.org/current/userguide/publishing_maven.html#" +
"example_customizing_the_pom_file"
"sec:modifying_the_generated_pom"
"Maven" -> " Please define the \"connection\" tag within the \"scm\" tag in the POM file, " +
"see: http://maven.apache.org/pom.html#SCM"
"NPM" -> " Please define the \"repository\" in the package.json file, see: " +
"https://docs.npmjs.com/files/package.json#repository"
"https://docs.npmjs.com/cli/v7/configuring-npm/package-json#repository"
"PIP", "PyPI" -> " Please make sure the setup.py defines the 'Source' attribute in " +
"'project_urls', see: https://packaging.python.org/guides/" +
"distributing-packages-using-setuptools/#project-urls"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"timestamp" : "1970-01-01T00:00:00Z",
"type" : "SCANNER",
"source" : "FileCounter",
"message" : "DownloadException: No source artifact URL provided for 'Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0'.\nCaused by: DownloadException: No VCS URL provided for 'Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0'. Please make sure the published POM file includes the SCM connection, see: https://docs.gradle.org/current/userguide/publishing_maven.html#example_customizing_the_pom_file",
"message" : "DownloadException: No source artifact URL provided for 'Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0'.\nCaused by: DownloadException: No VCS URL provided for 'Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0'. Please make sure the published POM file includes the SCM connection, see: https://docs.gradle.org/current/userguide/publishing_maven.html#sec:modifying_the_generated_pom",
"severity" : "ERROR",
"pkg" : 0,
"scan_result" : 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ issues:
source: "FileCounter"
message: "DownloadException: No source artifact URL provided for 'Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0'.\n\
Caused by: DownloadException: No VCS URL provided for 'Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0'.\
\ Please make sure the published POM file includes the SCM connection, see: https://docs.gradle.org/current/userguide/publishing_maven.html#example_customizing_the_pom_file"
\ Please make sure the published POM file includes the SCM connection, see: https://docs.gradle.org/current/userguide/publishing_maven.html#sec:modifying_the_generated_pom"
severity: "ERROR"
pkg: 0
scan_result: 0
Expand Down
Binary file modified reporter/src/funTest/assets/file-counter-expected-scan-report.xlsx
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ <h3>Packages</h3>
<td><a href="#issue-1">1</a></td><td>Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0</td><td></td><td><a href="#Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0">Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0</a>
<ul>
<li>
<p>Unknown time [ERROR]: FileCounter - DownloadException: No source artifact URL provided for 'Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0'.<br>Caused by: DownloadException: No VCS URL provided for 'Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0'. Please make sure the published POM file includes the SCM connection, see: https://docs.gradle.org/current/userguide/publishing_maven.html#example_customizing_the_pom_file</p>
<p>Unknown time [ERROR]: FileCounter - DownloadException: No source artifact URL provided for 'Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0'.<br>Caused by: DownloadException: No VCS URL provided for 'Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0'. Please make sure the published POM file includes the SCM connection, see: https://docs.gradle.org/current/userguide/publishing_maven.html#sec:modifying_the_generated_pom</p>
<p></p>
</li>
<details>
Expand Down Expand Up @@ -625,7 +625,7 @@ <h3 class="">Packages</h3>
</td><td>
<ul>
<li>
<p>Unknown time [ERROR]: FileCounter - DownloadException: No source artifact URL provided for 'Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0'.<br>Caused by: DownloadException: No VCS URL provided for 'Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0'. Please make sure the published POM file includes the SCM connection, see: https://docs.gradle.org/current/userguide/publishing_maven.html#example_customizing_the_pom_file</p>
<p>Unknown time [ERROR]: FileCounter - DownloadException: No source artifact URL provided for 'Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0'.<br>Caused by: DownloadException: No VCS URL provided for 'Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0'. Please make sure the published POM file includes the SCM connection, see: https://docs.gradle.org/current/userguide/publishing_maven.html#sec:modifying_the_generated_pom</p>
</li>
</ul>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ scanner:
message: "DownloadException: No source artifact URL provided for 'Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0'.\n\
Caused by: DownloadException: No VCS URL provided for 'Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0'.\
\ Please make sure the published POM file includes the SCM connection,\
\ see: https://docs.gradle.org/current/userguide/publishing_maven.html#example_customizing_the_pom_file"
\ see: https://docs.gradle.org/current/userguide/publishing_maven.html#sec:modifying_the_generated_pom"
severity: "ERROR"
- id: "Gradle:org.ossreviewtoolkit:nested-fake-project:1.0.0"
results:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ scanner:
\ DownloadException: Download failed for 'Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0'.\n\
Suppressed: DownloadException: No VCS URL provided for 'Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0'.\
\ Please make sure the published POM file includes the SCM connection,\
\ see: https://docs.gradle.org/current/userguide/publishing_maven.html#example_customizing_the_pom_file\n\
\ see: https://docs.gradle.org/current/userguide/publishing_maven.html#sec:modifying_the_generated_pom\n\
Suppressed: DownloadException: No source artifact URL provided for 'Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0'."
severity: "ERROR"
- id: "Maven:junit:junit:4.12"
Expand Down

0 comments on commit 278d520

Please sign in to comment.