This is an automated email from the ASF dual-hosted git repository.

shuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/unomi-site.git


The following commit(s) were added to refs/heads/master by this push:
     new 303885d  Make it possible to filter the HTML with Maven properties
303885d is described below

commit 303885d8896ec21367b761f085eafd2caa456327
Author: Serge Huber <[email protected]>
AuthorDate: Mon May 18 18:05:56 2020 +0200

    Make it possible to filter the HTML with Maven properties
---
 README.md                                     |  5 ++
 pom.xml                                       | 41 ++++++++++++-
 src/main/webapp/contribute-release-guide.html | 84 +++++++++++++--------------
 src/main/webapp/documentation.html            |  2 +-
 src/main/webapp/download.html                 |  2 +-
 5 files changed, 89 insertions(+), 45 deletions(-)

diff --git a/README.md b/README.md
index f75b63f..9b71448 100644
--- a/README.md
+++ b/README.md
@@ -20,6 +20,8 @@ Run Build:
 mvn clean install
 ```
 
+The generated site will be in target/generated-jekyll
+
 ## Publish
 
 To publish the local website to the production location 
(https://unomi.apache.org/), you have to use:
@@ -40,6 +42,9 @@ mvn install
 mvn gem:exec@jekyll-serve
 `
 
+Note: the Jekyll serve will not filter the files so you will still see 
property references such as ${latest.stable.version}.
+This is by design. If you want to see a final version you need to generate it 
using the `mvn clean install` command.
+
 It works as expected on Mac and Linux, but not on Windows the following 
stacktrace appears:
     
     [INFO] Configuration file: 
c:\Users\username\projects\jekyll-jruby-maven/src/main/webapp/_config.yml
diff --git a/pom.xml b/pom.xml
index 37bc49d..71b3c1e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -45,6 +45,11 @@
         </repository>
     </repositories>
 
+    <properties>
+        <latest.stable.version>1.5.1</latest.stable.version>
+        <latest.development.version>2.0.0-SNAPSHOT</latest.development.version>
+    </properties>
+
 
     <dependencies>
         <dependency>
@@ -171,6 +176,40 @@
     <build>
         <plugins>
             <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>filter-webapp-files</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            <resources>
+                                <!-- # Filtered Resources -->
+                                <resource>
+                                    
<directory>${project.basedir}/src/main/webapp</directory>
+                                    <filtering>true</filtering>
+                                    <includes>
+                                        <include>**/*.html</include>
+                                    </includes>
+                                </resource>
+                                <!-- # Unfiltered Resources -->
+                                <resource>
+                                    
<directory>${project.basedir}/src/main/webapp</directory>
+                                    <filtering>false</filtering>
+                                    <excludes>
+                                        <exclude>**/*.html</exclude>
+                                    </excludes>
+                                </resource>
+                            </resources>
+                            
<outputDirectory>${project.build.directory}/filtered-webapp</outputDirectory>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
                 <groupId>de.saumya.mojo</groupId>
                 <artifactId>gem-maven-plugin</artifactId>
                 <version>1.1.5</version>
@@ -183,7 +222,7 @@
                         <phase>generate-resources</phase>
                         <configuration>
                             
<file>${project.build.directory}/rubygems/bin/jekyll</file>
-                            <execArgs>build --trace --source 
${project.basedir}/src/main/webapp --destination
+                            <execArgs>build --trace --source 
${project.build.directory}/filtered-webapp --destination
                                 ${project.build.directory}/generated-jekyll
                             </execArgs>
                         </configuration>
diff --git a/src/main/webapp/contribute-release-guide.html 
b/src/main/webapp/contribute-release-guide.html
index a2aef69..e599933 100644
--- a/src/main/webapp/contribute-release-guide.html
+++ b/src/main/webapp/contribute-release-guide.html
@@ -139,7 +139,7 @@ gpg --verify test.txt.asc test.txt
                 <pre class="alert alert-primary"><code>mvn clean install 
