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 2019/05/22 11:49:20 UTC

[plc4x] branch develop updated (90b6f4f -> 27f8815)

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

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


    from 90b6f4f  Mad sure the thrift generation is executed after the unpacking.
     new 485f7d6  Added Björn to the pmc rdf
     new 27f8815  PLC4X-126 - Make the asciidoctor generated site reference the dynamic properties

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 pom.xml                                            | 52 +++++++++++++++++++---
 src/site/asciidoc/developers/release.adoc          | 16 +++++--
 .../plc4x-doap.rdf                                 | 30 +++++++------
 src/site/resources/plc4x-pmc.rdf                   |  5 +++
 4 files changed, 80 insertions(+), 23 deletions(-)
 rename src/site/{resources => resources-filtered}/plc4x-doap.rdf (81%)


[plc4x] 01/02: Added Björn to the pmc rdf

Posted by cd...@apache.org.
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

commit 485f7d646b27a905f0c0f79e664086d763a61cba
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Wed May 22 13:43:04 2019 +0200

    Added Björn to the pmc rdf
---
 src/site/resources/plc4x-pmc.rdf | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/site/resources/plc4x-pmc.rdf b/src/site/resources/plc4x-pmc.rdf
index ff18ef1..3988eff 100644
--- a/src/site/resources/plc4x-pmc.rdf
+++ b/src/site/resources/plc4x-pmc.rdf
@@ -42,6 +42,11 @@
 
         <asfext:member>
             <foaf:Person>
+                <foaf:name>Björn Höper</foaf:name>
+            </foaf:Person>
+        </asfext:member>
+        <asfext:member>
+            <foaf:Person>
                 <foaf:name>Christofer Dutz</foaf:name>
             </foaf:Person>
         </asfext:member>


[plc4x] 02/02: PLC4X-126 - Make the asciidoctor generated site reference the dynamic properties

Posted by cd...@apache.org.
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

commit 27f8815ce6ac5e243fd06949c19e23f8406cd42a
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Wed May 22 13:49:13 2019 +0200

    PLC4X-126 - Make the asciidoctor generated site reference the dynamic properties
    
    - Added the groovy-maven-plugin to do the version calculation and injection.
    - Used the dynamic property in resources filtered by the default maven-resource-plugin.
---
 pom.xml                                            | 52 +++++++++++++++++++---
 src/site/asciidoc/developers/release.adoc          | 16 +++++--
 .../plc4x-doap.rdf                                 | 30 +++++++------
 3 files changed, 75 insertions(+), 23 deletions(-)

diff --git a/pom.xml b/pom.xml
index 5521ce2..de575c8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -659,23 +659,55 @@
 
   <build>
     <plugins>
-      <!--plugin>
+      <!-- Make some additional properties available to simplify keeping some content up to date -->
+      <plugin>
         <groupId>org.codehaus.gmaven</groupId>
         <artifactId>groovy-maven-plugin</artifactId>
         <version>2.1</version>
-        <inherited>false</inherited>
         <executions>
           <execution>
-            <phase>validate</phase>
+            <id>provide-custom-properties</id>
+            <phase>pre-site</phase>
             <goals>
               <goal>execute</goal>
             </goals>
             <configuration>
-              <source>${project.basedir}/src/main/script/prerequisite-check.groovy</source>
+              <source>
+                print "\nCalculating some additional properties:"
+                // Get the current year
+                def currentYear = Calendar.getInstance().get(Calendar.YEAR) as String
+                print "\nCurrent year:                     " + currentYear
+                project.properties['current-year'] = currentYear
+
+                // Calculate some version related stuff
+                def currentVersion = project.version as String
+                def match = (currentVersion =~ /(\d+)\.(\d+)\.(\d+)(-SNAPSHOT)?/)
+                print "\nCurrent version:                  " + currentVersion
+                if(match.count >= 1) {
+                  def majorVersion = match[0][1] as Integer
+                  def minorVersion = match[0][2] as Integer
+                  def bugfixVersion = match[0][3] as Integer
+
+                  def currentFullVersion = majorVersion + "." + minorVersion + "." + bugfixVersion
+                  def currentShortVersion = majorVersion + "." + minorVersion
+                  def currentNextIncrementalVersion = majorVersion + "." + minorVersion + "." + (bugfixVersion + 1)
+                  def currentNextMinorVersion = majorVersion + "." + (minorVersion + 1) + ".0"
+
+                  print "\nCurrent full version:             " + currentFullVersion + " (current-full-version)"
+                  project.properties['current-full-version'] = currentFullVersion
+                  print "\nCurrent short version:            " + currentShortVersion + "   (current-short-version)"
+                  project.properties['current-short-version'] = currentShortVersion
+                  print "\nCurrent next incremental version: " + currentNextIncrementalVersion + " (current-next-incremental-version)"
+                  project.properties['current-next-incremental-version'] = currentNextIncrementalVersion
+                  print "\nCurrent next minor version:       " + currentNextMinorVersion + " (current-next-minor-version)"
+                  project.properties['current-next-minor-version'] = currentNextMinorVersion
+                }
+                print "\n"
+              </source>
             </configuration>
           </execution>
         </executions>
