Commit f2b84b22f67abd585562b7b2d8d6c0628e9b97ac
1 parent
93eb619f
adjust site new release setup
Showing
5 changed files
with
163 additions
and
29 deletions
pom.xml
1 | -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
1 | +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
2 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
2 | 3 | <properties> |
3 | 4 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
4 | 5 | <currentLuceneVersion>7.0.1</currentLuceneVersion> |
6 | + <latestReleaseLuceneVersion>7.0.1</latestReleaseLuceneVersion> | |
7 | + <latestReleaseMtasVersion>1</latestReleaseMtasVersion> | |
8 | + <latestReleaseFullVersion>${latestReleaseLuceneVersion}.${latestReleaseMtasVersion}</latestReleaseFullVersion> | |
5 | 9 | </properties> |
6 | 10 | <scm> |
7 | 11 | <connection>scm:git:https://github.com/meertensinstituut/mtas.git</connection> |
8 | 12 | <url>http://github.com/meertensinstituut/mtas</url> |
9 | 13 | <developerConnection>scm:git:https://github.com/meertensinstituut/mtas.git</developerConnection> |
10 | - <tag>HEAD</tag> | |
11 | - </scm> | |
14 | + <tag>HEAD</tag> | |
15 | + </scm> | |
12 | 16 | <distributionManagement> |
13 | 17 | <snapshotRepository> |
14 | 18 | <id>ossrh</id> |
... | ... | @@ -48,7 +52,30 @@ |
48 | 52 | </developer> |
49 | 53 | </developers> |
50 | 54 | <build> |
51 | - <plugins> | |
55 | + <plugins> | |
56 | + | |
57 | + | |
58 | + <plugin> | |
59 | + <groupId>org.codehaus.mojo</groupId> | |
60 | + <artifactId>properties-maven-plugin</artifactId> | |
61 | + <version>1.0.0</version> | |
62 | + <executions> | |
63 | + <execution> | |
64 | + <goals> | |
65 | + <goal>set-system-properties</goal> | |
66 | + </goals> | |
67 | + <configuration> | |
68 | + <properties> | |
69 | + <property> | |
70 | + <name>version</name> | |
71 | + <value>1.2.3</value> | |
72 | + </property> | |
73 | + </properties> | |
74 | + </configuration> | |
75 | + </execution> | |
76 | + </executions> | |
77 | + </plugin> | |
78 | + | |
52 | 79 | <plugin> |
53 | 80 | <groupId>org.apache.maven.plugins</groupId> |
54 | 81 | <artifactId>maven-release-plugin</artifactId> |
... | ... | @@ -194,7 +221,7 @@ |
194 | 221 | </plugins> |
195 | 222 | </build> |
196 | 223 | <profiles> |
197 | - <profile> | |
224 | + <profile> | |
198 | 225 | <id>release</id> |
199 | 226 | <build> |
200 | 227 | <plugins> |
... | ... | @@ -212,18 +239,18 @@ |
212 | 239 | </executions> |
213 | 240 | </plugin> |
214 | 241 | <plugin> |
215 | - <groupId>org.apache.maven.plugins</groupId> | |
216 | - <artifactId>maven-source-plugin</artifactId> | |
217 | - <version>3.0.1</version> | |
218 | - <executions> | |
219 | - <execution> | |
220 | - <id>attach-sources</id> | |
221 | - <goals> | |
222 | - <goal>jar</goal> | |
223 | - </goals> | |
224 | - </execution> | |
225 | - </executions> | |
226 | - </plugin> | |
242 | + <groupId>org.apache.maven.plugins</groupId> | |
243 | + <artifactId>maven-source-plugin</artifactId> | |
244 | + <version>3.0.1</version> | |
245 | + <executions> | |
246 | + <execution> | |
247 | + <id>attach-sources</id> | |
248 | + <goals> | |
249 | + <goal>jar</goal> | |
250 | + </goals> | |
251 | + </execution> | |
252 | + </executions> | |
253 | + </plugin> | |
227 | 254 | <plugin> |
228 | 255 | <groupId>org.apache.maven.plugins</groupId> |
229 | 256 | <artifactId>maven-gpg-plugin</artifactId> |
... | ... |
src/docker/Dockerfile
0 โ 100644
1 | +# Automatically generated Dockerfile | |
2 | +# - Build ${timestamp} | |
3 | +# - Lucene/Solr version ${currentDevelopmentVersion} | |
4 | +# - Mtas release ${currentDevelopmentRelease} | |
5 | +# | |
6 | + | |
7 | +FROM ubuntu:16.04 | |
8 | +MAINTAINER Matthijs Brouwer, Meertens Institute | |
9 | + | |
10 | +EXPOSE 8983 80 | |
11 | + | |
12 | +USER root | |
13 | + | |
14 | +WORKDIR "/root" | |
15 | + | |
16 | +RUN mkdir lib | |
17 | + | |
18 | +ADD https://github.com/meertensinstituut/mtas/releases/download/${currentDevelopmentRelease}/mtas-${currentDevelopmentVersion}.jar /root/lib/ | |
19 | + | |
20 | +RUN apt-get update && apt-get install -y locales lsof software-properties-common python-software-properties apache2 curl subversion && \ | |
21 | + locale-gen en_US.UTF-8 en_US && update-locale LANG=en_US.UTF-8 LANGUAGE=en_US:en | |
22 | + | |
23 | +RUN mathurl=$(curl -s 'http://www.apache.org/dyn/closer.lua/commons/math/binaries/commons-math3-3.6.1-bin.tar.gz' | grep -o '<strong>[^<]*</strong>' | sed 's/<[^>]*>//g' | head -1) && \ | |
24 | + if echo "$mathurl" | grep -q '^.*[^ ].*$'; then \ | |
25 | + curl -f -o /root/lib/commons-math3-3.6.1-bin.tar.gz -O $mathurl || true; \ | |
26 | + fi && \ | |
27 | + if [ ! -f /root/lib/commons-math3-3.6.1-bin.tar.gz ]; then \ | |
28 | + echo "Commons-math3 not found in mirror, falling back to apache archive"; \ | |
29 | + mathurl="http://archive.apache.org/dist/commons/math/binaries/commons-math3-3.6.1-bin.tar.gz"; \ | |
30 | + curl -f -o /root/lib/commons-math3-3.6.1-bin.tar.gz -O $mathurl; \ | |
31 | + fi && \ | |
32 | + tar xzf lib/commons-math3-3.6.1-bin.tar.gz -C lib commons-math3-3.6.1/commons-math3-3.6.1.jar --strip-components=1 && \ | |
33 | + rm lib/commons-math3-3.6.1-bin.tar.gz | |
34 | + | |
35 | +RUN svn export https://github.com/meertensinstituut/mtas/trunk/docker/ data | |
36 | + | |
37 | +RUN add-apt-repository -y ppa:webupd8team/java && \ | |
38 | + apt-get update && \ | |
39 | + echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && \ | |
40 | + apt-get install -y oracle-java8-installer && \ | |
41 | + rm -rf /var/lib/apt/lists/* | |
42 | + | |
43 | +RUN solrurl=$(curl -s 'http://www.apache.org/dyn/closer.lua/lucene/solr/${currentDevelopmentVersion}/solr-${currentDevelopmentVersion}.tgz' | grep -o '<strong>[^<]*</strong>' | sed 's/<[^>]*>//g' | head -1) && \ | |
44 | + if echo "$solrurl" | grep -q '^.*[^ ].*$'; then \ | |
45 | + curl -f -o /root/solr-${currentDevelopmentVersion}.tgz -O $solrurl || true; \ | |
46 | + fi && \ | |
47 | + if [ ! -f /root/solr-${currentDevelopmentVersion}.tgz ]; then \ | |
48 | + echo "Solr ${currentDevelopmentVersion} not found in mirror, falling back to apache archive"; \ | |
49 | + solrurl="http://archive.apache.org/dist/lucene/solr/${currentDevelopmentVersion}/solr-${currentDevelopmentVersion}.tgz"; \ | |
50 | + curl -f -o /root/solr-${currentDevelopmentVersion}.tgz -O $solrurl; \ | |
51 | + fi && \ | |
52 | + tar xzf solr-${currentDevelopmentVersion}.tgz solr-${currentDevelopmentVersion}/bin/install_solr_service.sh --strip-components=2 && \ | |
53 | + bash ./install_solr_service.sh solr-${currentDevelopmentVersion}.tgz && rm install_solr_service.sh && rm -rf solr-${currentDevelopmentVersion}.tgz | |
54 | + | |
55 | +RUN service apache2 stop && \ | |
56 | + echo "ServerName localhost" | tee /etc/apache2/conf-available/fqdn.conf && \ | |
57 | + a2enmod proxy && \ | |
58 | + a2enmod proxy_http && \ | |
59 | + a2enmod proxy_ajp && \ | |
60 | + a2enmod rewrite && \ | |
61 | + a2enmod deflate && \ | |
62 | + a2enmod headers && \ | |
63 | + a2enmod proxy_balancer && \ | |
64 | + a2enmod proxy_connect && \ | |
65 | + a2enmod proxy_html && \ | |
66 | + a2enmod xml2enc && \ | |
67 | + a2enconf fqdn && \ | |
68 | + sed -i '/<\/VirtualHost>/ i ProxyPass /solr http://localhost:8983/solr\nProxyPassReverse /solr http://localhost:8983/solr' /etc/apache2/sites-enabled/000-default.conf && \ | |
69 | + rm -rf /var/www/html/* && \ | |
70 | + mkdir /var/www/html/demo && \ | |
71 | + cp -rp data/*-samples /var/www/html/demo/ && \ | |
72 | + gunzip -r /var/www/html/demo && \ | |
73 | + cp -rp data/site/* /var/www/html && \ | |
74 | + chmod -R 755 /var/www/html && \ | |
75 | + printf "echo\n" >> /start.sh && \ | |
76 | + printf "echo \"================ Mtas -- Multi Tier Annotation Search =================\"\n" >> /start.sh && \ | |
77 | + printf "echo \" Timestamp ${timestamp}\"\n" >> /start.sh && \ | |
78 | + printf "echo \" Lucene/Solr version ${currentDevelopmentVersion}\"\n" >> /start.sh && \ | |
79 | + printf "echo \" Mtas release ${currentDevelopmentRelease}\"\n" >> /start.sh && \ | |
80 | + printf "echo \" See https://meertensinstituut.github.io/mtas/ for more information\"\n" >> /start.sh && \ | |
81 | + printf "echo \"=======================================================================\"\n" >> /start.sh && \ | |
82 | + printf "echo\n" >> /start.sh && \ | |
83 | + printf "service solr start\nservice apache2 start\n" >> /start.sh && \ | |
84 | + chmod 755 /start.sh && \ | |
85 | + mkdir demo1 && mkdir demo1/lib && mkdir demo1/conf && \ | |
86 | + echo "name=demo1" > demo1/core.properties && \ | |
87 | + cp lib/commons-math3-3.6.1.jar demo1/lib/ && \ | |
88 | + cp lib/mtas-${currentDevelopmentVersion}.jar demo1/lib/ && \ | |
89 | + cp data/solrconfig.xml demo1/conf/ && \ | |
90 | + cp data/schemaBasic.xml demo1/conf/schema.xml && \ | |
91 | + cp -r data/mtas demo1/conf/ && cp data/mtas.xml demo1/conf/ && \ | |
92 | + chmod -R 777 demo1 && \ | |
93 | + cp -rp demo1 demo2 && \ | |
94 | + cp data/schemaFull.xml demo2/conf/schema.xml && \ | |
95 | + echo "name=demo2" > demo2/core.properties && \ | |
96 | + cp -rp demo1 demo3 && \ | |
97 | + cp data/schemaFull.xml demo3/conf/schema.xml && \ | |
98 | + echo "name=demo3" > demo3/core.properties && \ | |
99 | + cp -rp demo1 demo4 && \ | |
100 | + cp data/schemaFull.xml demo4/conf/schema.xml && \ | |
101 | + echo "name=demo4" > demo4/core.properties && \ | |
102 | + mv demo1 /var/solr/data/ && \ | |
103 | + mv demo2 /var/solr/data/ && \ | |
104 | + mv demo3 /var/solr/data/ && \ | |
105 | + mv demo4 /var/solr/data/ | |
106 | + | |
107 | +CMD bash -C '/start.sh'; 'bash' | |
... | ... |
src/site/markdown/download.md.vm
... | ... | @@ -5,17 +5,17 @@ |
5 | 5 | <table> |
6 | 6 | <tbody> |
7 | 7 | <tr> |
8 | - <th>Version</th> | |
9 | - <th>Release</th> | |
8 | + <th>Lucene/Solr</th> | |
9 | + <th>Mtas Release</th> | |
10 | 10 | <th colspan='3'>Downloads</th> |
11 | 11 | <th>Description</th> |
12 | 12 | </tr> |
13 | 13 | <tr> |
14 | - <td>$context.get("currentDevelopmentVersion")</td> | |
15 | - <td>$context.get("currentDevelopmentRelease")</td> | |
16 | - <td><a href='https://github.com/meertensinstituut/mtas/releases/download/${currentDevelopmentRelease}/mtas-${currentDevelopmentVersion}.jar'>Binary (jar)</a></td> | |
17 | - <td><a href='https://github.com/meertensinstituut/mtas/archive/${currentDevelopmentRelease}.tar.gz'>Source (tgz)</a></td> | |
18 | - <td><a href='https://github.com/meertensinstituut/mtas/archive/${currentDevelopmentRelease}.zip'>Source (zip)</a></td> | |
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 | 19 | <td>Development version</td> |
20 | 20 | </tr> |
21 | 21 | </tbody> |
... | ... |
src/site/markdown/installation.md.vm
1 | 1 | #Getting started |
2 | 2 | |
3 | -Prebuilt jar libraries are available from the [download](download.html) page, current version is [${currentDevelopmentVersion}, release ${currentDevelopmentRelease}](https://github.com/meertensinstituut/mtas/releases/download/${currentDevelopmentRelease}/mtas-${currentDevelopmentVersion}.jar) (development) | |
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) | |
4 | 4 | |
5 | 5 | **Build from Source with Maven** |
6 | 6 | |
... | ... | @@ -27,4 +27,4 @@ Mtas can be used as plugin for [Apache Solr](https://lucene.apache.org/solr/) or |
27 | 27 | |
28 | 28 | or see [Mtas and Docker](installation_docker.html) to get a quick demonstration. |
29 | 29 | |
30 | -Versioning follows the required version of both Solr and Lucene, the latest available version is ${currentDevelopmentVersion}. | |
30 | +Versioning follows the required version of both Solr and Lucene, the latest available version is ${context.get("latestReleaseLuceneVersion")}. | |
... | ... |
src/site/markdown/installation_solr.md.vm
... | ... | @@ -5,14 +5,14 @@ Mtas can be used as plugin for Apache Solr |
5 | 5 | **Prerequisites** |
6 | 6 | |
7 | 7 | - Installed [Apache Solr](https://lucene.apache.org/solr/) |
8 | -- Currently supported and advised version is ${currentDevelopmentVersion} | |
8 | +- Currently supported and advised version is $context.get("latestReleaseLuceneVersion") | |
9 | 9 | |
10 | 10 | Start with a new Solr core. |
11 | 11 | |
12 | 12 | **Libraries** |
13 | 13 | |
14 | -Add the `mtas-${currentDevelopmentVersion}.jar` to the `lib` directory of the new Solr core. | |
15 | -A prebuilt `mtas-${currentDevelopmentVersion}.jar` is available from the [download](download.html) page. | |
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. | |
16 | 16 | |
17 | 17 | Furthermore, add the [Apache Commons Mathematics Library](http://commons.apache.org/proper/commons-math/) to the `lib` directory of the new Solr core. |
18 | 18 | |
... | ... |