-DskipITs=true -DskipTests=true -P 
integration-tests,performance-tests,rat,apache-release,docker,\!run-tests</code></pre>
               </li>
               <li>Check that there are no JARs or ZIP files in the source 
code, you can do this by looking at the generated RAT report here :
-                <pre class="alert alert-primary"><code>less 
target/unomi-root-1.5.1-SNAPSHOT.rat</code></pre>
+                <pre class="alert alert-primary"><code>less 
target/unomi-root-${latest.development.version}.rat</code></pre>
               </li>
               <li>Check that the KEYS file only contains signatures with 
@apache.org addresses (if there are non @apache.org don’t remove them because 
they have
                 been used to sign older releases)
@@ -165,11 +165,11 @@ gpg: signing failed: Inappropriate ioctl for 
device</code></pre>
               </li>
               <li>Check into the target directory and unzip the source release 
and compile it using:
                 <pre class="alert alert-primary"><code>cd target
-gpg --verify unomi-root-1.5.1-SNAPSHOT-source-release.zip.asc 
unomi-root-1.5.1-SNAPSHOT-source-release.zip
-shasum -a 512 unomi-root-1.5.1-SNAPSHOT-source-release.zip
-cat unomi-root-1.5.1-SNAPSHOT-source-release.zip.sha512
-unzip unomi-root-1.5.1-SNAPSHOT-source-release.zip
-cd unomi-root-1.5.1-SNAPSHOT
+gpg --verify unomi-root-${latest.development.version}-source-release.zip.asc 
unomi-root-${latest.development.version}-source-release.zip
+shasum -a 512 unomi-root-${latest.development.version}-source-release.zip
+cat unomi-root-${latest.development.version}-source-release.zip.sha512
+unzip unomi-root-${latest.development.version}-source-release.zip
+cd unomi-root-${latest.development.version}
 mvn clean install</code></pre>
                 to check that the packaged source build properly
               </li>
@@ -191,7 +191,7 @@ mvn clean install</code></pre>
               <li>If something fails, make sure you first drop the staging 
repository created here: <a 
href="https://repository.apache.org/#stagingRepositories"; 
target="_blank">https://repository.apache.org/#stagingRepositories</a>.<br>
 If you need to relaunch the <code>release:perform</code> and don’t have a 
release.properties, create a <code>release.properties</code> file with the 
following contents:
                 <pre class="alert 
alert-primary"><code>scm.url=scm:git:https://gitbox.apache.org/repos/asf?p=unomi.git
-scm.tag=unomi-root-1.5.1
+scm.tag=unomi-root-${latest.stable.version}
 and run mvn release:perform</code></pre>
               </li>
               <li>Make sure you uploaded your public PGP key using:
@@ -199,7 +199,7 @@ and run mvn release:perform</code></pre>
               </li>
               <li>Connect to <a 
href="https://repository.apache.org/#stagingRepositories"; 
target="_blank">https://repository.apache
                   .org/#stagingRepositories</a> and look for the open staging 
repositories, you should have two (one for everything and the other for 
KAR/features) for releases &lt;= 1.2 and just one for versions &gt;= 1.3.0 
(because of changes in the Karaf plugins). Close the repositories and given a 
meaningful comment when closing such as:<br>
-                <strong>Apache Unomi 1.5.1 Release Candidate 1</strong>
+                <strong>Apache Unomi ${latest.stable.version} Release 
Candidate 1</strong>
               </li>
             </ol>
 
@@ -210,48 +210,48 @@ and run mvn release:perform</code></pre>
               </li>
               <li>
                 <pre class="alert alert-primary"><code>cd unomi-dev
-mkdir 1.5.1</code></pre>
+mkdir ${latest.stable.version}</code></pre>
               </li>
               <li>
                 Copy all the Zip and Tarbars including ASC (but do not copy 
the SHA1 or MD5 sum) files from:
-                <a 
href="https://repository.apache.org/content/repositories/orgapacheunomi-1014/org/apache/unomi/unomi/1.5.1/";
 
