You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2020/02/11 13:56:10 UTC

[plc4x] branch develop updated: - Fixed a display problem on the release-documentation pages. - Updated the build to now use the auto-included maven properties in the generated site.

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

cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git


The following commit(s) were added to refs/heads/develop by this push:
     new aad1829  - Fixed a display problem on the release-documentation pages. - Updated the build to now use the auto-included maven properties in the generated site.
aad1829 is described below

commit aad18290ef4a920548d01338a5e8a4fca70c2488
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Tue Feb 11 14:55:59 2020 +0100

    - Fixed a display problem on the release-documentation pages.
    - Updated the build to now use the auto-included maven properties in the generated site.
---
 pom.xml                                            | 54 ++++++++++++++--------
 .../asciidoc/developers/release-build-tools.adoc   |  1 -
 src/site/asciidoc/developers/release.adoc          | 10 +++-
 src/site/asciidoc/developers/website.adoc          | 21 ---------
 4 files changed, 44 insertions(+), 42 deletions(-)

diff --git a/pom.xml b/pom.xml
index f0cd134..fb5f703 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
   <parent>
     <groupId>org.apache</groupId>
     <artifactId>apache</artifactId>
-    <version>22</version>
+    <version>23</version>
   </parent>
 
   <groupId>org.apache.plc4x</groupId>
@@ -844,7 +844,7 @@
       </plugin>
 
       <!-- Write all the properties into a file so we can access them from asciidoctor -->
-      <plugin>
+      <!--plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>properties-maven-plugin</artifactId>
         <executions>
@@ -858,7 +858,7 @@
             </configuration>
           </execution>
         </executions>
-      </plugin>
+      </plugin-->
 
       <!-- Check if all source files have the required apache license headers -->
       <plugin>
@@ -1015,6 +1015,38 @@
       </plugin>
 
       <!--
+        Convert the pom.adoc file from a java property file into an asciidoctor property file.
+      -->
+      <!--plugin>
+        <groupId>com.google.code.maven-replacer-plugin</groupId>
+        <artifactId>replacer</artifactId>
+        <executions>
+          <execution>
+            <id>convert-property-to-adoc</id>
+            <!- Only execute this for the parent module ->
+            <inherited>false</inherited>
+            <phase>pre-site</phase>
+            <goals>
+              <goal>replace</goal>
+            </goals>
+            <configuration>
+              <file>${project.build.directory}/pom.adoc</file>
+              <replacements>
+                <replacement>
+                  <token>(.*)=(.*)</token>
+                  <value>\:$1\: $2</value>
+                </replacement>
+                <replacement>
+                  <token>#(.*)</token>
+                  <value>// $1</value>
+                </replacement>
+              </replacements>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin-->
+
+      <!--
         Make the maven-site-plugin stage the output in the "asf-site" branch
       -->
       <plugin>
@@ -1177,20 +1209,6 @@
           </configuration>
         </plugin>
 
-        <!-- TODO: This is only required till the release of apache-parent 23 and can be removed after updating to that -->
-        <plugin>
-          <groupId>org.apache.maven.plugins</groupId>
-          <artifactId>maven-scm-publish-plugin</artifactId>
-          <version>3.0.0</version>
-          <dependencies>
-            <dependency>
-              <groupId>org.apache.maven.scm</groupId>
-              <artifactId>maven-scm-provider-gitexe</artifactId>
-              <version>1.10.0</version>
-            </dependency>
-          </dependencies>
-        </plugin>
-
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-shade-plugin</artifactId>
@@ -1240,7 +1258,7 @@
               <attributes>
                 <source-highlighter>prettify</source-highlighter>
                 <imagesoutdir>${project.build.directory}/site/images</imagesoutdir>
-                <pom-adoc>${project.build.directory}/pom.adoc</pom-adoc>
+                <!--pom-adoc>${project.build.directory}/pom.adoc</pom-adoc-->
               </attributes>
               <requires>
                 <require>asciidoctor-diagram</require>
diff --git a/src/site/asciidoc/developers/release-build-tools.adoc b/src/site/asciidoc/developers/release-build-tools.adoc
index fe6a6d6..110d420 100644
--- a/src/site/asciidoc/developers/release-build-tools.adoc
+++ b/src/site/asciidoc/developers/release-build-tools.adoc
@@ -14,7 +14,6 @@
 //  See the License for the specific language governing permissions and
 //  limitations under the License.
 //
