Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

download binaries (incl. hashes and signatures) from ASF Maven #55

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions src/main/jbake/templates/downloads.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,19 @@ def downloadLink(label, artifact, version, suffix) {
newLine()
}

def mavenDownloadLink(label, artifact, version, suffix) {
def path = "${artifact}/${version}/${artifact}-${version}${suffix}"
def base = "https://repository.apache.org/content/repositories/releases/org/apache/sling/"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to point to Maven Central instead

Projects must not point or refer to repository.apache.org directly in download pages, release announcements or emails. Instead, any public download links for those releases should point to Maven Central.

(https://infra.apache.org/release-distribution.html#maven)


a(href:"${base}${path}", label)
yield " ("
a(href:"${base}${path}.asc", "asc")
yield ", "
a(href:"${base}${path}.sha1", "sha1")
yield ")"
newLine()
}

def githubLink(artifact,ghflag) {
if(ghflag == 'Y') {
artifact = artifact.replaceAll('\\.','-')
Expand Down Expand Up @@ -431,7 +444,7 @@ layout 'layout/main.tpl', true,
githubLink(artifact,ghflag)
}
td(){
downloadLink("Bundle", artifact, version, "." + extension)
mavenDownloadLink("Bundle", artifact, version, "." + extension)
}
td(){
downloadLink("Source ZIP", artifact, version, "-source-release.zip")
Expand All @@ -457,7 +470,7 @@ layout 'layout/main.tpl', true,
githubLink(artifact, ghflag)
}
td(){
downloadLink("Maven Plugin", artifact, version, ".jar")
mavenDownloadLink("Maven Plugin", artifact, version, ".jar")
}
td(){
downloadLink("Source ZIP", artifact, version, "-source-release.zip")
Expand All @@ -483,7 +496,7 @@ layout 'layout/main.tpl', true,
githubLink(artifact, ghflag)
}
td(){
downloadLink("bnd Plugin", artifact, version, ".jar")
mavenDownloadLink("bnd Plugin", artifact, version, ".jar")
}
td(){
downloadLink("Source ZIP", artifact, version, "-source-release.zip")
Expand All @@ -506,7 +519,7 @@ layout 'layout/main.tpl', true,
def artifact = data[2]
def version = data[3]
td(){
downloadLink("Bundle", artifact, version, ".jar")
mavenDownloadLink("Bundle", artifact, version, ".jar")
}
td(){
downloadLink("Source ZIP", artifact, version, "-source-release.zip")
Expand Down