target="_blank">https://repository.apache.org/content/repositories/orgapacheunomi-1014/org/apache/unomi/unomi/1.5.1/</a>
+                <a 
href="https://repository.apache.org/content/repositories/orgapacheunomi-1014/org/apache/unomi/unomi/${latest.stable.version}/";
 
target="_blank">https://repository.apache.org/content/repositories/orgapacheunomi-1014/org/apache/unomi/unomi/${latest.stable.version}/</a>
                 and
-                <a 
href="https://repository.apache.org/content/repositories/orgapacheunomi-1014/org/apache/unomi/unomi-root/1.5.1/";
 
target="_blank">https://repository.apache.org/content/repositories/orgapacheunomi-1014/org/apache/unomi/unomi-root/1.5.1/</a>
+                <a 
href="https://repository.apache.org/content/repositories/orgapacheunomi-1014/org/apache/unomi/unomi-root/${latest.stable.version}/";
 
target="_blank">https://repository.apache.org/content/repositories/orgapacheunomi-1014/org/apache/unomi/unomi-root/${latest.stable.version}/</a>
               </li>
               <li>
                 Rename the source and binary files to something shorter and 
consistent with previous releases and generate
                   the SHA 512 checksum manually:
                 <pre class="alert alert-primary"><code>
-mv unomi-root-1.5.1-source-release.zip unomi-1.5.1-src.zip
-mv unomi-root-1.5.1-source-release.zip.asc unomi-1.5.1-src.zip.asc
-shasum -a 512 unomi-1.5.1-src.zip > unomi-1.5.1-src.zip.sha512
+mv unomi-root-${latest.stable.version}-source-release.zip 
unomi-${latest.stable.version}-src.zip
+mv unomi-root-${latest.stable.version}-source-release.zip.asc 
unomi-${latest.stable.version}-src.zip.asc
+shasum -a 512 unomi-${latest.stable.version}-src.zip > 
unomi-${latest.stable.version}-src.zip.sha512
 
-mv unomi-1.5.1.zip unomi-1.5.1-bin.zip
-mv unomi-1.5.1.zip.asc unomi-1.5.1-bin.zip.asc
-shasum -a 512 unomi-1.5.1-bin.zip > unomi-1.5.1-bin.zip.sha512
+mv unomi-${latest.stable.version}.zip unomi-${latest.stable.version}-bin.zip
+mv unomi-${latest.stable.version}.zip.asc 
unomi-${latest.stable.version}-bin.zip.asc
+shasum -a 512 unomi-${latest.stable.version}-bin.zip > 
unomi-${latest.stable.version}-bin.zip.sha512
 
-mv unomi-1.5.1.tar.gz unomi-1.5.1-bin.tar.gz
-mv unomi-1.5.1.tar.gz.asc unomi-1.5.1-bin.tar.gz.asc
-shasum -a 512 unomi-1.5.1-bin.tar.gz > unomi-1.5.1-bin.tar.gz.sha512
+mv unomi-${latest.stable.version}.tar.gz 
unomi-${latest.stable.version}-bin.tar.gz
+mv unomi-${latest.stable.version}.tar.gz.asc 
unomi-${latest.stable.version}-bin.tar.gz.asc
+shasum -a 512 unomi-${latest.stable.version}-bin.tar.gz > 
unomi-${latest.stable.version}-bin.tar.gz.sha512
                 </code></pre>
               </li>
               <li>
                 <pre class="alert alert-primary"><code>cd ..