-include::{pom-adoc}[]
 :imagesdir: ../images/
 :icons: font
 
diff --git a/src/site/asciidoc/developers/release.adoc b/src/site/asciidoc/developers/release.adoc
index 379a248..44c0a3c 100644
--- a/src/site/asciidoc/developers/release.adoc
+++ b/src/site/asciidoc/developers/release.adoc
@@ -14,7 +14,6 @@
 //  See the License for the specific language governing permissions and
 //  limitations under the License.
 //
-include::{pom-adoc}[]
 :imagesdir: ../images/
 :icons: font
 
@@ -102,13 +101,16 @@ This can and should be automated by the `maven-release-plugin`.
 Per default the plugin will ask for the working copy version during the build execution.
 This is the version the `develop` branch will be changed to.
 
+In contrast to normal builds, it is important to enable all profiles when creating the branch as only this way will all modules versions be updated.
+Otherwise the non-default modules on develop will reference the old version which will cause problems when building.
+
 The parameter `autoVersionSubmodules` will tell the release plugin to release all modules with the same version.
 Otherwise we would have to define the working copy version for each module.
 
    mvn release:branch -P with-sandbox,with-cpp,with-boost,with-dotnet,with-python,with-proxies,with-logstash -DbranchName=rel/{minor-version} -DautoVersionSubmodules=true
 
 Per default the plugin suggests the next bugfix version as working version, however we want it to use the next minor version.
-So in case of preparing the release branch for `0.6.0-SNAPSHOT` the command would be the following:
+So in case of preparing the release branch for `{current-full-version}-SNAPSHOT` the command would be the following:
 
 [subs="verbatim,attributes"]
 ----
@@ -167,6 +169,10 @@ Changes should either be re applied in `develop` or `cherry-picked`, however mer
 
 === Preparing a release
 
+Same as with creating the branch it is important to enable all profiles when creating the branch as only this way will all modules versions be updated.
+Otherwise the non-default modules on develop will reference the old version which will cause problems when building.
+For people building with some of the additional profiles from the source release will be impossible.
+
 As especially when switching a lot between different branches, it is recommended to do a clean checkout of the repository.
 Otherwise a lot of directories can be left over, which would be included in the source-release zip.
 In order to prepare a release-candidate, the first step is switching to the corresponding release-branch.
diff --git a/src/site/asciidoc/developers/website.adoc b/src/site/asciidoc/developers/website.adoc
index a73a4fe..5f2d667 100644
--- a/src/site/asciidoc/developers/website.adoc
+++ b/src/site/asciidoc/developers/website.adoc
@@ -175,24 +175,3 @@ Only on these machines are jobs allowed to push changes to a Git repo and here o
 See https://builds.apache.org/view/M-R/job/PLC4X/job/PLC4X%20Site/ for details on the PLC4X Jenkins Website build job.
 
 As soon as content is updated in the `asf-site` the `gitpubsub` mechanism will make those changes available at https://plc4x.apache.org
-
-== Bells and Whistles
-
-=== Making all pom properties available to asciidoctor
-
-While trying to automate keeping the content of the release documentation up-to-date, we added a groovy script to automatically calculate some version numbers.
-Unfortunately it wasn't possible to use these in asciidoctor using the normal `attributes` as the values aren't set as soon as Maven configures the plugin.
-
-We came up with an option to still achieve this:
-
-* The `groovy-maven-plugin` sets the dynamic properties in the `provide-custom-properties` execution.
-* Then we use the `properties-maven-plugin` to write all maven properties into a property file `target/pom.adoc`.
-* As Asciidoctor doesn't understand property files, we use the `replacer` to convert the content into an Asciidoctor property file in the `convert-property-to-adoc` execution.
-* Now we provide access to the location of this file by setting the `pom-adoc` attribute.
-* If we now need to access the properties, all we need to do, is to import the `pom.adoc` file with the following statement:
-
-   include::{pom-adoc}[]
-
-* After this all maven properties can be accessed via:
-
-   We are currently working on releasing ApachePLC4X {current-full-version}