Show last authors
1 {{velocity}}
2 #set ($cacheId="$request.versionId")
3 {{/velocity}}
4
5 {{cache id="~{~{velocity~}~}$cacheId~{~{/velocity~}~}"}}
6 {{groovy}}
7 import groovy.xml.*
8 import org.apache.commons.lang3.*
9
10 def offset = 0
11 def count = 200
12 def shouldContinue = true
13
14 while (shouldContinue) {
15 def url = "http://nexus.xwiki.org/nexus/service/local/lucene/search?g=org.xwiki.*&v=${request.versionId}&p=jar&c=javadoc&from=${offset}&count=${count}".toURL().text
16 def root = new XmlSlurper().parseText(url)
17
18 offset += count
19 def total = Integer.parseInt(root.totalCount.text())
20 shouldContinue = total > offset ? true : false
21
22 root.data.artifact.each { artifact ->
23 // Extract the last part of the group id and consider it's the repo short name
24 def groupId = artifact.groupId.text()
25 def repo = StringUtils.substringAfterLast(groupId, ".")
26 def artifactId = artifact.artifactId
27 def version = artifact.version
28 def javadocURL = "http://nexus.xwiki.org/nexus/service/local/repositories/public/archive/org/xwiki/${repo}/${artifactId}/${version}/${artifactId}-${version}-javadoc.jar/!/index.html"
29 println "* [[${artifactId}>>url:${javadocURL}]]"
30 }
31 }
32 {{/groovy}}
33 {{/cache}}

Get Connected