-svn add 1.5.1</code></pre>
+svn add ${latest.stable.version}</code></pre>
               </li>
               <li>
                 If needed, update the KEYS file (that is in the svn checkout 
<code>https://dist.apache.org/repos/dist/release/unomi</code>)
               </li>
               <li>
-                <pre class="alert alert-primary"><code>svn commit -m "Apache 
1.5.1 Release (for PMC voting)"</code></pre>
+                <pre class="alert alert-primary"><code>svn commit -m "Apache 
${latest.stable.version} Release (for PMC voting)"</code></pre>
               </li>
                 <li>Send out to the Unomi mailing list a mail to start the 
voting process, see <a href="#mail-1">[1]</a></li>
                 <li>If the vote is refused or cancelled, peform the following 
steps to restart the release process:
                     <ol>
                         <li>Drop the release in <a 
href="https://repository.apache.org/#stagingRepositories"; 
target="_blank">Nexus</a></li>
                         <li>Remove the tag in Git:
-                            <pre class="alert alert-primary"><code>git push 
--delete origin unomi-root-1.5.1
-git tag -d unomi-root-1.5.1</code></pre>
+                            <pre class="alert alert-primary"><code>git push 
--delete origin unomi-root-${latest.stable.version}
+git tag -d unomi-root-${latest.stable.version}</code></pre>
                         </li>
                         <li>Correct any problems in the source, make sure to 
do them in master and cherry-pick them to the relevant branches</li>
                         <li>Reset all versions with the following command:
@@ -274,9 +274,9 @@ git tag -d unomi-root-1.5.1</code></pre>
             <ol>
               <li>
                 Move the files uploaded to the unomi-dev repository to the 
unomi-release repository by doing the following:
-                <pre class="alert alert-primary"><code>svn mv 
https://dist.apache.org/repos/dist/dev/unomi/1.5.1
-https://dist.apache.org/repos/dist/release/unomi/1.5.1
--m "Apache Unomi 1.5.1 Release"</code></pre>
+                <pre class="alert alert-primary"><code>svn mv 
https://dist.apache.org/repos/dist/dev/unomi/${latest.stable.version}
+https://dist.apache.org/repos/dist/release/unomi/${latest.stable.version}
+-m "Apache Unomi ${latest.stable.version} Release"</code></pre>
               </li>
               <li>
                 Update Jenkins
@@ -306,8 +306,8 @@ https://dist.apache.org/repos/dist/release/unomi/1.5.1
             <h3 id="rollback">Rollback</h3>
             <ol>
               <li>Delete the tag:
-                <pre class="alert alert-primary"><code>git push --delete 
origin unomi-root-1.5.1
-git tag --delete unomi-root-1.5.1</code></pre>
+                <pre class="alert alert-primary"><code>git push --delete 
origin unomi-root-${latest.stable.version}
+git tag --delete unomi-root-${latest.stable.version}</code></pre>
               </li>
               <li>Reset to the previous commit before the release preparation:
                 <pre class="alert alert-primary"><code>git reset --hard 
c65f9897ec5f31d9d22ad639738c7db9d109aa77
@@ -350,11 +350,11 @@ git push origin -f</code></pre>
 
             <h6 id="mail-1" class="pt-3">[1] Mail template for the Unomi PMC 
vote:</h6>
             <pre class="alert alert-primary"><code>
-Subject: [VOTE] Apache Unomi 1.5.1 release [TAKE2]
+Subject: [VOTE] Apache Unomi ${latest.stable.version} release [TAKE2]
 Body:
 Hi all,
 
-I submit Apache Unomi 1.5.1 release [TAKE2] to your vote.
+I submit Apache Unomi ${latest.stable.version} release [TAKE2] to your vote.
 
 The following corrections were done since TAKE 1:
 NOTICE year (2016) has been updated to 2018
@@ -368,18 +368,18 @@ Staging Repository:
 You can find the sources here :
 
 
*https://repository.apache.org/content/repositories/orgapacheunomi-1021/org/apache/
-unomi/unomi-root/1.5.1/unomi-root-1.5.1-source-release.zip
+unomi/unomi-root/${latest.stable.version}/unomi-root-${latest.stable.version}-source-release.zip
 
&lt;https://repository.apache.org/content/repositories/orgapacheunomi-1021/org/apache/
-unomi/unomi-root/1.5.1/unomi-root-1.5.1-source-release.zip&gt;*
+unomi/unomi-root/${latest.stable.version}/unomi-root-${latest.stable.version}-source-release.zip&gt;*
 
 Convenience binaries are also available here:
 
*https://repository.apache.org/content/repositories/orgapacheunomi-1021/org/apache/
-unomi/unomi/1.5.1/
+unomi/unomi/${latest.stable.version}/
 
&lt;https://repository.apache.org/content/repositories/orgapacheunomi-1021/org/apache/
-unomi/unomi/1.5.1/&gt;*
+unomi/unomi/${latest.stable.version}/&gt;*
 
 Git tag:
-unomi-root-1.5.1
+unomi-root-${latest.stable.version}
 
 Release Notes:
 https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12319220&;
@@ -401,7 +401,7 @@ Regards
 
             <h6 id="mail-2" class="pt-3">[2] Mail template for the results of 
the Unomi PMC vote:</h6>
             <pre class="alert alert-primary"><code>
-Subject: [RESULT][VOTE] Apache Unomi 1.5.1 release [TAKE2]
+Subject: [RESULT][VOTE] Apache Unomi ${latest.stable.version} release [TAKE2]
 Body:
 Hi,
 
@@ -421,7 +421,7 @@ John Doe 5
 
 No 0 or -1.
 
-The proposal to release Unomi 1.5.1 is approved by the team.
+The proposal to release Unomi ${latest.stable.version} is approved by the team.
 
 Thanks,
 John Doe 1
@@ -429,10 +429,10 @@ John Doe 1
 
             <h6 id="mail-3" class="pt-3">[3] Announce mailing list 
template:</h6>
             <pre class="alert alert-primary"><code>
-Subject : [ANNOUNCE] Apache Unomi 1.5.1 Release
+Subject : [ANNOUNCE] Apache Unomi ${latest.stable.version} Release
 Body:
 The Apache Unomi team would like to announce the release of Apache
-Unomi 1.5.1.
+Unomi ${latest.stable.version}.
 
 Release notes are here:
 https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12319220&;
@@ -446,10 +446,10 @@ More details regarding Apache Unomi can be found here:
 http://unomi.apache.org/
 
 The release artifacts can be downloaded here:
-https://dist.apache.org/repos/dist/release/incubator/unomi/1.5.1/
+https://dist.apache.org/repos/dist/release/incubator/unomi/${latest.stable.version}/
 
 All JIRAs completed for this release are tagged with 'FixVersion =
-1.5.1'; the JIRA release notes can be found here:
+${latest.stable.version}'; the JIRA release notes can be found here:
 https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12319220&;
 version=12338361
 
diff --git a/src/main/webapp/documentation.html 
b/src/main/webapp/documentation.html
index 1f6c4a2..fa35856 100644
--- a/src/main/webapp/documentation.html
+++ b/src/main/webapp/documentation.html
@@ -32,7 +32,7 @@ layout: default
           <div class="card flex-md-row mb-4 box-shadow h-md-250">
             <div class="card-body d-flex flex-column align-items-start">
               <strong class="d-inline-block mb-2 text-warning"><i class="fas 
fa-circle"></i> Unstable</strong>
-              <h3 class="mb-0 text-dark">Unomi <span 
class="text-muted">2.0.0-SNAPSHOT</span></h3>
+              <h3 class="mb-0 text-dark">Unomi <span 
class="text-muted">${latest.development.version}</span></h3>
               <div class="mb-1 text-muted">In development</div>
               <p class="card-text">
                 <a href="manual/latest/index.html">online</a><br>
diff --git a/src/main/webapp/download.html b/src/main/webapp/download.html
index 9ba924a..fca8416 100644
--- a/src/main/webapp/download.html
+++ b/src/main/webapp/download.html
@@ -60,7 +60,7 @@ layout: default
                 </code>
                 <br>
                 <code>
-                    % gpg --verify unomi-1.5.1-bin.tar.gz.asc 
unomi-1.5.1-bin.tar.gz
+                    % gpg --verify 
unomi-${latest.stable.version}-bin.tar.gz.asc 
unomi-${latest.stable.version}-bin.tar.gz
                 </code>
               </p>
             </div>

Reply via email to