-      </plugin-->
+      </plugin>
 
       <!-- Check if all source files have the required apache license headers -->
       <plugin>
@@ -871,6 +903,11 @@
                   </directory>
                   <targetPath>${project.build.directory}/site/fonts</targetPath>
                 </resource>
+                <resource>
+                  <directory>${project.basedir}/src/site/resources-filtered</directory>
+                  <filtering>true</filtering>
+                  <targetPath>${project.build.directory}/site</targetPath>
+                </resource>
               </resources>
             </configuration>
           </execution>
@@ -1017,6 +1054,11 @@
                 <source-highlighter>prettify</source-highlighter>
                 <imagesoutdir>${project.build.directory}/site/images</imagesoutdir>
                 <project-version>${project.version}</project-version>
+                <current-year>@{current-year}</current-year>
+                <current-full-version>@{current-full-version}</current-full-version>
+                <current-short-version>@{current-short-version}</current-short-version>
+                <current-next-incremental-version>@{current-next-incremental-version}</current-next-incremental-version>
+                <current-next-minor-version>@{current-next-minor-version}</current-next-minor-version>
               </attributes>
               <requires>
                 <require>asciidoctor-diagram</require>
diff --git a/src/site/asciidoc/developers/release.adoc b/src/site/asciidoc/developers/release.adoc
index eec5f3b..778eab0 100644
--- a/src/site/asciidoc/developers/release.adoc
+++ b/src/site/asciidoc/developers/release.adoc
@@ -90,7 +90,7 @@ According to SemVer, we have: Major, Minor and Bugfix releases.
 
 For each new Major and Minor release we create a new branch at the beginning of a code-freeze phase.
 
-So if currently the project version in develop is `0.2.0-SNAPSHOT`, we create a branch `rel/0.2`.
+So if currently the project version in develop is `0.5.0-SNAPSHOT`, we create a branch `rel/0.5`.
 
 When creating the branch is exactly the moment in which the version in `develop` is incremented to the next minor version.
 
@@ -105,13 +105,13 @@ Otherwise we would have to define the working copy version for each module.
    mvn release:branch -P with-cpp,with-dotnet,with-java,with-proxies,with-python,with-sandbox -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.4.0-SNAPSHOT` the command would be the following:
+So in case of preparing the release branch for `0.5.0-SNAPSHOT` the command would be the following:
 
-   mvn release:branch -P with-cpp,with-dotnet,with-java,with-proxies,with-python,with-sandbox -DbranchName=rel/0.4 -DautoVersionSubmodules=true
+   mvn release:branch -P with-cpp,with-dotnet,with-java,with-proxies,with-python,with-sandbox -DbranchName=rel/0.5 -DautoVersionSubmodules=true
 
 The plugin will then aks for the version:
 
-   What is the new working copy version for "PLC4X"? (org.apache.plc4x:plc4x-parent) 0.4.1-SNAPSHOT: : 0.5.0-SNAPSHOT
+   What is the new working copy version for "PLC4X"? (org.apache.plc4x:plc4x-parent) 0.5.1-SNAPSHOT: : 0.6.0-SNAPSHOT
 
 Where the suggested default is manually overridden.
 
@@ -174,6 +174,14 @@ In general the plugin will now ask you 3 questions:
 
 Usually for 1 and 3 the defaults are just fine, make sure the tag name is correct as this usually is different.
 
+We currently have a dependency to a SNAPSHOT dependency in the sandbox module.
+The release plugin will complain about this and we will not be able to release this way.
+As this in the sandbox module, we can force the plugin to continue by appending:
+
+   -DignoreSnapshots=true
+
+However it is important to check that nowhere else SNAPSHOT versions are referenced.
+
 What the plugin now does, is automatically execute the following operations:
 
 1. Check we aren't referencing any `SNAPSHOT` dependencies.
diff --git a/src/site/resources/plc4x-doap.rdf b/src/site/resources-filtered/plc4x-doap.rdf
similarity index 81%
rename from src/site/resources/plc4x-doap.rdf
rename to src/site/resources-filtered/plc4x-doap.rdf
index 46d0a85..998da9b 100644
--- a/src/site/resources/plc4x-doap.rdf
+++ b/src/site/resources-filtered/plc4x-doap.rdf
@@ -1,21 +1,23 @@
 <?xml version="1.0"?>
 <?xml-stylesheet type="text/xsl"?>
 <!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
 
-         http://www.apache.org/licenses/LICENSE-2.0
+      http://www.apache.org/licenses/LICENSE-2.0
 
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+  -->
 <!--
 
     This file contains information about the project itself.
@@ -35,7 +37,7 @@
     <!--
       =======================================================================
 
-       Copyright (c) 2018 The Apache Software Foundation.
+       Copyright (c) ${current-year} The Apache Software Foundation.
        All rights reserved.
 
       =======================================================================