Show last authors
1 {{groovy}}
2 import groovy.xml.*
3 import org.apache.commons.lang3.*
4
5 def offset = 0
6 def count = 200
7 def shouldContinue = true
8
9 while (shouldContinue) {
10 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
11 def root = new XmlSlurper().parseText(url)
12
13 offset += count
14 def total = Integer.parseInt(root.totalCount.text())
15 shouldContinue = total > offset ? true : false
16
17 root.data.artifact.each { artifact ->
18 // Extract the last part of the group id and consider it's the repo short name
19 def groupId = artifact.groupId.text()
20 def repo = StringUtils.substringAfterLast(groupId, ".")
21 def artifactId = artifact.artifactId
22 def version = artifact.version
23 def javadocURL = "http://nexus.xwiki.org/nexus/service/local/repositories/releases/archive/org/xwiki/${repo}/${artifactId}/${version}/${artifactId}-${version}-javadoc.jar/!/index.html"
24 println "* [[${artifactId}>>url:${javadocURL}]]"
25 }
26 }
27 {{/groovy}}

Get Connected