Commit 046c7c7ebbc90ca4132d5091d20a64e7cbff566d

Authored by Matthijs Brouwer
1 parent 6df8a435

create list of downloads from central repository metadata

src/site/markdown/download.md.vm
1 1 #Download
2 2  
3   -##Releases
  3 +#set($metadata = $xml.read("http://repo1.maven.org/maven2/nl/knaw/meertens/mtas/mtas/maven-metadata.xml"))
  4 +
  5 +**Latest release**
  6 +
  7 +<table>
  8 + <tbody>
  9 + <tr>
  10 + <th>Version</th>
  11 + <th>Lucene/Solr</th>
  12 + <th>Mtas</th>
  13 + <th colspan='3'>GitHub</th>
  14 + <th colspan='4'>Maven</th>
  15 + </tr>
  16 +#set($version = $metadata.versioning.latest)
  17 +#set($fullversion = $version.getText())
  18 +#set($versionnumbers = $StringUtils.split($fullversion,"."))
  19 +#foreach( $item in $loop.watch($versionnumbers) )
  20 +#set($itemindex = $loop.getIndex())
  21 +#if ($itemindex == 0)
  22 +#set($majorversion = $item)
  23 +#elseif ($itemindex == 1)
  24 +#set($minorversion = $item)
  25 +#elseif ($itemindex == 2)
  26 +#set($incrementalversion = $item)
  27 +#elseif ($itemindex == 3)
  28 +#set($mtasversion = $item)
  29 +#end
  30 +#end
  31 + <tr>
  32 + <td>${fullversion}</td>
  33 + <td>${majorversion}.${minorversion}.${incrementalversion}</td>
  34 + <td>${mtasversion}</td>
  35 + <td><a href='https://github.com/meertensinstituut/mtas/releases/download/v${fullversion}/mtas-${fullversion}.jar'>Binary (jar)</a></td>
  36 + <td><a href='https://github.com/meertensinstituut/mtas/archive/v${fullversion}.tar.gz'>Source (tgz)</a></td>
  37 + <td><a href='https://github.com/meertensinstituut/mtas/archive/v${fullversion}.zip'>Source (zip)</a></td>
  38 + <td><a href='http://repo1.maven.org/maven2/nl/knaw/meertens/mtas/mtas/${fullversion}/mtas-${fullversion}.pom'>pom</a></td>
  39 + <td><a href='http://repo1.maven.org/maven2/nl/knaw/meertens/mtas/mtas/${fullversion}/mtas-${fullversion}.jar'>jar</a></td>
  40 + <td><a href='http://repo1.maven.org/maven2/nl/knaw/meertens/mtas/mtas/${fullversion}/mtas-${fullversion}-javadoc.jar'>javadoc.jar</a></td>
  41 + <td><a href='http://repo1.maven.org/maven2/nl/knaw/meertens/mtas/mtas/${fullversion}/mtas-${fullversion}-sources.jar'>sources.jar</a></td>
  42 + </tr>
  43 + </tbody>
  44 +</table>
  45 +
  46 +**Previous releases**
4 47  
5 48 <table>
6 49 <tbody>
7 50 <tr>
  51 + <th>Version</th>
8 52 <th>Lucene/Solr</th>
9   - <th>Mtas Release</th>
10   - <th colspan='3'>Downloads</th>
11   - <th>Description</th>
  53 + <th>Mtas</th>
  54 + <th colspan='3'>GitHub</th>
  55 + <th colspan='4'>Central Repository</th>
12 56 </tr>
  57 +#foreach($version in $metadata.versioning.versions.children().iterator())
  58 +#set($fullversion = $version.getText())
  59 +#if($fullversion != $metadata.versioning.latest.getText())
  60 +#set($versionnumbers = $StringUtils.split($fullversion,"."))
  61 +#foreach( $item in $loop.watch($versionnumbers) )
  62 +#set($itemindex = $loop.getIndex())
  63 +#if ($itemindex == 0)
  64 +#set($majorversion = $item)
  65 +#elseif ($itemindex == 1)
  66 +#set($minorversion = $item)
  67 +#elseif ($itemindex == 2)
  68 +#set($incrementalversion = $item)
  69 +#elseif ($itemindex == 3)
  70 +#set($mtasversion = $item)
  71 +#end
  72 +#end
13 73 <tr>
14   - <td>$context.get("latestReleaseLuceneVersion")</td>
15   - <td>$context.get("latestReleaseFullVersion")</td>
16   - <td><a href='https://search.maven.org/remotecontent?filepath=nl/knaw/meertens/mtas/mtas/${context.get("latestReleaseFullVersion")}/mtas-${context.get("latestReleaseFullVersion")}.jar'>Binary (jar)</a></td>
17   - <td><a href='https://github.com/meertensinstituut/mtas/archive/v${context.get("latestReleaseFullVersion")}.tar.gz'>Source (tgz)</a></td>
18   - <td><a href='https://github.com/meertensinstituut/mtas/archive/v${context.get("latestReleaseFullVersion")}.zip'>Source (zip)</a></td>
19   - <td>Latest release</td>
  74 + <td>${fullversion}</td>
  75 + <td>${majorversion}.${minorversion}.${incrementalversion}</td>
  76 + <td>${mtasversion}</td>
  77 + <td><a href='https://github.com/meertensinstituut/mtas/releases/download/v${fullversion}/mtas-${fullversion}.jar'>Binary (jar)</a></td>
  78 + <td><a href='https://github.com/meertensinstituut/mtas/archive/v${fullversion}.tar.gz'>Source (tgz)</a></td>
  79 + <td><a href='https://github.com/meertensinstituut/mtas/archive/v${fullversion}.zip'>Source (zip)</a></td>
  80 + <td><a href='http://repo1.maven.org/maven2/nl/knaw/meertens/mtas/mtas/${fullversion}/mtas-${fullversion}.pom'>pom</a></td>
  81 + <td><a href='http://repo1.maven.org/maven2/nl/knaw/meertens/mtas/mtas/${fullversion}/mtas-${fullversion}.jar'>jar</a></td>
  82 + <td><a href='http://repo1.maven.org/maven2/nl/knaw/meertens/mtas/mtas/${fullversion}/mtas-${fullversion}-javadoc.jar'>javadoc.jar</a></td>
  83 + <td><a href='http://repo1.maven.org/maven2/nl/knaw/meertens/mtas/mtas/${fullversion}/mtas-${fullversion}-sources.jar'>sources.jar</a></td>
20 84 </tr>
21   - </tbody>
  85 +#end
  86 +#end
  87 + </tbody>
22 88 </table>
23 89  
24   -See also [previous releases](http://repo1.maven.org/maven2/nl/knaw/meertens/mtas/mtas/).
25 90 \ No newline at end of file
  91 +See also the [Central Repository](http://repo1.maven.org/maven2/nl/knaw/meertens/mtas/mtas/) and [GitHub Releases](https://github.com/meertensinstituut/mtas/releases).
... ...
src/site/markdown/installation.md.vm
1 1 #Getting started
2   -
3   -Prebuilt jar libraries are available from the [download](download.html) page, current version is [${context.get("latestReleaseFullVersion")}](https://search.maven.org/remotecontent?filepath=nl/knaw/meertens/mtas/mtas/${context.get("latestReleaseFullVersion")}/mtas-${context.get("latestReleaseFullVersion")}.jar) (development)
  2 +#set($metadata = $xml.read("http://repo1.maven.org/maven2/nl/knaw/meertens/mtas/mtas/maven-metadata.xml"))
  3 +#set($version = $metadata.versioning.latest)
  4 +#set($fullversion = $version.getText())
  5 +#set($versionnumbers = $StringUtils.split($fullversion,"."))
  6 +#foreach( $item in $loop.watch($versionnumbers) )
  7 +#set($itemindex = $loop.getIndex())
  8 +#if ($itemindex == 0)
  9 +#set($majorversion = $item)
  10 +#elseif ($itemindex == 1)
  11 +#set($minorversion = $item)
  12 +#elseif ($itemindex == 2)
  13 +#set($incrementalversion = $item)
  14 +#elseif ($itemindex == 3)
  15 +#set($mtasversion = $item)
  16 +#end
  17 +#end
  18 +
  19 +Prebuilt jar libraries are available from the [download](download.html) page, current version is [${fullversion}](https://github.com/meertensinstituut/mtas/releases/download/v${fullversion}/mtas-${fullversion}.jar) (development)
4 20  
5 21 **Build from Source with Maven**
6 22  
... ... @@ -27,4 +43,5 @@ Mtas can be used as plugin for [Apache Solr](https://lucene.apache.org/solr/) or
27 43  
28 44 or see [Mtas and Docker](installation_docker.html) to get a quick demonstration.
29 45  
30   -Versioning follows the required version of both Solr and Lucene, the latest available version is ${context.get("latestReleaseLuceneVersion")}.
  46 +Versioning follows the required version of both Solr and Lucene followed by an incremental Mtas versioning number.
  47 +The latest available version is ${fullversion}, requiring Solr/Lucene version ${majorversion}.${minorversion}.${incrementalversion}.
... ...
src/site/markdown/installation_solr.md.vm
1 1 #Apache Solr
  2 +#set($metadata = $xml.read("http://repo1.maven.org/maven2/nl/knaw/meertens/mtas/mtas/maven-metadata.xml"))
  3 +#set($version = $metadata.versioning.latest)
  4 +#set($fullversion = $version.getText())
  5 +#set($versionnumbers = $StringUtils.split($fullversion,"."))
  6 +#foreach( $item in $loop.watch($versionnumbers) )
  7 +#set($itemindex = $loop.getIndex())
  8 +#if ($itemindex == 0)
  9 +#set($majorversion = $item)
  10 +#elseif ($itemindex == 1)
  11 +#set($minorversion = $item)
  12 +#elseif ($itemindex == 2)
  13 +#set($incrementalversion = $item)
  14 +#elseif ($itemindex == 3)
  15 +#set($mtasversion = $item)
  16 +#end
  17 +#end
2 18  
3 19 Mtas can be used as plugin for Apache Solr
4 20  
5 21 **Prerequisites**
6 22  
7 23 - Installed [Apache Solr](https://lucene.apache.org/solr/)
8   -- Currently supported and advised version is $context.get("latestReleaseLuceneVersion")
  24 +- Currently supported and advised version is ${majorversion}.${minorversion}.${incrementalversion}
9 25  
10 26 Start with a new Solr core.
11 27  
12 28 **Libraries**
13 29  
14   -Add the `mtas-${context.get("latestReleaseFullVersion")}.jar` to the `lib` directory of the new Solr core.
15   -A prebuilt `mtas-${context.get("latestReleaseFullVersion")}.jar` is available from the [download](download.html) page.
  30 +Add the `mtas-${fullversion}.jar` to the `lib` directory of the new Solr core.
  31 +A prebuilt `mtas-${fullversion}.jar` is available from the [download](download.html) page.
16 32  
17 33 Furthermore, add the [Apache Commons Mathematics Library](http://commons.apache.org/proper/commons-math/) to the `lib` directory of the new Solr core.
18 34  
... ...