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 2026/08/29 17:00:53 UTC
(plc4x) branch develop updated (5793ca738b -> bd550aff7b)
This is an automated email from the ASF dual-hosted git repository.
chrisdutz pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
from 5793ca738b feat: Renaming and unifying of config parameter names (#2720)
new 30ed2df5ff refactor: Updated the release-scripts to maven 4 and finished the finish-release script. Updated the validation and abort scripts to the latest changes in the release scripts.
new 2d759dc0d0 chore: Updated the github templates to the current state of drivers.
new bd550aff7b doc: Updated the links on the website. (switched from "link:" to "xref:" where possible, as this is validated at build time)
The 3 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:
.github/ISSUE_TEMPLATE/bug.yml | 7 +-
.github/ISSUE_TEMPLATE/feature.yml | 11 +-
README.md | 2 +-
plc4j/transports/cotp/README.md | 2 +-
plc4py/pyproject.toml | 2 +-
tools/release-1-create-branch.sh | 113 +++-
tools/release-2-prepare-release.sh | 151 ++++-
tools/release-3-finish-release.sh | 739 ++++++++++++++++++++-
tools/release-abort.sh | 130 +++-
tools/release-common.sh | 38 ++
tools/validate-release.sh | 49 +-
website/antora-playbook.yml | 11 +
website/asciidoc/antora.yml | 5 +-
website/asciidoc/modules/developers/nav.adoc | 4 -
.../modules/developers/pages/building.adoc | 4 +-
.../modules/developers/pages/code-gen/index.adoc | 4 +-
.../modules/developers/pages/conferences.adoc | 14 +-
.../asciidoc/modules/developers/pages/index.adoc | 10 +-
.../developers/pages/infrastructure/website.adoc | 14 +-
.../modules/developers/pages/maturity.adoc | 22 +-
.../modules/developers/pages/preparing/index.adoc | 6 +-
.../modules/developers/pages/protocols/index.adoc | 25 -
.../developers/pages/release/build-tools.adoc | 2 +-
.../modules/developers/pages/release/release.adoc | 704 +++++++++-----------
.../developers/pages/release/validation.adoc | 19 +-
website/asciidoc/modules/users/nav.adoc | 1 +
website/asciidoc/modules/users/pages/adopters.adoc | 4 +-
.../users/pages/blogs-videos-and-slides.adoc | 3 +-
.../modules/users/pages/commercial-support.adoc | 2 +-
website/asciidoc/modules/users/pages/contact.adoc | 125 ++++
website/asciidoc/modules/users/pages/download.adoc | 4 +-
.../pages/getting-started/general-concepts.adoc | 6 +-
.../modules/users/pages/getting-started/index.adoc | 6 +-
.../users/pages/getting-started/plc4go.adoc | 4 +-
website/asciidoc/modules/users/pages/index.adoc | 12 +-
.../users/pages/integrations/apache-kafka.adoc | 2 +-
.../users/pages/integrations/apache-nifi.adoc | 4 +-
.../users/pages/integrations/eclipse-milo.adoc | 20 +-
.../modules/users/pages/protocols/can.adoc | 10 +-
.../modules/users/pages/protocols/df1.adoc | 2 +-
.../modules/users/pages/protocols/opcua.adoc | 6 +-
.../modules/users/pages/tools/testing.adoc | 24 +-
.../modules/users/pages/transports/can.adoc | 4 +-
.../modules/users/pages/transports/index.adoc | 14 +-
website/asciidoc/modules/users/partials/opcua.adoc | 7 +-
website/resources/plc4x-doap.rdf | 2 +-
46 files changed, 1749 insertions(+), 601 deletions(-)
mode change 100644 => 100755 tools/release-3-finish-release.sh
create mode 100644 tools/release-common.sh
delete mode 100644 website/asciidoc/modules/developers/pages/protocols/index.adoc
create mode 100644 website/asciidoc/modules/users/pages/contact.adoc
(plc4x) 01/03: refactor: Updated the release-scripts to maven 4 and finished the finish-release script. Updated the validation and abort scripts to the latest changes in the release scripts.
Posted by cd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chrisdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
commit 30ed2df5ff96c21a16f275b551531f872092e989
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Sat Aug 29 18:23:58 2026 +0200
refactor: Updated the release-scripts to maven 4 and finished the finish-release script. Updated the validation and abort scripts to the latest changes in the release scripts.
---
tools/release-1-create-branch.sh | 113 +++++-
tools/release-2-prepare-release.sh | 151 ++++++--
tools/release-3-finish-release.sh | 739 ++++++++++++++++++++++++++++++++++++-
tools/release-abort.sh | 130 ++++++-
tools/release-common.sh | 38 ++
tools/validate-release.sh | 49 ++-
6 files changed, 1148 insertions(+), 72 deletions(-)
diff --git a/tools/release-1-create-branch.sh b/tools/release-1-create-branch.sh
index 7bddebaa58..9528213174 100755
--- a/tools/release-1-create-branch.sh
+++ b/tools/release-1-create-branch.sh
@@ -21,6 +21,20 @@
DIRECTORY="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
+# BSD and GNU sed disagree about "-i": BSD wants a backup suffix as a separate argument, GNU
+# treats that argument as the expression. Editing through a temporary file works on both, and
+# leaves nothing behind if the edit fails - a stray backup file would otherwise trip the check
+# for a clean working tree the next time one of these scripts runs.
+# $1 the file to edit, the rest are passed to sed unchanged
+sed_in_place() {
+ local file="$1"; shift
+ if ! sed "$@" "$file" > "$file.sed.tmp"; then
+ rm -f "$file.sed.tmp"
+ return 1
+ fi
+ mv "$file.sed.tmp" "$file"
+}
+
########################################################################################################################
# 0. Check if there are uncommitted changes as these would automatically be committed (local)
########################################################################################################################
@@ -35,16 +49,26 @@ fi
# 1. Get and calculate the current version (local)
########################################################################################################################
-PROJECT_VERSION=$("$DIRECTORY/mvnw" -f "$DIRECTORY/pom.xml" -q -Dexec.executable=echo -Dexec.args="\${project.version}" --non-recursive exec:exec)
+# Maven 4 prefixes even quiet output with "[INFO] [stdout] ", so take the last token of the
+# last line rather than the whole output.
+PROJECT_VERSION=$("$DIRECTORY/mvnw" -f "$DIRECTORY/pom.xml" -q -Dexec.executable=echo -Dexec.args="\${project.version}" --non-recursive exec:exec | tail -n 1 | awk '{print $NF}')
+if [[ ! "$PROJECT_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-SNAPSHOT)?$ ]]; then
+ echo "❌ Could not read a usable project version, got '$PROJECT_VERSION'."
+ echo " Everything below derives the branch and tag names from it, so aborting."
+ exit 1
+fi
RELEASE_VERSION=${PROJECT_VERSION%"-SNAPSHOT"}
RELEASE_SHORT_VERSION=${RELEASE_VERSION%".0"}
BRANCH_NAME="rel/$RELEASE_SHORT_VERSION"
IFS='.' read -ra VERSION_SEGMENTS <<< "$RELEASE_VERSION"
NEW_VERSION="${VERSION_SEGMENTS[0]}.$((VERSION_SEGMENTS[1] + 1)).0-SNAPSHOT"
+NEW_DOCS_VERSION=${NEW_VERSION%"-SNAPSHOT"}
+ANTORA_DESCRIPTOR="$DIRECTORY/website/asciidoc/antora.yml"
echo "Current Version: '$PROJECT_VERSION'"
echo "Release Version: '$RELEASE_VERSION'"
echo "Release Branch Name: '$BRANCH_NAME'"
echo "New develop Version: '$NEW_VERSION'"
+echo "New develop Docs Version: '$NEW_DOCS_VERSION'"
########################################################################################################################
# 3. Ask if the RELEASE_NOTES have been filled out at all (local)
@@ -63,7 +87,7 @@ esac
# 4 Remove the "(Unreleased)" prefix from the current version of the RELEASE_NOTES file (local)
########################################################################################################################
-if ! sed -i '' "s/(Unreleased) Apache PLC4X $PROJECT_VERSION*/Apache PLC4X $RELEASE_VERSION/" $DIRECTORY/RELEASE_NOTES; then
+if ! sed_in_place "$DIRECTORY/RELEASE_NOTES" "s/(Unreleased) Apache PLC4X $PROJECT_VERSION*/Apache PLC4X $RELEASE_VERSION/"; then
echo "❌ Got non-0 exit code from updating RELEASE_NOTES, aborting."
exit 1
fi
@@ -122,26 +146,69 @@ Bug Fixes\n\
==============================================================\
"
echo NEW_VERSION
-if ! sed -i '' "1s/.*/$NEW_HEADER/" "$DIRECTORY/RELEASE_NOTES"; then
+if ! sed_in_place "$DIRECTORY/RELEASE_NOTES" "1s/.*/$NEW_HEADER/"; then
echo "❌ Got non-0 exit code from adding a new header to RELEASE_NOTES, aborting."
exit 1
fi
########################################################################################################################
-# 7. Commit the change (local)
+# 7. Point the documentation of "develop" at the next version (local)
+########################################################################################################################
+
+# Every branch names the concrete version it documents in its own Antora descriptor. The
+# "urls.latest_version_segment" / "urls.latest_prerelease_version_segment" keys in
+# website/antora-playbook.yml then map the newest of them onto the "latest" and
+# "pre-release" URL segments, so no branch ever has to know whether it is the current
+# release. That only works if every branch keeps its version unique and up to date.
+#
+# Sets "version:" (and optionally "prerelease:") in an antora.yml. Arguments:
+# $1 the antora.yml to edit, $2 the version to set, $3 the prerelease value (optional)
+update_antora_version() {
+ local descriptor="$1" version="$2" prerelease="$3"
+
+ if [[ ! -f "$descriptor" ]]; then
+ echo "❌ Antora descriptor '$descriptor' not found, aborting."
+ exit 1
+ fi
+ if ! grep -qE "^version:" "$descriptor"; then
+ echo "❌ No 'version:' key found in '$descriptor', aborting."
+ exit 1
+ fi
+ if ! sed_in_place "$descriptor" -E "s|^version:.*|version: '$version'|"; then
+ echo "❌ Got non-0 exit code from updating the version in '$descriptor', aborting."
+ exit 1
+ fi
+ if [[ -n "$prerelease" ]]; then
+ if ! grep -qE "^prerelease:" "$descriptor"; then
+ echo "❌ No 'prerelease:' key found in '$descriptor', aborting."
+ exit 1
+ fi
+ if ! sed_in_place "$descriptor" -E "s|^prerelease:.*|prerelease: $prerelease|"; then
+ echo "❌ Got non-0 exit code from updating the prerelease flag in '$descriptor', aborting."
+ exit 1
+ fi
+ fi
+ echo "✅ '$descriptor' now documents version '$version'."
+}
+
+# "develop" stays a prerelease, it just moves on to the next version.
+update_antora_version "$ANTORA_DESCRIPTOR" "$NEW_DOCS_VERSION" "True"
+
+########################################################################################################################
+# 8. Commit the change (local)
########################################################################################################################
if ! git -C "$DIRECTORY" add --all; then
echo "❌ Got non-0 exit code from adding all changes files, aborting."
exit 1
fi
-if ! git -C "$DIRECTORY" commit -m "chore: prepared the RELEASE_NOTES for the next version."; then
+if ! git -C "$DIRECTORY" commit -m "chore: prepared the RELEASE_NOTES and the documentation version for the next version."; then
echo "❌ Got non-0 exit code from committing changes files, aborting."
exit 1
fi
########################################################################################################################
-# 8. Push the changes (local)
+# 9. Push the changes (local)
########################################################################################################################
if ! git -C "$DIRECTORY" push; then
@@ -150,7 +217,7 @@ if ! git -C "$DIRECTORY" push; then
fi
########################################################################################################################
-# 9. Switch to the release branch (local)
+# 10. Switch to the release branch (local)
########################################################################################################################
if ! git -C "$DIRECTORY" checkout "$BRANCH_NAME"; then
@@ -164,6 +231,38 @@ if ! git -C "$DIRECTORY" push --set-upstream origin "$BRANCH_NAME"; then
exit 1
fi
+########################################################################################################################
+# 11. Point the documentation of the release branch at the version it is going to release (local)
+########################################################################################################################
+
+# The release branch documents the version it is going to release, but stays flagged as a
+# prerelease: nothing has been voted on yet. Nothing of it is published while the vote runs -
+# Antora only reads the branches listed in website/antora-playbook.yml, and
+# 'release-3-finish-release.sh' adds it there after a successful vote. The flag matters at that
+# moment: Antora skips prereleases when it picks the latest version of a component, so the branch
+# would appear under its own version number rather than as ".../plc4x/latest/...".
+# 'release-3-finish-release.sh' clears the flag in the same run, and that is what makes this
+# branch the published release.
+update_antora_version "$ANTORA_DESCRIPTOR" "$RELEASE_VERSION" "True"
+# Usually there is nothing to commit here: the branch was cut from "develop" before step 6b moved
+# it on, so it already documents the version being released. Only a "develop" that was out of sync
+# leaves an actual change behind.
+if [[ $(git -C "$DIRECTORY" status --porcelain) ]]; then
+ if ! git -C "$DIRECTORY" add "$ANTORA_DESCRIPTOR"; then
+ echo "❌ Got non-0 exit code from adding the Antora descriptor, aborting."
+ exit 1
+ fi
+ if ! git -C "$DIRECTORY" commit -m "chore: set the documentation version of the release branch to $RELEASE_VERSION (still a prerelease)."; then
+ echo "❌ Got non-0 exit code from committing the Antora descriptor, aborting."
+ exit 1
+ fi
+ if ! git -C "$DIRECTORY" push; then
+ echo "❌ Got non-0 exit code from pushing the Antora descriptor, aborting."
+ exit 1
+ fi
+else
+ echo "✅ The release branch already documents $RELEASE_VERSION."
+fi
echo "✅ Release branch creation complete. We have switched the local branch to the release branch. Please continue with 'release-2-prepare-release.sh' as soon as the release branch is ready for being released."
\ No newline at end of file
diff --git a/tools/release-2-prepare-release.sh b/tools/release-2-prepare-release.sh
index 7102fae80e..da9e3fbb1b 100755
--- a/tools/release-2-prepare-release.sh
+++ b/tools/release-2-prepare-release.sh
@@ -20,6 +20,14 @@
# ----------------------------------------------------------------------------
DIRECTORY="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
+# Values shared with the other release scripts (Nexus staging profile, dist.apache.org URLs).
+if [[ ! -f "$DIRECTORY/tools/release-common.sh" ]]; then
+ echo "❌ '$DIRECTORY/tools/release-common.sh' not found, aborting."
+ exit 1
+fi
+# shellcheck source=release-common.sh
+source "$DIRECTORY/tools/release-common.sh"
+
########################################################################################################################
# 0. Check if there are uncommitted changes as these would automatically be committed (local)
@@ -31,7 +39,14 @@ if [[ $(git -C "$DIRECTORY" status --porcelain) ]]; then
exit 1
fi
-PROJECT_VERSION=$("$DIRECTORY"/mvnw -f "$DIRECTORY"/pom.xml -q -Dexec.executable=echo -Dexec.args="\${project.version}" --non-recursive exec:exec)
+# Maven 4 prefixes even quiet output with "[INFO] [stdout] ", so take the last token of the
+# last line rather than the whole output.
+PROJECT_VERSION=$("$DIRECTORY"/mvnw -f "$DIRECTORY"/pom.xml -q -Dexec.executable=echo -Dexec.args="\${project.version}" --non-recursive exec:exec | tail -n 1 | awk '{print $NF}')
+if [[ ! "$PROJECT_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-SNAPSHOT)?$ ]]; then
+ echo "❌ Could not read a usable project version, got '$PROJECT_VERSION'."
+ echo " Everything below derives the branch and tag names from it, so aborting."
+ exit 1
+fi
RELEASE_VERSION=${PROJECT_VERSION%"-SNAPSHOT"}
TAG_NAME="v$RELEASE_VERSION"
IFS='.' read -ra VERSION_SEGMENTS <<< "$RELEASE_VERSION"
@@ -53,7 +68,7 @@ else
echo "✅ Tag '$TAG_NAME' does not exist on remote 'origin'."
fi
-# TODO: Update website/asciidoc/antora.yml
+# The Antora documentation version of this branch was already set by 'release-1-create-branch.sh'.
########################################################################################################################
# 1. Do a simple release-prepare command
@@ -93,25 +108,30 @@ fi
########################################################################################################################
echo "Signing artifacts:"
-find "$DIRECTORY/out/.local-artifacts-dir" -print | grep -E '^((.*\.pom)|(.*\.jar)|(.*\.kar)|(.*\.nar)|(.*-features\.xml)|(.*-cyclonedx\.json)|(.*-cyclonedx\.xml)|(.*-site\.xml)|(.*\.zip))$' | while read -r line ; do
+SIGNED_ARTIFACTS=0
+# The loop reads from a process substitution rather than from a pipe on purpose: the last stage
+# of a pipeline runs in a subshell, where an "exit" would only end the loop and let the release
+# carry on to the deployment below with unsigned artifacts.
+while read -r line ; do
echo "Processing $line"
if ! gpg -ab "$line"; then
echo "❌ Got non-0 exit code from signing artifact, aborting."
exit 1
fi
-done
+ SIGNED_ARTIFACTS=$((SIGNED_ARTIFACTS + 1))
+done < <(find "$DIRECTORY/out/.local-artifacts-dir" -print | grep -E '^((.*\.pom)|(.*\.jar)|(.*\.kar)|(.*\.nar)|(.*-features\.xml)|(.*-cyclonedx\.json)|(.*-cyclonedx\.xml)|(.*-site\.xml)|(.*\.zip))$')
+
+if [[ "$SIGNED_ARTIFACTS" -eq 0 ]]; then
+ echo "❌ Found no artifacts to sign in '$DIRECTORY/out/.local-artifacts-dir', aborting."
+ exit 1
+fi
+echo "✅ Signed $SIGNED_ARTIFACTS artifacts."
########################################################################################################################
# 5. Deploy the artifacts to Nexus and close the staging repo
########################################################################################################################
-# If this doesn't work and results in errors complaining about "404 not found", the stating profile id
-# might have changed. To update that, go to https://repository.apache.org and log in. Then select "Staging Profiles"
-# and click on the one named "org.apache.plc4x". The browser URL will be updated to something like:
-# https://repository.apache.org/#stagingProfiles;15cd9d785359f8 ... the id after the "#stagingProfiles;" is the
-# staging profile id.
echo "Deploying artifacts:"
-STAGING_PROFILE_ID=15cd9d785359f8
# Clean up any pre-existing properties file, as otherwise we'll also deploy that,
# and that will cause errors when closing.
rm "$DIRECTORY/out/.local-artifacts-dir/$STAGING_PROFILE_ID.properties"
@@ -123,7 +143,6 @@ fi
# Get the url of the closed repo to add that to the VOTE email
DEPLOY_PROPS="$DIRECTORY/out/.local-artifacts-dir/$STAGING_PROFILE_ID.properties"
STAGING_REPO_ID=$(grep stagingRepository.id "$DEPLOY_PROPS" | cut -d= -f2)
-NEXUS_URL="https://repository.apache.org"
STAGING_REPO_URL="$NEXUS_URL/content/repositories/$STAGING_REPO_ID"
echo "✅ Staging repository closed: $STAGING_REPO_URL"
@@ -134,37 +153,72 @@ echo "✅ Staging repository closed: $STAGING_REPO_URL"
echo "Staging release candidate:"
read -r -p 'Release-Candidate number: ' rcNumber
RELEASE_CANDIDATE="rc$rcNumber"
-RELEASE_VERSION=$(find "$DIRECTORY/out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/" -maxdepth 1 -type d | grep -vE 'plc4x-parent/$' | xargs -n 1 basename)
-mkdir -p "$DIRECTORY/out/stage/$RELEASE_VERSION/$RELEASE_CANDIDATE"
-cp "$DIRECTORY/README.md" "$DIRECTORY/out/stage/$RELEASE_VERSION/$RELEASE_CANDIDATE/README"
-cp "$DIRECTORY/RELEASE_NOTES" "$DIRECTORY/out/stage/$RELEASE_VERSION/$RELEASE_CANDIDATE"
-cp "$DIRECTORY/out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/$RELEASE_VERSION/plc4x-parent-$RELEASE_VERSION-source-release.zip" "$DIRECTORY/out/stage/$RELEASE_VERSION/$RELEASE_CANDIDATE/apache-plc4x-$RELEASE_VERSION-source-release.zip"
-cp "$DIRECTORY/out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/$RELEASE_VERSION/plc4x-parent-$RELEASE_VERSION-source-release.zip.asc" "$DIRECTORY/out/stage/$RELEASE_VERSION/$RELEASE_CANDIDATE/apache-plc4x-$RELEASE_VERSION-source-release.zip.asc"
-cp "$DIRECTORY/out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/$RELEASE_VERSION/plc4x-parent-$RELEASE_VERSION-source-release.zip.sha512" "$DIRECTORY/out/stage/$RELEASE_VERSION/$RELEASE_CANDIDATE/apache-plc4x-$RELEASE_VERSION-source-release.zip.sha512"
-cp "$DIRECTORY/out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/$RELEASE_VERSION/plc4x-parent-$RELEASE_VERSION-cyclonedx.json" "$DIRECTORY/out/stage/$RELEASE_VERSION/$RELEASE_CANDIDATE/apache-plc4x-$RELEASE_VERSION-cyclonedx.json"
-cp "$DIRECTORY/out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/$RELEASE_VERSION/plc4x-parent-$RELEASE_VERSION-cyclonedx.json.asc" "$DIRECTORY/out/stage/$RELEASE_VERSION/$RELEASE_CANDIDATE/apache-plc4x-$RELEASE_VERSION-cyclonedx.json.asc"
-cp "$DIRECTORY/out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/$RELEASE_VERSION/plc4x-parent-$RELEASE_VERSION-cyclonedx.xml" "$DIRECTORY/out/stage/$RELEASE_VERSION/$RELEASE_CANDIDATE/apache-plc4x-$RELEASE_VERSION-cyclonedx.xml"
-cp "$DIRECTORY/out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/$RELEASE_VERSION/plc4x-parent-$RELEASE_VERSION-cyclonedx.xml.asc" "$DIRECTORY/out/stage/$RELEASE_VERSION/$RELEASE_CANDIDATE/apache-plc4x-$RELEASE_VERSION-cyclonedx.xml.asc"
+
+# RELEASE_VERSION is the one derived from the project version at the top of this script. It used
+# to be re-derived here by listing the built artifacts, which silently produced several words -
+# and with it a set of broken paths - whenever "out" still held a previous attempt. Rather than
+# guess the version from whatever is lying around, check that the build we just did is there.
+ARTIFACTS_DIR="$DIRECTORY/out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/$RELEASE_VERSION"
+if [[ ! -d "$ARTIFACTS_DIR" ]]; then
+ echo "❌ Found no built artifacts for $RELEASE_VERSION in '$ARTIFACTS_DIR', aborting."
+ echo " These versions are present:"
+ find "$DIRECTORY/out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/" -maxdepth 1 -mindepth 1 -type d -exec basename {} \; 2>/dev/null | sed 's|^| |'
+ exit 1
+fi
+
+STAGE_DIR="$DIRECTORY/out/stage/$RELEASE_VERSION/$RELEASE_CANDIDATE"
+mkdir -p "$STAGE_DIR"
+cp "$DIRECTORY/README.md" "$STAGE_DIR/README"
+cp "$DIRECTORY/RELEASE_NOTES" "$STAGE_DIR"
+cp "$ARTIFACTS_DIR/plc4x-parent-$RELEASE_VERSION-source-release.zip" "$STAGE_DIR/apache-plc4x-$RELEASE_VERSION-source-release.zip"
+cp "$ARTIFACTS_DIR/plc4x-parent-$RELEASE_VERSION-source-release.zip.asc" "$STAGE_DIR/apache-plc4x-$RELEASE_VERSION-source-release.zip.asc"
+cp "$ARTIFACTS_DIR/plc4x-parent-$RELEASE_VERSION-source-release.zip.sha512" "$STAGE_DIR/apache-plc4x-$RELEASE_VERSION-source-release.zip.sha512"
+cp "$ARTIFACTS_DIR/plc4x-parent-$RELEASE_VERSION-cyclonedx.json" "$STAGE_DIR/apache-plc4x-$RELEASE_VERSION-cyclonedx.json"
+cp "$ARTIFACTS_DIR/plc4x-parent-$RELEASE_VERSION-cyclonedx.json.asc" "$STAGE_DIR/apache-plc4x-$RELEASE_VERSION-cyclonedx.json.asc"
+cp "$ARTIFACTS_DIR/plc4x-parent-$RELEASE_VERSION-cyclonedx.xml" "$STAGE_DIR/apache-plc4x-$RELEASE_VERSION-cyclonedx.xml"
+cp "$ARTIFACTS_DIR/plc4x-parent-$RELEASE_VERSION-cyclonedx.xml.asc" "$STAGE_DIR/apache-plc4x-$RELEASE_VERSION-cyclonedx.xml.asc"
########################################################################################################################
# 8. Make sure the currently used GPG key is available in the KEYS file
########################################################################################################################
-ORIGINAL_FILE="$DIRECTORY/out/stage/$RELEASE_VERSION/$RELEASE_CANDIDATE/apache-plc4x-$RELEASE_VERSION-source-release.zip"
-SIGNATURE_FILE="$DIRECTORY/out/stage/$RELEASE_VERSION/$RELEASE_CANDIDATE/apache-plc4x-$RELEASE_VERSION-source-release.zip.asc"
+ORIGINAL_FILE="$STAGE_DIR/apache-plc4x-$RELEASE_VERSION-source-release.zip"
+SIGNATURE_FILE="$STAGE_DIR/apache-plc4x-$RELEASE_VERSION-source-release.zip.asc"
-KEYS_URL="https://dist.apache.org/repos/dist/release/plc4x/KEYS"
+# KEYS_URL comes from tools/release-common.sh
TEMP_DIR=$(mktemp -d)
KEYS_FILE="$TEMP_DIR/KEYS"
KEYRING="$TEMP_DIR/pubring.kbx"
# Fetch KEYS file
echo "🔽 Downloading KEYS file from $KEYS_URL"
-curl -fsSL "$KEYS_URL" -o "$KEYS_FILE"
+if ! curl -fsSL "$KEYS_URL" -o "$KEYS_FILE"; then
+ echo "❌ Could not download the KEYS file from $KEYS_URL, aborting."
+ rm -rf "$TEMP_DIR"
+ exit 1
+fi
+if [[ ! -s "$KEYS_FILE" ]]; then
+ echo "❌ The KEYS file downloaded from $KEYS_URL is empty, aborting."
+ rm -rf "$TEMP_DIR"
+ exit 1
+fi
# Import keys into temporary keyring
echo "🔑 Importing KEYS into temporary GPG keyring"
-gpg --no-default-keyring --keyring "$KEYRING" --import "$KEYS_FILE" > /dev/null 2>&1
+if ! gpg --no-default-keyring --keyring "$KEYRING" --import "$KEYS_FILE" > /dev/null 2>&1; then
+ echo "❌ Could not import the KEYS file into a temporary keyring, aborting."
+ rm -rf "$TEMP_DIR"
+ exit 1
+fi
+# Without this an empty keyring would make the verification below fail, and the message would
+# blame the release manager's key instead of the KEYS file that never arrived.
+IMPORTED_KEYS=$(gpg --no-default-keyring --keyring "$KEYRING" --with-colons --list-keys 2>/dev/null | grep -c '^pub:')
+if [[ "$IMPORTED_KEYS" -eq 0 ]]; then
+ echo "❌ The temporary keyring contains no keys after importing $KEYS_URL, aborting."
+ rm -rf "$TEMP_DIR"
+ exit 1
+fi
+echo "🔑 Imported $IMPORTED_KEYS keys from the KEYS file"
# Verify the signature
echo "🧾 Verifying signature on $ORIGINAL_FILE with $SIGNATURE_FILE"
@@ -175,7 +229,40 @@ else
exit 1
fi
-# TODO: Check that the signature references an apache email address...
+########################################################################################################################
+# 8b. Make sure that key belongs to an Apache identity
+########################################################################################################################
+
+# Being in the KEYS file is not quite enough: the key used to sign an Apache release has to carry
+# the release manager's {apache-id}@apache.org address. A key can have several user ids, and only
+# one of them has to be the Apache one.
+
+SIGNATURE_STATUS=$(gpg --no-default-keyring --keyring "$KEYRING" --status-fd 1 \
+ --verify "$SIGNATURE_FILE" "$ORIGINAL_FILE" 2>/dev/null)
+# Field 3 of VALIDSIG is the key that made the signature, which is the signing subkey for anyone
+# who signs with one. The last field is the fingerprint of the primary key, which is what carries
+# the user ids, so prefer that and fall back to field 3 for older gpg output.
+SIGNING_KEY=$(echo "$SIGNATURE_STATUS" | awk '/^\[GNUPG:\] VALIDSIG /{print ($12 != "" ? $12 : $3); exit}')
+if [[ -z "$SIGNING_KEY" ]]; then
+ echo "❌ Could not work out which key signed the release, aborting."
+ rm -rf "$TEMP_DIR"
+ exit 1
+fi
+
+# Field 2 is the validity of the user id: skip the ones that are revoked ("r") or expired ("e"),
+# so that an @apache.org address the key no longer stands behind does not satisfy the check.
+SIGNING_UIDS=$(gpg --no-default-keyring --keyring "$KEYRING" --with-colons --list-keys "$SIGNING_KEY" 2>/dev/null \
+ | awk -F: '$1 == "uid" && $2 !~ /^[re]$/ {print $10}')
+if echo "$SIGNING_UIDS" | grep -qiE '<[^>]+@apache\.org>'; then
+ echo "✅ The signing key is registered to an apache.org address"
+else
+ echo "❌ The signing key is not registered to an apache.org address, aborting."
+ echo " Releases have to be signed with a key carrying your {apache-id}@apache.org address."
+ echo " Key $SIGNING_KEY currently carries:"
+ echo "$SIGNING_UIDS" | sed 's|^| |'
+ rm -rf "$TEMP_DIR"
+ exit 1
+fi
# Cleanup
rm -rf "$TEMP_DIR"
@@ -184,8 +271,8 @@ rm -rf "$TEMP_DIR"
# 9. Validate the sha512 hashes
########################################################################################################################
-ORIGINAL_FILE="$DIRECTORY/out/stage/$RELEASE_VERSION/$RELEASE_CANDIDATE/apache-plc4x-$RELEASE_VERSION-source-release.zip"
-HASHES_FILE="$DIRECTORY/out/stage/$RELEASE_VERSION/$RELEASE_CANDIDATE/apache-plc4x-$RELEASE_VERSION-source-release.zip.sha512"
+ORIGINAL_FILE="$STAGE_DIR/apache-plc4x-$RELEASE_VERSION-source-release.zip"
+HASHES_FILE="$STAGE_DIR/apache-plc4x-$RELEASE_VERSION-source-release.zip.sha512"
ACTUAL_HASH=$(shasum -a 512 "$ORIGINAL_FILE" | awk '{ print $1 }')
EXPECTED_HASH=$(tr -d ' \n\r' < "$HASHES_FILE")
@@ -204,7 +291,7 @@ fi
########################################################################################################################
cd "$DIRECTORY/out/stage/$RELEASE_VERSION" || exit
-svn import "$RELEASE_CANDIDATE" "https://dist.apache.org/repos/dist/dev/plc4x/$RELEASE_VERSION/$RELEASE_CANDIDATE" -m"Staging of $RELEASE_CANDIDATE of PLC4X $RELEASE_VERSION"
+svn import "$RELEASE_CANDIDATE" "$DIST_DEV/$RELEASE_VERSION/$RELEASE_CANDIDATE" -m"Staging of $RELEASE_CANDIDATE of PLC4X $RELEASE_VERSION"
########################################################################################################################
# 11. Prepare the [VOTE] and [DISCUSS] emails
@@ -238,7 +325,7 @@ You can achieve the above by following [4].
[1] $STAGING_REPO_URL
-[2] https://dist.apache.org/repos/dist/dev/plc4x/$RELEASE_VERSION/$RELEASE_CANDIDATE
+[2] $DIST_DEV/$RELEASE_VERSION/$RELEASE_CANDIDATE
[3] https://www.apache.org/dev/release.html#approving-a-release
[4] https://plc4x.apache.org/plc4x/latest/developers/release/validation.html
EOF
diff --git a/tools/release-3-finish-release.sh b/tools/release-3-finish-release.sh
old mode 100644
new mode 100755
index e02d65e4d9..972d900228
--- a/tools/release-3-finish-release.sh
+++ b/tools/release-3-finish-release.sh
@@ -19,45 +19,758 @@
# under the License.
# ----------------------------------------------------------------------------
-# #######################################################################################################################
-# TODO: Send out the [RESULT][VOTE] email
+DIRECTORY="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
+# Values shared with the other release scripts (Nexus staging profile, dist.apache.org URLs).
+if [[ ! -f "$DIRECTORY/tools/release-common.sh" ]]; then
+ echo "❌ '$DIRECTORY/tools/release-common.sh' not found, aborting."
+ exit 1
+fi
+# shellcheck source=release-common.sh
+source "$DIRECTORY/tools/release-common.sh"
+
+
+########################################################################################################################
+# 0. Check if there are uncommitted changes as these would automatically be committed (local)
+########################################################################################################################
+
+if [[ $(git -C "$DIRECTORY" status --porcelain) ]]; then
+ # Changes
+ echo "❌ There are untracked files or changed files, aborting."
+ exit 1
+fi
+
+# Everything below writes to the release branch, so make sure that is where we are before
+# anything is changed - running this on "develop" by accident would rewrite its documentation
+# version.
+RELEASE_BRANCH=$(git -C "$DIRECTORY" rev-parse --abbrev-ref HEAD)
+if [[ ! "$RELEASE_BRANCH" =~ ^rel/ ]]; then
+ echo "❌ Expected to be on a 'rel/...' branch, but found '$RELEASE_BRANCH', aborting."
+ echo " Check out the release branch of the release that just passed its vote."
+ exit 1
+fi
+
+# BSD and GNU sed disagree about "-i": BSD wants a backup suffix as a separate argument, GNU
+# treats that argument as the expression. Editing through a temporary file works on both, and
+# leaves nothing behind if the edit fails - a stray backup file would otherwise trip the check
+# for a clean working tree the next time one of these scripts runs.
+# $1 the file to edit, the rest are passed to sed unchanged
+sed_in_place() {
+ local file="$1"; shift
+ if ! sed "$@" "$file" > "$file.sed.tmp"; then
+ rm -f "$file.sed.tmp"
+ return 1
+ fi
+ mv "$file.sed.tmp" "$file"
+}
+
+########################################################################################################################
+# Helpers for maintaining the download page
+########################################################################################################################
+
+# The download page exists on every branch that publishes documentation, and each copy has to list
+# the release, because ".../plc4x/latest/users/download.html" is served from the release branch
+# while ".../plc4x/pre-release/..." is served from "develop".
+#
+# Prints the section of the RELEASE_NOTES belonging to one version, converted to AsciiDoc.
+# $1 the RELEASE_NOTES file, $2 the version
+release_notes_to_asciidoc() {
+ awk -v ver="$2" '
+ /^=+$/ {
+ if (state == 2) { exit } # banner of the next version, we are done
+ if (state == 1) { state = 2 } # closing banner of our own title
+ else { pending = 1 }
+ next
+ }
+ {
+ if (pending) {
+ pending = 0
+ title = $0
+ sub(/^\(Unreleased\) /, "", title)
+ if (title == "Apache PLC4X " ver) { state = 1 }
+ next
+ }
+ if (state == 2) { print }
+ }
+ ' "$1" | awk '
+ # Each bullet ends up on a single line. The RELEASE_NOTES wrap them and indent the
+ # continuations, and neither keeping nor stripping that indentation is safe: a continuation
+ # that happens to start with something like "18446744073709551615." would be read as an
+ # ordered list item by AsciiDoc. Joining the lines avoids the question and renders the same.
+ function flush() { if (buffer != "") { print buffer; buffer = "" } }
+ { lines[NR] = $0 }
+ END {
+ last = NR
+ while (last > 0 && lines[last] ~ /^[ \t]*$/) { last-- } # trim trailing blank lines
+ buffer = ""
+ for (i = 1; i <= last; i++) {
+ l = lines[i]
+ # "New Features" underlined with dashes becomes a level 4 heading
+ if (l ~ /^[A-Za-z]/ && lines[i+1] ~ /^-+$/) { flush(); print "==== " l; i++; started = 1; continue }
+ if (l ~ /^[ \t]*$/) { if (!started) { continue } # skip the blank lines before the first heading
+ flush(); print ""; continue }
+ started = 1
+ sub(/^[ \t]+/, "", l)
+ if (l ~ /^[-*] /) { # a new bullet
+ flush()
+ sub(/^- PLC4X-[0-9]+ /, "- ", l) # older notes carried the issue id in front
+ buffer = l
+ } else if (buffer != "") { # a wrapped continuation of the current bullet
+ buffer = buffer " " l
+ } else { # ordinary prose
+ print l
+ }
+ }
+ flush()
+ }
+ '
+}
+
+# Adds a release to a download page: the entry that was current is moved down to "Previous
+# Releases" with its source-release link pointed at the archive, and the new one takes its place.
+# $1 the download.adoc to edit, $2 the version, $3 the RELEASE_NOTES to take the notes from
+update_download_page() {
+ local page="$1" version="$2" notes="$3"
+ local anchor="release-${version//./_}"
+
+ if [[ ! -f "$page" ]]; then
+ echo "❌ Download page '$page' not found, aborting."
+ exit 1
+ fi
+ if grep -q "^\[#$anchor\]$" "$page"; then
+ echo "✅ $version is already listed on '$page'."
+ return 0
+ fi
+
+ local current_line previous_line
+ current_line=$(grep -n '^== Current Releases$' "$page" | head -1 | cut -d: -f1)
+ previous_line=$(grep -n '^== Previous Releases$' "$page" | head -1 | cut -d: -f1)
+ if [[ -z "$current_line" || -z "$previous_line" || "$previous_line" -le "$current_line" ]]; then
+ echo "❌ '$page' has no usable 'Current Releases'/'Previous Releases' structure, aborting."
+ exit 1
+ fi
+
+ # This function always makes $version the current release and pushes what was there into
+ # "Previous Releases". That is only right when $version really is the newest release: a bugfix
+ # off an old branch (0.13.2 while 1.0.0 is current) would otherwise archive 1.0.0. Where that
+ # happens the page needs a human decision about how to present two maintained lines.
+ local current_version
+ current_version=$(sed -n "$((current_line + 1)),$((previous_line - 1))p" "$page" \
+ | grep -oE '^\[#release-[0-9_]+\]$' | head -1 | sed -E 's|^\[#release-||; s|\]$||; s|_|.|g')
+ if [[ -n "$current_version" && "$current_version" != "$version" ]] \
+ && [[ "$(printf '%s\n%s\n' "$version" "$current_version" | sort -V | tail -1)" != "$version" ]]; then
+ echo "❌ '$page' lists $current_version as the current release, which is newer than $version, aborting."
+ echo " This looks like a bugfix release off an older branch. Add the entry by hand so that"
+ echo " $current_version stays the current release."
+ exit 1
+ fi
+
+ local notes_body
+ notes_body=$(release_notes_to_asciidoc "$notes" "$version")
+ if [[ -z "$notes_body" ]]; then
+ echo "❌ Found no RELEASE_NOTES section for $version in '$notes', aborting."
+ exit 1
+ fi
+
+ {
+ head -n "$current_line" "$page"
+ echo
+ echo "[#$anchor]"
+ echo "=== $version Official https://www.apache.org/dyn/closer.lua/plc4x/$version/apache-plc4x-$version-source-release.zip[source release] [ https://downloads.apache.org/plc4x/$version/apache-plc4x-$version-source-release.zip.sha512[SHA512] ] [ https://downloads.apache.org/plc4x/$version/apache-plc4x-$version-source-release.zip.asc[ASC] ]"
+ echo
+ echo "$notes_body"
+ echo
+ echo "== Previous Releases"
+ # What used to be current, with its source-release link moved to the archive.
+ sed -n "$((current_line + 1)),$((previous_line - 1))p" "$page" \
+ | sed 's|https://www\.apache\.org/dyn/closer\.lua/plc4x/|https://archive.apache.org/dist/plc4x/|g'
+ tail -n +"$((previous_line + 1))" "$page"
+ } > "$page.tmp"
+
+ if ! grep -q "^\[#$anchor\]$" "$page.tmp"; then
+ echo "❌ Could not add $version to '$page', aborting."
+ rm -f "$page.tmp"
+ exit 1
+ fi
+ mv "$page.tmp" "$page"
+ echo "✅ $version added to '$page'."
+}
+
+########################################################################################################################
+# 1. Publish the documentation of this branch as the current release (local)
+########################################################################################################################
+
+# Up to this point the release branch documented the version it was going to release, but was
+# still flagged as a prerelease, so ".../plc4x/latest/..." kept serving the previous release
+# while the vote was running (see 'release-1-create-branch.sh'). The vote has passed, so the
+# flag can be cleared. Antora then picks this branch as the latest version of the component
+# and publishes it as ".../plc4x/latest/...", which at the same time demotes the previous
+# release branch to its own version number. Nothing has to be changed on that older branch.
+#
+# The version is taken from the tag 'release-2-prepare-release.sh' created, so that this also
+# does the right thing for a bugfix release, where 'release-1-create-branch.sh' never ran.
+
+ANTORA_DESCRIPTOR="$DIRECTORY/website/asciidoc/antora.yml"
+
+RELEASE_TAG=$(git -C "$DIRECTORY" describe --tags --abbrev=0 --match "v*" 2>/dev/null)
+if [[ -z "$RELEASE_TAG" ]]; then
+ echo "❌ Could not determine the release tag of this branch, aborting."
+ echo " Are you on the release branch, and did 'release-2-prepare-release.sh' run?"
+ exit 1
+fi
+RELEASED_VERSION=${RELEASE_TAG#v}
+
+# "git describe" finds the nearest tag reachable from HEAD, which on a maintenance branch that has
+# not been prepared yet is the PREVIOUS release. Check the tag actually belongs to this branch.
+TAG_LINE=$(echo "$RELEASED_VERSION" | cut -d. -f1,2)
+if [[ "$RELEASE_BRANCH" != "rel/$TAG_LINE" ]]; then
+ echo "❌ The most recent tag is '$RELEASE_TAG', which does not belong to branch '$RELEASE_BRANCH', aborting."
+ echo " Expected a tag on the rel/$TAG_LINE line. Has 'release-2-prepare-release.sh' run on this branch?"
+ exit 1
+fi
+
+read -r -p "Did the vote for $RELEASED_VERSION pass and is it being released? (yes/no) " yn
+case $yn in
+ yes ) echo "Publishing the documentation of $RELEASED_VERSION as the current release.";;
+ no ) echo "Not publishing anything. Re-run this script once the vote has passed.";
+ exit 1;;
+ * ) echo "invalid response";
+ exit 1;;
+esac
+
+if [[ ! -f "$ANTORA_DESCRIPTOR" ]]; then
+ echo "❌ Antora descriptor '$ANTORA_DESCRIPTOR' not found, aborting."
+ exit 1
+fi
+# Check the RELEASE_NOTES before writing anything: the download page needs them further down, and
+# aborting halfway would leave the descriptor modified and the next run blocked by the check for a
+# clean working tree at the top of this script.
+if [[ -z "$(release_notes_to_asciidoc "$DIRECTORY/RELEASE_NOTES" "$RELEASED_VERSION")" ]]; then
+ echo "❌ Found no RELEASE_NOTES section for $RELEASED_VERSION, aborting."
+ echo " Expected a block headed 'Apache PLC4X $RELEASED_VERSION' - if it still says"
+ echo " '(Unreleased) ... -SNAPSHOT', 'release-1-create-branch.sh' never finalized it."
+ exit 1
+fi
+if ! grep -qE "^version:" "$ANTORA_DESCRIPTOR" || ! grep -qE "^prerelease:" "$ANTORA_DESCRIPTOR"; then
+ echo "❌ '$ANTORA_DESCRIPTOR' has no 'version:' and/or 'prerelease:' key, aborting."
+ exit 1
+fi
+if ! sed_in_place "$ANTORA_DESCRIPTOR" -E "s|^version:.*|version: '$RELEASED_VERSION'|"; then
+ echo "❌ Got non-0 exit code from updating the version in the Antora descriptor, aborting."
+ exit 1
+fi
+if ! sed_in_place "$ANTORA_DESCRIPTOR" -E "s|^prerelease:.*|prerelease: False|"; then
+ echo "❌ Got non-0 exit code from clearing the prerelease flag, aborting."
+ exit 1
+fi
+echo "✅ '$ANTORA_DESCRIPTOR' now publishes $RELEASED_VERSION as the current release."
+
+# The copy of the download page on this branch is what ".../plc4x/latest/users/download.html"
+# will be served from, so it has to list the release too.
+update_download_page "$DIRECTORY/website/asciidoc/modules/users/pages/download.adoc" \
+ "$RELEASED_VERSION" "$DIRECTORY/RELEASE_NOTES"
+
+if [[ $(git -C "$DIRECTORY" status --porcelain) ]]; then
+ if ! git -C "$DIRECTORY" add "$ANTORA_DESCRIPTOR" \
+ "$DIRECTORY/website/asciidoc/modules/users/pages/download.adoc"; then
+ echo "❌ Got non-0 exit code from adding the Antora descriptor, aborting."
+ exit 1
+ fi
+ if ! git -C "$DIRECTORY" commit -m "chore: published the documentation of $RELEASED_VERSION as the current release."; then
+ echo "❌ Got non-0 exit code from committing the Antora descriptor, aborting."
+ exit 1
+ fi
+ if ! git -C "$DIRECTORY" push; then
+ echo "❌ Got non-0 exit code from pushing the Antora descriptor, aborting."
+ exit 1
+ fi
+else
+ echo "✅ The Antora descriptor was already up to date."
+fi
+
+########################################################################################################################
+# 2. Update the website configuration on "develop"
+########################################################################################################################
+
+# Two things have to happen on "develop" for this release to show up on the website:
+#
+# - the release branch has to be listed in the "content.sources" list of
+# website/antora-playbook.yml, because Antora only reads the branches listed there - without
+# it the descriptor changed above has no effect at all
+# - the released version has to be added to website/resources/plc4x-doap.rdf, which is what
+# Apache's tooling reads to keep track of the project's release activity
+#
+# Both files live on "develop", which is not the branch we are on, so the edits are made in a
+# throw-away worktree and pushed straight to "develop" - the release branch stays checked out in
+# the working copy the release manager is using.
+
+if ! git -C "$DIRECTORY" fetch origin develop; then
+ echo "❌ Got non-0 exit code from fetching 'develop', aborting."
+ exit 1
+fi
+
+DEVELOP_WORKTREE=$(mktemp -d)
+cleanup_develop_worktree() {
+ git -C "$DIRECTORY" worktree remove --force "$DEVELOP_WORKTREE" >/dev/null 2>&1
+ rm -rf "$DEVELOP_WORKTREE"
+ # If the remove failed the directory is gone but the .git/worktrees entry is not, so prune it.
+ git -C "$DIRECTORY" worktree prune >/dev/null 2>&1
+}
+trap cleanup_develop_worktree EXIT
+
+# A detached worktree, so this works even if "develop" happens to be checked out somewhere else.
+rmdir "$DEVELOP_WORKTREE"
+if ! git -C "$DIRECTORY" worktree add --detach "$DEVELOP_WORKTREE" origin/develop; then
+ echo "❌ Got non-0 exit code from creating a worktree for 'develop', aborting."
+ exit 1
+fi
+
+PLAYBOOK="$DEVELOP_WORKTREE/website/antora-playbook.yml"
+DOAP="$DEVELOP_WORKTREE/website/resources/plc4x-doap.rdf"
+for f in "$PLAYBOOK" "$DOAP"; do
+ if [[ ! -f "$f" ]]; then
+ echo "❌ '$f' not found, aborting."
+ exit 1
+ fi
+done
+
+CHANGES=()
+
+########################################################################################################################
+# 2a. Add the release branch to the Antora playbook
+########################################################################################################################
+
+if grep -q "'$RELEASE_BRANCH'" "$PLAYBOOK"; then
+ echo "✅ '$RELEASE_BRANCH' is already listed in the Antora playbook."
+else
+ # Insert directly after the first "start_path", which ends the "develop" source, so the
+ # release branches stay listed newest first.
+ if ! awk -v branch="$RELEASE_BRANCH" '
+ BEGIN { done = 0 }
+ { print }
+ !done && /^[[:space:]]*start_path: website\/asciidoc[[:space:]]*$/ {
+ print " - url: https://github.com/apache/plc4x.git"
+ print " branches: [\x27" branch "\x27]"
+ print " start_path: website/asciidoc"
+ done = 1
+ }
+ ' "$PLAYBOOK" > "$PLAYBOOK.tmp"; then
+ echo "❌ Got non-0 exit code from adding '$RELEASE_BRANCH' to the playbook, aborting."
+ exit 1
+ fi
+ if ! grep -q "'$RELEASE_BRANCH'" "$PLAYBOOK.tmp"; then
+ echo "❌ Could not add '$RELEASE_BRANCH' to the Antora playbook, aborting."
+ echo " The 'content.sources' list does not look the way this script expects."
+ rm -f "$PLAYBOOK.tmp"
+ exit 1
+ fi
+ mv "$PLAYBOOK.tmp" "$PLAYBOOK"
+ CHANGES+=("website/antora-playbook.yml")
+ echo "✅ '$RELEASE_BRANCH' added to the Antora playbook."
+fi
+
+########################################################################################################################
+# 2b. Add the released version to the DOAP file
########################################################################################################################
+if grep -q "<revision>$RELEASED_VERSION</revision>" "$DOAP"; then
+ echo "✅ $RELEASED_VERSION is already listed in the DOAP file."
+else
+ RELEASE_DATE=$(date +%Y-%m-%d)
+ # The newest release is the one named "Latest", all the others are "Legacy", so the entry
+ # that held the title up to now has to hand it over before the new one is inserted at the top.
+ if ! sed_in_place "$DOAP" -E "s|<name>Latest ([0-9][^<]*) release</name>|<name>Legacy \1 release</name>|"; then
+ echo "❌ Got non-0 exit code from demoting the previous release in the DOAP file, aborting."
+ exit 1
+ fi
+ if ! awk -v version="$RELEASED_VERSION" -v released="$RELEASE_DATE" '
+ BEGIN { done = 0 }
+ !done && /^[[:space:]]*<release>[[:space:]]*$/ {
+ print " <release>"
+ print " <Version>"
+ print " <name>Latest " version " release</name>"
+ print " <created>" released "</created>"
+ print " <revision>" version "</revision>"
+ print " </Version>"
+ print " </release>"
+ done = 1
+ }
+ { print }
+ ' "$DOAP" > "$DOAP.tmp"; then
+ echo "❌ Got non-0 exit code from adding $RELEASED_VERSION to the DOAP file, aborting."
+ exit 1
+ fi
+ if ! grep -q "<revision>$RELEASED_VERSION</revision>" "$DOAP.tmp"; then
+ echo "❌ Could not add $RELEASED_VERSION to the DOAP file, aborting."
+ echo " The list of <release> entries does not look the way this script expects."
+ rm -f "$DOAP.tmp"
+ exit 1
+ fi
+ mv "$DOAP.tmp" "$DOAP"
+ CHANGES+=("website/resources/plc4x-doap.rdf")
+ echo "✅ $RELEASED_VERSION added to the DOAP file, released on $RELEASE_DATE."
+fi
+
+########################################################################################################################
+# 2c. Add the release to the download page
+########################################################################################################################
+
+# "develop" has its own copy of the download page, published as ".../plc4x/pre-release/...". The
+# notes are taken from the RELEASE_NOTES of the release branch, because the ones on "develop" have
+# already moved on to the next version.
+
+DOWNLOAD_PAGE="$DEVELOP_WORKTREE/website/asciidoc/modules/users/pages/download.adoc"
+DOWNLOAD_PAGE_BEFORE=$(cksum < "$DOWNLOAD_PAGE")
+update_download_page "$DOWNLOAD_PAGE" "$RELEASED_VERSION" "$DIRECTORY/RELEASE_NOTES"
+if [[ "$(cksum < "$DOWNLOAD_PAGE")" != "$DOWNLOAD_PAGE_BEFORE" ]]; then
+ CHANGES+=("website/asciidoc/modules/users/pages/download.adoc")
+fi
+
########################################################################################################################
-# TODO: Add this version to the website/resources/plc4x-doap.rdf file (On HEAD)
+# 2d. Commit and push whatever changed
########################################################################################################################
+if [[ ${#CHANGES[@]} -eq 0 ]]; then
+ echo "✅ The website configuration on 'develop' was already up to date."
+else
+ if ! git -C "$DEVELOP_WORKTREE" add "${CHANGES[@]}"; then
+ echo "❌ Got non-0 exit code from adding the changed files, aborting."
+ exit 1
+ fi
+ if ! git -C "$DEVELOP_WORKTREE" commit -m "chore: added $RELEASED_VERSION to the website configuration."; then
+ echo "❌ Got non-0 exit code from committing the changed files, aborting."
+ exit 1
+ fi
+ if ! git -C "$DEVELOP_WORKTREE" push origin HEAD:develop; then
+ echo "❌ Got non-0 exit code from pushing to 'develop', aborting."
+ echo " Someone probably pushed to 'develop' in the meantime - re-run this script."
+ exit 1
+ fi
+ echo "✅ Pushed to 'develop': ${CHANGES[*]}"
+ echo " Your local 'develop' is now behind by that commit - remember to pull it."
+fi
+
+cleanup_develop_worktree
+trap - EXIT
+
+# NOTE: Old releases are not removed from the Antora playbook automatically - decide for yourself
+# how many of them the website should keep building.
+
########################################################################################################################
-# TODO: Add the new version to the download page
+# 3. Draft the [RESULT] and [ANNOUNCE] emails
########################################################################################################################
+# Like the [VOTE] and [DISCUSS] emails drafted by 'release-2-prepare-release.sh', these are
+# written to files for you to read and send yourself - nothing is sent from here. They are drafted
+# before anything is published, so that a run that stops at the confirmation below still leaves you
+# with the [RESULT] email needed to close the vote.
+
+
+if ! command -v svn > /dev/null; then
+ echo "❌ 'svn' not found, but it is needed to publish the release artifacts, aborting."
+ exit 1
+fi
+
+# Everything below reads SVN to decide what to publish, so make sure we can actually see it. A
+# listing that fails because of the network, a proxy or missing credentials looks exactly like
+# "nothing is staged", and acting on that would mean publishing the wrong thing.
+if ! svn ls "$DIST_DEV/" > /dev/null 2>&1; then
+ echo "❌ Could not list $DIST_DEV, aborting."
+ echo " Fix the connection (or your SVN credentials) and run this again."
+ exit 1
+fi
+if ! svn ls "$DIST_RELEASE/" > /dev/null 2>&1; then
+ echo "❌ Could not list $DIST_RELEASE, aborting."
+ exit 1
+fi
+
+# Which release candidate won the vote: the highest numbered one that is still staged. Empty means
+# there is genuinely nothing staged any more - the release was published and cleaned up already.
+RELEASE_CANDIDATE=$(svn ls "$DIST_DEV/$RELEASED_VERSION/" 2>/dev/null \
+ | grep -E '^rc[0-9]+/$' | sed 's|/$||' | sort -V | tail -1)
+# Only ever used for the subject of the [RESULT] mail, never to decide what gets published.
+RELEASE_CANDIDATE_LABEL=${RELEASE_CANDIDATE:-rc1}
+
+STAGE_DIR="$DIRECTORY/out/stage"
+mkdir -p "$STAGE_DIR"
+
+echo
+echo "The [RESULT] email needs the vote count."
+read -r -p "Number of +1 votes by PMC members: " VOTES_PMC
+read -r -p "Number of +1 votes by non-PMC members: " VOTES_NON_PMC
+VOTES_PMC=${VOTES_PMC:-0}
+VOTES_NON_PMC=${VOTES_NON_PMC:-0}
+
+cat > "$STAGE_DIR/result-email.eml" <<EOF
+To: dev@plc4x.apache.org
+Subject: [RESULT] [VOTE] Apache PLC4X $RELEASED_VERSION $(echo "$RELEASE_CANDIDATE_LABEL" | tr '[:lower:]' '[:upper:]')
+Content-Type: text/plain; charset=UTF-8
+
+So, the vote passes with $VOTES_PMC +1 votes by PMC members and $VOTES_NON_PMC +1 votes by non PMC members.
+
+Thanks to everyone who took the time to validate the release.
+
+I will continue with the release process and will announce the release as soon as the
+artifacts have made it to the mirrors.
+EOF
+echo "✅ Result email generated to $STAGE_DIR/result-email.eml"
+
+cat > "$STAGE_DIR/announce-email.eml" <<EOF
+To: announce@apache.org
+Cc: dev@plc4x.apache.org
+Subject: [ANNOUNCE] Apache PLC4X $RELEASED_VERSION released
+Content-Type: text/plain; charset=UTF-8
+
+The Apache PLC4X team is pleased to announce the release of Apache PLC4X $RELEASED_VERSION
+
+PLC4X is a set of libraries for communicating with industrial programmable
+logic controllers (PLCs) using a variety of protocols but with a shared API.
+
+The current release contains drivers able to communicate with industrial PLCs using one of the following protocols:
+
+ * AB-ETH
+ * Beckhoff ADS
+ * CanOpen
+ * EtherNet/IP / EIP
+ * Firmata
+ * KNXNet/IP
+ * Modbus
+ * OPC UA
+ * Siemens S7 (0x32)
+
+Beyond that we also provide integration modules for the following Apache projects and frameworks:
+
+ * Apache Calcite
+ * Apache Camel
+ * Apache Kafka (Kafka Connect)
+ * Apache NiFi
+ * Logstash
+
+It also provides an \`OPC UA Server\` which can act as a bridge between legacy systems and OPC UA.
+
+Visit the Apache PLC4X website [1] for general information or
+the downloads page [2] for release notes and download information.
+
+Regards,
+The Apache PLC4X team
+
+[1] https://plc4x.apache.org
+[2] https://plc4x.apache.org/plc4x/latest/users/download.html
+EOF
+echo "✅ Announce email generated to $STAGE_DIR/announce-email.eml"
+echo " Send it from your @apache.org address, and only after the mirrors have had 24 hours."
+echo " Check the list of drivers and integrations in it - it is not generated from anything."
+
########################################################################################################################
-# TODO: Add the release branch to the website/antora-playbook.yml file on "develop"
+# 4. Publish the release artifacts
########################################################################################################################
+# This is the point of no return: moving the release candidate inside the Apache SVN makes it
+# available to the mirrors, and releasing the Nexus staging repository pushes the Maven artifacts
+# to the Apache release repository, from where they are synced to Maven Central. Neither can be
+# undone, which is also why the announcement has to wait 24 hours after this.
+
########################################################################################################################
-# TODO: Update the website generation config to now serve the newly released version, make that the
-# default (website/antora-playbook.yml on HEAD)
+# 4a. Work out which Nexus staging repository to release
########################################################################################################################
+# The staging repository id was written by 'release-2-prepare-release.sh'. That file lives in
+# "out", which does not survive 'release-0-update-generated-code.sh' and is not there at all if
+# this script runs on a different machine - so fall back to asking.
+DEPLOY_PROPS="$DIRECTORY/out/.local-artifacts-dir/$STAGING_PROFILE_ID.properties"
+STAGING_REPO_ID=""
+if [[ -f "$DEPLOY_PROPS" ]]; then
+ STAGING_REPO_ID=$(grep stagingRepository.id "$DEPLOY_PROPS" | cut -d= -f2 | tr -d ' \r')
+fi
+if [[ -z "$STAGING_REPO_ID" ]]; then
+ echo "Could not determine the Nexus staging repository from '$DEPLOY_PROPS'."
+ echo "It is the last part of the URL in [1] of the VOTE email, for example 'orgapacheplc4x-1234'."
+ read -r -p "Nexus staging repository id: " STAGING_REPO_ID
+fi
+if [[ -z "$STAGING_REPO_ID" ]]; then
+ echo "❌ No Nexus staging repository id given, aborting."
+ exit 1
+fi
+
########################################################################################################################
-# TODO: Move the release candidate from the dev part of svn to the release part
+# 4b. Move the release candidate to the release part of SVN
########################################################################################################################
+SVN_ALREADY_PUBLISHED=false
+if svn ls "$DIST_RELEASE/$RELEASED_VERSION/" > /dev/null 2>&1; then
+ SVN_ALREADY_PUBLISHED=true
+ echo "✅ $RELEASED_VERSION is already published under $DIST_RELEASE."
+else
+ if [[ -z "$RELEASE_CANDIDATE" ]]; then
+ echo "❌ Found no release candidate under $DIST_DEV/$RELEASED_VERSION/, aborting."
+ echo " Did 'release-2-prepare-release.sh' stage this release?"
+ exit 1
+ fi
+
+ echo
+ echo "About to publish Apache PLC4X $RELEASED_VERSION. This cannot be undone:"
+ echo " - SVN: $DIST_DEV/$RELEASED_VERSION/$RELEASE_CANDIDATE"
+ echo " -> $DIST_RELEASE/$RELEASED_VERSION"
+ echo " - Nexus: releasing staging repository '$STAGING_REPO_ID' to the Apache release repo,"
+ echo " from where it is synced to Maven Central."
+ read -r -p "Publish? (yes/no) " yn
+ case $yn in
+ yes ) echo "Publishing.";;
+ no ) echo "Nothing published. The documentation changes above are already done.";
+ exit 1;;
+ * ) echo "invalid response";
+ exit 1;;
+ esac
+
+ if ! svn move -m "Release Apache PLC4X $RELEASED_VERSION" \
+ "$DIST_DEV/$RELEASED_VERSION/$RELEASE_CANDIDATE" \
+ "$DIST_RELEASE/$RELEASED_VERSION"; then
+ echo "❌ Got non-0 exit code from moving the release candidate in SVN, aborting."
+ exit 1
+ fi
+ echo "✅ $RELEASE_CANDIDATE published as $DIST_RELEASE/$RELEASED_VERSION."
+ echo " The mirrors need up to 24 hours to pick this up - do not announce before that."
+fi
+
########################################################################################################################
-# TODO: Release the Nexus staging repository
+# 4c. Release the Nexus staging repository
########################################################################################################################
-# TODO: mvn nexus-staging:rc-release
+# Unlike the steps above there is no cheap way to ask Nexus whether this repository has already
+# been released, so if SVN says the release is already out, this is most likely a re-run and
+# releasing again would just fail. Ask instead of guessing - it is also the way to recover from a
+# run where the SVN move succeeded and this step did not.
+if [[ "$SVN_ALREADY_PUBLISHED" == "true" ]]; then
+ echo
+ echo "$RELEASED_VERSION was already published in SVN, so the Nexus staging repository"
+ echo "'$STAGING_REPO_ID' has probably been released already too."
+ read -r -p "Try to release it anyway? (yes/no) " yn
+ if [[ "$yn" != "yes" ]]; then
+ echo "✅ Leaving the Nexus staging repository alone."
+ STAGING_REPO_ID=""
+ fi
+fi
+
+if [[ -n "$STAGING_REPO_ID" ]]; then
+if ! "$DIRECTORY/mvnw" -f "$DIRECTORY/tools/stage.pom" nexus-staging:rc-release \
+ -DstagingRepositoryId="$STAGING_REPO_ID" -DstagingProfileId=$STAGING_PROFILE_ID; then
+ echo "❌ Got non-0 exit code from releasing the Nexus staging repository."
+ echo " If it was already released, this is expected and can be ignored - check"
+ echo " $NEXUS_URL under 'Staging Repositories'."
+ exit 1
+fi
+echo "✅ Nexus staging repository '$STAGING_REPO_ID' released."
+fi
+
+########################################################################################################################
+# 5. Clean up what the release left behind
+########################################################################################################################
########################################################################################################################
-# TODO: Move the released RC to the dev section in SVN
+# 5a. Remove the release candidates that did not make it from SVN
########################################################################################################################
+# Only the winning release candidate was moved to the release part of SVN, so every earlier
+# attempt is still sitting in the dev part, together with the now pointless version directory.
+# None of it is needed once the release is out.
+
+if svn ls "$DIST_RELEASE/$RELEASED_VERSION/" > /dev/null 2>&1 \
+ && svn ls "$DIST_DEV/$RELEASED_VERSION/" > /dev/null 2>&1; then
+ echo
+ echo "These leftovers of $RELEASED_VERSION are still staged under $DIST_DEV/$RELEASED_VERSION:"
+ svn ls -R "$DIST_DEV/$RELEASED_VERSION/" | sed 's|^| |'
+ read -r -p "Remove them? (yes/no) " yn
+ if [[ "$yn" == "yes" ]]; then
+ if ! svn rm -m "Removed the staged release candidates of PLC4X $RELEASED_VERSION" \
+ "$DIST_DEV/$RELEASED_VERSION"; then
+ echo "❌ Got non-0 exit code from removing the staged release candidates, aborting."
+ exit 1
+ fi
+ echo "✅ Removed $DIST_DEV/$RELEASED_VERSION."
+ else
+ echo "✅ Leaving the staged release candidates alone."
+ fi
+else
+ echo "✅ Nothing of $RELEASED_VERSION left to clean up in SVN."
+fi
+
########################################################################################################################
-# TODO: Clean up any unsuccessful released in the staging area
+# 5b. Remove the previous release from the mirrors
########################################################################################################################
+# A lot of mirrors serve our releases, so Apache policy is that only the current one stays in the
+# release part of SVN. Older releases remain available from archive.apache.org, and
+# downloads.apache.org redirects to it for anything it no longer carries, so the links on the
+# download page keep working.
+#
+# Only directories that look like a version are considered - "KEYS", "build-tools" and
+# "plc4x-extras" live in the same place and are none of our business here.
+
+# Only versions OLDER than the one just released. Excluding just "$RELEASED_VERSION" would, for a
+# bugfix release off an old branch (0.13.2 while 1.0.0 is current), offer to delete 1.0.0 - the
+# release people are actually downloading.
+OLD_RELEASES=$(svn ls "$DIST_RELEASE/" 2>/dev/null \
+ | grep -E '^[0-9]+\.[0-9]+\.[0-9]+/$' | sed 's|/$||' \
+ | while read -r candidate; do
+ if [[ "$candidate" != "$RELEASED_VERSION" ]] \
+ && [[ "$(printf '%s\n%s\n' "$candidate" "$RELEASED_VERSION" | sort -V | head -1)" == "$candidate" ]]; then
+ echo "$candidate"
+ fi
+ done || true)
+
+if [[ -z "$OLD_RELEASES" ]]; then
+ echo "✅ $DIST_RELEASE only carries $RELEASED_VERSION."
+else
+ echo
+ echo "These older releases are still being served by the mirrors:"
+ echo "$OLD_RELEASES" | sed 's|^| |'
+ echo "They stay available from https://archive.apache.org/dist/plc4x/ after removal."
+ read -r -p "Remove them? (yes/no) " yn
+ if [[ "$yn" == "yes" ]]; then
+ # shellcheck disable=SC2046
+ if ! svn rm -m "Removed the older releases of PLC4X now that $RELEASED_VERSION is out" \
+ $(echo "$OLD_RELEASES" | sed "s|^|$DIST_RELEASE/|"); then
+ echo "❌ Got non-0 exit code from removing the older releases, aborting."
+ exit 1
+ fi
+ echo "✅ Removed: $(echo "$OLD_RELEASES" | tr '\n' ' ')"
+ else
+ echo "✅ Leaving the older releases in place."
+ fi
+fi
+
########################################################################################################################
-# TODO: Send out the [NOTICE] email
+# 5c. Drop the staging repositories that were never released
########################################################################################################################
+
+# A vote that had to be repeated leaves a closed staging repository behind for every attempt.
+# Nexus does not tell us which of them belong to which attempt in any way we could rely on, so
+# rather than guessing this lists what is there and lets you pick.
+
+echo
+echo "Staging repositories currently on $NEXUS_URL:"
+# No "-q" here: the repository table is printed at INFO level, and quiet mode would leave the
+# prompt below asking for ids from a listing that was never shown.
+if ! "$DIRECTORY/mvnw" -f "$DIRECTORY/tools/stage.pom" nexus-staging:rc-list; then
+ echo "⚠️ Could not list the staging repositories - check them by hand at"
+ echo " $NEXUS_URL under 'Staging Repositories'."
+else
+ echo
+ echo "Enter the ids of the repositories that should be dropped, separated by ','."
+ echo "Leave empty to keep all of them. The one released above is already gone."
+ read -r -p "Drop: " DROP_REPOS
+ DROP_REPOS=${DROP_REPOS// /}
+ if [[ -z "$DROP_REPOS" ]]; then
+ echo "✅ Keeping all staging repositories."
+ else
+ read -r -p "Really drop '$DROP_REPOS'? (yes/no) " yn
+ if [[ "$yn" != "yes" ]]; then
+ echo "✅ Keeping all staging repositories."
+ elif ! "$DIRECTORY/mvnw" -f "$DIRECTORY/tools/stage.pom" nexus-staging:rc-drop \
+ -DstagingRepositoryId="$DROP_REPOS"; then
+ echo "❌ Got non-0 exit code from dropping the staging repositories, aborting."
+ exit 1
+ else
+ echo "✅ Dropped: $DROP_REPOS"
+ fi
+ fi
+fi
diff --git a/tools/release-abort.sh b/tools/release-abort.sh
index 790db3c0a8..82c1ea34b5 100755
--- a/tools/release-abort.sh
+++ b/tools/release-abort.sh
@@ -19,25 +19,123 @@
# under the License.
# ----------------------------------------------------------------------------
-DIRECTORY=$(pwd)
-PRE_RELEASE_VERSION=0.13.0-SNAPSHOT
+# Resolve the project directory from the location of this script, so that it does not matter which
+# directory it is started from. This used to be "$(pwd)" with a "find .." further down, which
+# deleted files from the PARENT of the checkout - and that is where the plc4x-build-tools and
+# plc4x-extras checkouts usually live - whenever the script was not started from "tools".
+DIRECTORY="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
-# Set the local development version back to the initial one.
-docker compose run releaser bash /ws/mvnw -e -P with-c,with-dotnet,with-go,with-java,with-python,update-generated-code -Dmaven.repo.local=/ws/out/.repository versions:set -DnewVersion="$PRE_RELEASE_VERSION"
+########################################################################################################################
+# 1. Work out what to roll the versions back to
+########################################################################################################################
-# Delete left-over files from the last attempt.
-find .. -type f -name 'release.properties' -delete
-find .. -type f -name 'pom.xml.versionsBackup' -delete
-find .. -type f -name 'pom.xml.releaseBackup' -delete
+# Maven 4 prefixes even quiet output with "[INFO] [stdout] ", so take the last token of the
+# last line rather than the whole output.
+CURRENT_VERSION=$("$DIRECTORY/mvnw" -f "$DIRECTORY/pom.xml" -q -Dexec.executable=echo -Dexec.args="\${project.version}" --non-recursive exec:exec | tail -n 1 | awk '{print $NF}')
-# delete branch locally
-echo "git branch -d rel/{version-short}"
+# The version to go back to cannot be derived reliably: after "release:branch" the poms hold the
+# next minor version, after "release:prepare" the next bugfix version, and in between the release
+# version itself. So take it as an argument, or ask.
+PRE_RELEASE_VERSION="$1"
+if [[ -z "$PRE_RELEASE_VERSION" ]]; then
+ echo "The poms currently say: $CURRENT_VERSION"
+ read -r -p "Which version should they be set back to? " PRE_RELEASE_VERSION
+fi
+if [[ -z "$PRE_RELEASE_VERSION" ]]; then
+ echo "❌ No version given, aborting."
+ exit 1
+fi
+if [[ ! "$PRE_RELEASE_VERSION" =~ -SNAPSHOT$ ]]; then
+ echo "❌ '$PRE_RELEASE_VERSION' is not a SNAPSHOT version, aborting."
+ echo " The development version is what this rolls back to, for example 1.0.0-SNAPSHOT."
+ exit 1
+fi
-# delete branch remotely
-echo "git push origin --delete rel/{version-short}"
+RELEASE_VERSION=${PRE_RELEASE_VERSION%"-SNAPSHOT"}
+IFS='.' read -ra VERSION_SEGMENTS <<< "$RELEASE_VERSION"
+BRANCH_NAME="rel/${VERSION_SEGMENTS[0]}.${VERSION_SEGMENTS[1]}"
+TAG_NAME="v$RELEASE_VERSION"
-# delete tag locally
-echo "git tag -d v{version}"
+echo "Rolling back to: $PRE_RELEASE_VERSION"
+echo "Release branch: $BRANCH_NAME"
+echo "Release tag: $TAG_NAME"
-# delete tag remotely
-echo "git push origin --delete v{version}"
+########################################################################################################################
+# 2. Set the versions back (Docker container)
+########################################################################################################################
+
+if ! docker compose -f "$DIRECTORY/tools/docker-compose.yaml" run releaser \
+ bash /ws/mvnw -e -P with-c,with-dotnet,with-go,with-java,with-python,update-generated-code \
+ -Dmaven.repo.local=/ws/out/.repository versions:set -DprocessAllModules=true -DnewVersion="$PRE_RELEASE_VERSION"; then
+ echo "❌ Got non-0 exit code from setting the versions back, aborting."
+ exit 1
+fi
+
+########################################################################################################################
+# 3. Delete the files the release plugin left behind (local)
+########################################################################################################################
+
+find "$DIRECTORY" -type f -name 'release.properties' -delete
+find "$DIRECTORY" -type f -name 'pom.xml.versionsBackup' -delete
+find "$DIRECTORY" -type f -name 'pom.xml.releaseBackup' -delete
+echo "✅ Removed the left-over release.properties and pom backup files."
+
+########################################################################################################################
+# 4. Delete the release branch and the tag
+########################################################################################################################
+
+# These are separate questions because an attempt can fail before either of them was created, and
+# because deleting them on the remote is not something to do by accident.
+delete_ref() {
+ local kind="$1" name="$2" local_cmd="$3" remote_cmd="$4"
+ local exists_local=false exists_remote=false
+ if [[ "$kind" == "branch" ]]; then
+ git -C "$DIRECTORY" show-ref --verify --quiet "refs/heads/$name" && exists_local=true
+ else
+ git -C "$DIRECTORY" show-ref --verify --quiet "refs/tags/$name" && exists_local=true
+ fi
+ git -C "$DIRECTORY" ls-remote --exit-code origin "$name" > /dev/null 2>&1 && exists_remote=true
+
+ if [[ "$exists_local" == false && "$exists_remote" == false ]]; then
+ echo "✅ No $kind '$name' to delete."
+ return 0
+ fi
+ echo
+ echo "$kind '$name' exists: local=$exists_local remote=$exists_remote"
+ read -r -p "Delete it? (yes/no) " yn
+ if [[ "$yn" != "yes" ]]; then
+ echo "✅ Keeping $kind '$name'."
+ return 0
+ fi
+ if [[ "$exists_local" == true ]]; then
+ eval "$local_cmd" || echo "⚠️ Could not delete the local $kind '$name'."
+ fi
+ if [[ "$exists_remote" == true ]]; then
+ eval "$remote_cmd" || echo "⚠️ Could not delete the remote $kind '$name'."
+ fi
+ echo "✅ Deleted $kind '$name'."
+}
+
+delete_ref tag "$TAG_NAME" \
+ "git -C \"$DIRECTORY\" tag -d \"$TAG_NAME\"" \
+ "git -C \"$DIRECTORY\" push origin --delete \"$TAG_NAME\""
+delete_ref branch "$BRANCH_NAME" \
+ "git -C \"$DIRECTORY\" branch -D \"$BRANCH_NAME\"" \
+ "git -C \"$DIRECTORY\" push origin --delete \"$BRANCH_NAME\""
+
+########################################################################################################################
+# 5. What this does not undo
+########################################################################################################################
+
+cat <<EOF
+
+Not undone by this script - check these by hand:
+ - Commits already pushed to 'develop' by 'release-1-create-branch.sh': the finalized
+ RELEASE_NOTES, the new section for the next version and the version in
+ website/asciidoc/antora.yml.
+ - A release candidate staged in SVN under https://dist.apache.org/repos/dist/dev/plc4x/
+ ("svn rm" it).
+ - A Nexus staging repository opened by 'release-2-prepare-release.sh'
+ (drop it at https://repository.apache.org).
+ - The drafted emails in out/stage.
+EOF
diff --git a/tools/release-common.sh b/tools/release-common.sh
new file mode 100644
index 0000000000..adc8c441f6
--- /dev/null
+++ b/tools/release-common.sh
@@ -0,0 +1,38 @@
+# ----------------------------------------------------------------------------
+# 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
+#
+# https://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.
+# ----------------------------------------------------------------------------
+# shellcheck shell=bash
+# shellcheck disable=SC2034 # these are consumed by the scripts that source this file
+
+# Values that more than one of the release scripts has to agree on. Sourced by
+# "release-2-prepare-release.sh", "release-3-finish-release.sh" and "validate-release.sh" - it is
+# not meant to be executed.
+
+# The Nexus staging profile of "org.apache.plc4x". If deploying to Nexus starts failing with
+# "404 not found", this is the first thing to check: log in to $NEXUS_URL, open "Staging Profiles",
+# select "org.apache.plc4x" and take the id out of the browser URL after "#stagingProfiles;".
+STAGING_PROFILE_ID=15cd9d785359f8
+
+NEXUS_URL="https://repository.apache.org"
+
+# Where release candidates are staged and where releases end up. Everything below
+# https://dist.apache.org/repos/dist/ needs an Apache committer account to write to.
+DIST_BASE="https://dist.apache.org/repos/dist"
+DIST_DEV="$DIST_BASE/dev/plc4x"
+DIST_RELEASE="$DIST_BASE/release/plc4x"
+KEYS_URL="$DIST_RELEASE/KEYS"
diff --git a/tools/validate-release.sh b/tools/validate-release.sh
index 885ec25f4d..cb7ea4b27c 100755
--- a/tools/validate-release.sh
+++ b/tools/validate-release.sh
@@ -19,6 +19,18 @@
# under the License.
# ----------------------------------------------------------------------------
+# Resolve the project directory from the location of this script, so that it does not matter which
+# directory it is started from.
+DIRECTORY="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
+# Values shared with the other release scripts (Nexus staging profile, dist.apache.org URLs).
+if [[ ! -f "$DIRECTORY/tools/release-common.sh" ]]; then
+ echo "❌ '$DIRECTORY/tools/release-common.sh' not found, aborting."
+ exit 1
+fi
+# shellcheck source=release-common.sh
+source "$DIRECTORY/tools/release-common.sh"
+
+
########################################################################################################################
# 0. Check Docker Memory Availability
########################################################################################################################
@@ -43,18 +55,47 @@ if (( TOTAL_MEM < REQUIRED_MEM )); then
fi
########################################################################################################################
-# 1. Check if the release properties file exists.
+# 1. Check that this is actually a release, and not a development checkout
########################################################################################################################
+# "artifact:compare" compares what is built here against what is staged in Nexus. That only means
+# anything if this really is the release: run against a "develop" checkout it would compare
+# SNAPSHOT artifacts against a release repository and report differences that say nothing about
+# the release candidate.
+
+# Maven 4 prefixes even quiet output with "[INFO] [stdout] ", so take the last token of the
+# last line rather than the whole output.
+PROJECT_VERSION=$("$DIRECTORY/mvnw" -f "$DIRECTORY/pom.xml" -q -Dexec.executable=echo -Dexec.args="\${project.version}" --non-recursive exec:exec | tail -n 1 | awk '{print $NF}')
+if [[ -z "$PROJECT_VERSION" ]]; then
+ echo "❌ Could not determine the project version, aborting."
+ exit 1
+fi
+if [[ "$PROJECT_VERSION" =~ -SNAPSHOT$ ]]; then
+ echo "❌ This is a SNAPSHOT checkout ($PROJECT_VERSION), aborting."
+ echo " Unpack the staged apache-plc4x-<version>-source-release.zip and run this in there,"
+ echo " or check out the release tag."
+ exit 1
+fi
+echo "✅ Validating Apache PLC4X $PROJECT_VERSION"
+
########################################################################################################################
# 2. Do a simple release-perform command skip signing of artifacts and deploy to local directory
# (inside the Docker container)
########################################################################################################################
echo "Validate Release:"
-docker compose build
-if ! docker compose run releaser bash /ws/mvnw -e -P with-java -Dmaven.repo.local=/ws/out/.repository -Dreference.repo=https://repository.apache.org/content/repositories/staging/ -Dbuildinfo.reproducible verify artifact:compare;
-then
+if ! docker compose -f "$DIRECTORY/tools/docker-compose.yaml" build; then
+ echo "❌ Got non-0 exit code from building the release docker container, aborting."
+ exit 1
+fi
+
+# Only the Java artifacts are compared: the C, .Net and Python ones are either platform specific or
+# not published to Maven at all, so there is nothing in the staging repository to compare them to.
+if ! docker compose -f "$DIRECTORY/tools/docker-compose.yaml" run releaser \
+ bash /ws/mvnw -e -P with-java -Dmaven.repo.local=/ws/out/.repository \
+ -Dreference.repo="$NEXUS_URL/content/repositories/staging/" \
+ -Dbuildinfo.reproducible verify artifact:compare; then
echo "❌ Got non-0 exit code from docker compose, aborting."
exit 1
fi
+echo "✅ The build of $PROJECT_VERSION matches the staged artifacts."
(plc4x) 02/03: chore: Updated the github templates to the current state of drivers.
Posted by cd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chrisdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
commit 2d759dc0d0b9cbefdde2ed09d27cd5555be4eb9d
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Sat Aug 29 18:24:31 2026 +0200
chore: Updated the github templates to the current state of drivers.
---
.github/ISSUE_TEMPLATE/bug.yml | 7 +++++--
.github/ISSUE_TEMPLATE/feature.yml | 11 ++++++++---
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml
index d0b6592308..1fd1638812 100644
--- a/.github/ISSUE_TEMPLATE/bug.yml
+++ b/.github/ISSUE_TEMPLATE/bug.yml
@@ -45,7 +45,7 @@ body:
attributes:
label: Version
description: "Which version are you using?"
- placeholder: "v0.10.0"
+ placeholder: "v1.0.0"
validations:
required: true
- type: checkboxes
@@ -76,6 +76,9 @@ body:
- label: "KNXnet/IP"
- label: "Modbus"
- label: "OPC-UA"
+ - label: "PLC4X"
- label: "Profinet"
- label: "S7"
- - label: "S7-light"
+ - label: "Simulated"
+ - label: "SLMP"
+ - label: "UMAS"
diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml
index e05bf45070..a52722f51d 100644
--- a/.github/ISSUE_TEMPLATE/feature.yml
+++ b/.github/ISSUE_TEMPLATE/feature.yml
@@ -55,12 +55,17 @@ body:
- label: "AB-Ethernet"
- label: "ADS /AMS"
- label: "BACnet/IP"
+ - label: "C-Bus"
- label: "CANopen"
- - label: "DeltaV"
- - label: "DF1"
- label: "EtherNet/IP"
- label: "Firmata"
+ - label: "IEC-69870"
- label: "KNXnet/IP"
- label: "Modbus"
- label: "OPC-UA"
- - label: "S7"
\ No newline at end of file
+ - label: "PLC4X"
+ - label: "Profinet"
+ - label: "S7"
+ - label: "Simulated"
+ - label: "SLMP"
+ - label: "UMAS"
\ No newline at end of file
(plc4x) 03/03: doc: Updated the links on the website. (switched from "link:" to "xref:" where possible, as this is validated at build time)
Posted by cd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chrisdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
commit bd550aff7b74e739cdf23d2189c090273dd16a47
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Sat Aug 29 19:00:44 2026 +0200
doc: Updated the links on the website. (switched from "link:" to "xref:" where possible, as this is validated at build time)
doc: Updated any links withing non-website resources (md, adoc files)
doc: Added a page for getting in contact with the project.
chore: Updated the website build to handle the versions simpler.
---
README.md | 2 +-
plc4j/transports/cotp/README.md | 2 +-
plc4py/pyproject.toml | 2 +-
website/antora-playbook.yml | 11 +
website/asciidoc/antora.yml | 5 +-
website/asciidoc/modules/developers/nav.adoc | 4 -
.../modules/developers/pages/building.adoc | 4 +-
.../modules/developers/pages/code-gen/index.adoc | 4 +-
.../modules/developers/pages/conferences.adoc | 14 +-
.../asciidoc/modules/developers/pages/index.adoc | 10 +-
.../developers/pages/infrastructure/website.adoc | 14 +-
.../modules/developers/pages/maturity.adoc | 22 +-
.../modules/developers/pages/preparing/index.adoc | 6 +-
.../modules/developers/pages/protocols/index.adoc | 25 -
.../developers/pages/release/build-tools.adoc | 2 +-
.../modules/developers/pages/release/release.adoc | 704 ++++++++++-----------
.../developers/pages/release/validation.adoc | 19 +-
website/asciidoc/modules/users/nav.adoc | 1 +
website/asciidoc/modules/users/pages/adopters.adoc | 4 +-
.../users/pages/blogs-videos-and-slides.adoc | 3 +-
.../modules/users/pages/commercial-support.adoc | 2 +-
website/asciidoc/modules/users/pages/contact.adoc | 125 ++++
website/asciidoc/modules/users/pages/download.adoc | 4 +-
.../pages/getting-started/general-concepts.adoc | 6 +-
.../modules/users/pages/getting-started/index.adoc | 6 +-
.../users/pages/getting-started/plc4go.adoc | 4 +-
website/asciidoc/modules/users/pages/index.adoc | 12 +-
.../users/pages/integrations/apache-kafka.adoc | 2 +-
.../users/pages/integrations/apache-nifi.adoc | 4 +-
.../users/pages/integrations/eclipse-milo.adoc | 20 +-
.../modules/users/pages/protocols/can.adoc | 10 +-
.../modules/users/pages/protocols/df1.adoc | 2 +-
.../modules/users/pages/protocols/opcua.adoc | 6 +-
.../modules/users/pages/tools/testing.adoc | 24 +-
.../modules/users/pages/transports/can.adoc | 4 +-
.../modules/users/pages/transports/index.adoc | 14 +-
website/asciidoc/modules/users/partials/opcua.adoc | 7 +-
website/resources/plc4x-doap.rdf | 2 +-
38 files changed, 588 insertions(+), 524 deletions(-)
diff --git a/README.md b/README.md
index 8f2e79000d..370aefbdba 100644
--- a/README.md
+++ b/README.md
@@ -93,7 +93,7 @@ The project is currently split up into three repositories, the `plc4x`, `plc4x-b
To be able to build all parts of the `plc4x-extras` repository, at least `Java 21` is required.
See the PLC4J user guide on the website to start using PLC4X in your Java application:
-[https://plc4x.apache.org/plc4x/latest/users/getting-started/plc4j.html](https://plc4x.apache.org/users/getting-started/plc4j.html)
+[https://plc4x.apache.org/plc4x/latest/users/getting-started/plc4j.html](https://plc4x.apache.org/plc4x/latest/users/getting-started/plc4j.html)
## Developers
diff --git a/plc4j/transports/cotp/README.md b/plc4j/transports/cotp/README.md
index c07b7c4631..40af01e399 100644
--- a/plc4j/transports/cotp/README.md
+++ b/plc4j/transports/cotp/README.md
@@ -223,4 +223,4 @@ Log output includes:
- RFC 1006: ISO Transport Service on top of the TCP
- ISO 8073: Connection Oriented Transport Protocol
-- [COTP Protocol Specification](/protocols/cotp/src/main/resources/protocols/cotp/cotp.mspec)
+- [COTP Protocol Specification](../../../protocols/cotp/src/main/resources/protocols/cotp/cotp.mspec)
diff --git a/plc4py/pyproject.toml b/plc4py/pyproject.toml
index b4abd5faad..cc460d1773 100644
--- a/plc4py/pyproject.toml
+++ b/plc4py/pyproject.toml
@@ -56,7 +56,7 @@ authors=[
[project.urls]
HomePage="https://plc4x.apache.org"
Repository="https://github.com/apache/plc4x"
-Documentation = "https://plc4x.apache.org/users/getting-started/plc4py.html"
+Documentation = "https://plc4x.apache.org/plc4x/latest/users/getting-started/plc4py.html"
[project.optional-dependencies]
dev = [
diff --git a/website/antora-playbook.yml b/website/antora-playbook.yml
index bed7199151..f9306c37b3 100644
--- a/website/antora-playbook.yml
+++ b/website/antora-playbook.yml
@@ -30,6 +30,17 @@ content:
- url: https://github.com/apache/plc4x.git
branches: ['rel/0.12']
start_path: website/asciidoc
+# Every branch names its own concrete version in "website/asciidoc/antora.yml"
+# (see the "sync-antora-version" comment there). These two keys map the newest of
+# them onto a stable URL segment, so that the branches never have to know whether
+# they happen to be the current release:
+# - the newest non-prerelease version is served as ".../plc4x/latest/..."
+# - the newest prerelease version (always "develop") as ".../plc4x/pre-release/..."
+# Antora skips prereleases when picking the latest version, and picks it by version
+# sorting, so creating a newer release branch demotes the previous one automatically.
+urls:
+ latest_version_segment: latest
+ latest_prerelease_version_segment: pre-release
ui:
bundle:
url: https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/HEAD/raw/build/ui-bundle.zip?job=bundle-stable
diff --git a/website/asciidoc/antora.yml b/website/asciidoc/antora.yml
index ccdd9c4f72..fe309c590f 100644
--- a/website/asciidoc/antora.yml
+++ b/website/asciidoc/antora.yml
@@ -17,7 +17,10 @@
# under the License.
#
name: plc4x
-version: 'pre-release'
+# The concrete version this branch documents. The "urls.latest_prerelease_version_segment"
+# key in the playbook publishes it under ".../plc4x/pre-release/" for as long as it is
+# flagged as a prerelease. "release-1-create-branch.sh" maintains both values.
+version: '1.0.0'
prerelease: True
title: PLC4X
start_page: users:index.adoc
diff --git a/website/asciidoc/modules/developers/nav.adoc b/website/asciidoc/modules/developers/nav.adoc
index bfae3c6d2c..762be4164b 100644
--- a/website/asciidoc/modules/developers/nav.adoc
+++ b/website/asciidoc/modules/developers/nav.adoc
@@ -34,10 +34,6 @@
*** xref:code-gen/language/freemarker.adoc[]
*** xref:code-gen/protocol/df1.adoc[]
-** xref:protocols/index.adoc[]
-*** xref:protocols/ads/protocol.adoc[]
-*** xref:protocols/eip/protocol.adoc[]
-
** xref:infrastructure/index.adoc[]
*** xref:infrastructure/ci.adoc[]
*** xref:infrastructure/issues.adoc[]
diff --git a/website/asciidoc/modules/developers/pages/building.adoc b/website/asciidoc/modules/developers/pages/building.adoc
index 26dc42b944..92ab30aafb 100644
--- a/website/asciidoc/modules/developers/pages/building.adoc
+++ b/website/asciidoc/modules/developers/pages/building.adoc
@@ -70,7 +70,7 @@ The following profiles are available:
- `with-python`: Builds all Python related modules
- `update-code-generation`: Generates the generated code from the mspec definitions
-WARNING: As these profiles typically require some preparation and setup on your development machine, please read the link:preparing/index.html[Preparing your Computer] guide for a detailed description on this.
+WARNING: As these profiles typically require some preparation and setup on your development machine, please read the xref:preparing/index.adoc[Preparing your Computer] guide for a detailed description on this.
The minimum Apache PLC4X build will build only basic code-generation modules without support for any language:
@@ -104,7 +104,7 @@ In order to build the website the following command should be sufficient:
mvn site
-This is just a quick-start version of the site generation, for a fully detailed documentation please read the https://plc4x.apache.org/developers/infrastructure/website.html[Website] documentation page.
+This is just a quick-start version of the site generation, for a fully detailed documentation please read the xref:infrastructure/website.adoc[Website] documentation page.
== Some special Maven profiles
diff --git a/website/asciidoc/modules/developers/pages/code-gen/index.adoc b/website/asciidoc/modules/developers/pages/code-gen/index.adoc
index bfe350933c..8095b1f1c7 100644
--- a/website/asciidoc/modules/developers/pages/code-gen/index.adoc
+++ b/website/asciidoc/modules/developers/pages/code-gen/index.adoc
@@ -60,7 +60,7 @@ These modules are also maintained in a link:https://github.com/apache/plc4x-buil
This is generally only due to some restrictions in the Maven build system. If you are interested in understanding the reasons - please read the chapter on `Problems with Maven` near the end of this page.
-Concrete link:https://github.com/apache/plc4x/tree/develop/code-generation/protocol-base-mspec[protocol spec parsers], link:https://github.com/apache/plc4x/tree/develop/code-generation/language-base-freemarker[code generators] as well as link:https://github.com/apache/plc4x/tree/develop/code-generation/language-java[templates] that actually generate code are implemented in derived modules all located under the link:https://github.com/apache/plc4x/tree/develop/code-generation[code-generat [...]
+Concrete link:https://github.com/apache/plc4x/tree/develop/code-generation/protocol-base-mspec[protocol spec parsers], link:https://github.com/apache/plc4x/tree/develop/code-generation/language-base-freemarker[code generators] as well as link:https://github.com/apache/plc4x/tree/develop/code-generation/language/java[templates] that actually generate code are implemented in derived modules all located under the link:https://github.com/apache/plc4x/tree/develop/code-generation[code-generat [...]
We didn't want to tie ourselves to only one way to specify protocols and to generate code. Generally multiple types of formats for specifying drivers are thinkable and the same way, multiple ways of generating code are possible. Currently, however we only have one parser: `MSpec` and one generator: `Freemarker`.
@@ -141,7 +141,7 @@ With this we were able to provide first driver versions fully specified in XML.
The downside was, that the PLC4X community regarded this XML format as pretty complicated and when implementing an experimental code generator we quickly noticed that generating a nice object model would not be possible, due to the lack of an ability to model inheritance of types into a DFDL schema.
-In the end we came up with our own format which we called `MSpec` and is described in the link:protocol/mspec.html[MSpec Format description].
+In the end we came up with our own format which we called `MSpec` and is described in the xref:code-gen/protocol/mspec.adoc[MSpec Format description].
== Configuration
diff --git a/website/asciidoc/modules/developers/pages/conferences.adoc b/website/asciidoc/modules/developers/pages/conferences.adoc
index 4de6fddc93..9f35d26c2d 100644
--- a/website/asciidoc/modules/developers/pages/conferences.adoc
+++ b/website/asciidoc/modules/developers/pages/conferences.adoc
@@ -27,15 +27,15 @@ On this page we are listing options to attend talks and events around PLC4X.
|18th June 2019 |Erfurt (GER) |Meetup |https://www.meetup.com/de-DE/iothde/events/260140057/[IoT Thüringen] |Industrie & IoT: Die perfekte Verbindung mit Flexibus & Apache PLC4X
|24th May 2019 |Frankfurt (GER) |Meetup |https://www.meetup.com/de-DE/IoT-Hessen/events/261422034/[IoT Hessen] |Industrial IoT goes Open Source: Apache PLC4X Talks & Party
|3th April 2019 |Cologne (GER) |Conference |https://www.buildingiot.de[Building IoT] |Apache PLC4X: Industry 4.0 done our way
-|8th March 2019 |Solingen (GER) |Conference |https://www.codecentric.de/2019/02/05/industrial-iot-day-solingen[Industrial IoT Day] |Apache PLC4X: Industry 4.0 done our way
-|21th February 2019 |Aachen (GER) |Meetup | http://www.euregjug.eu/2019/01/29/episode-iv-a-new-hope-industry-40-done-our-way[EURegJUG Maas-Rhine] |Episode IV - A New Hope: Industry 4.0 Done Our Way
-|15th February 2019 |Nürtingen (GER) |Meetup | PLC4X Meetup |Special Hackathon looking deeper into some new Protocols
-|15th November 2018 |Düsseldorf (GER) |Meetup |RheinJUG |http://www.rheinjug.de/rheinjug/event/2018/11/15/wie-wir-mit-apache-plc4x-die-silos-in-der-automatisierungsindustrie-aufbrechen.html[Wie wir mit Apache PLC4X die Silos in der Automatisierungsindustrie aufbrechen]
+|8th March 2019 |Solingen (GER) |Conference |Industrial IoT Day |Apache PLC4X: Industry 4.0 done our way
+|21th February 2019 |Aachen (GER) |Meetup | EURegJUG Maas-Rhine |Episode IV - A New Hope: Industry 4.0 Done Our Way
+|15th February 2019 |Nürtingen (GER) |Meetup |PLC4X Meetup |Special Hackathon looking deeper into some new Protocols
+|15th November 2018 |Düsseldorf (GER) |Meetup |RheinJUG |https://web.archive.org/web/20250317142109/https://rheinjug.de/rheinjug/event/2018/11/15/wie-wir-mit-apache-plc4x-die-silos-in-der-automatisierungsindustrie-aufbrechen.html[Wie wir mit Apache PLC4X die Silos in der Automatisierungsindustrie aufbrechen]
|12th-13th November 2018 |Berlin (GER) |Conference |https://www.sv-veranstaltungen.de/fachbereiche/big-data-3/[3. Fachkonferenz: Industrial Analytics & Big Data in der Industrie] |Kommunikation mit Industrieanlagen ohne Umbau- und Lizenzkosten
|22th-24th October 2018 |Edinburgh (GB) |Conference |https://events.linuxfoundation.org/events/open-source-summit-europe-2018/[Open-Source Summit Europe] |Revolutionizing the production industry with Apache PLC4X
-|24th-19th September 2018 |Montreal (CAN) |Conference |http://apachecon.com/acna18/?ref=apachecon.com[ApacheCon NA 2018] |https://apachecon.dukecon.org/acna/2018/#/scheduledEvent/51feeb6f55f250c39[Revolutionizing the Production Industry with Apache PLC4X (incubating)]
+|24th-19th September 2018 |Montreal (CAN) |Conference |http://apachecon.com/acna18/?ref=apachecon.com[ApacheCon NA 2018] |https://web.archive.org/web/20191206033228/https://apachecon.dukecon.org/acna/2018/#/scheduledEvent/51feeb6f55f250c39[Revolutionizing the Production Industry with Apache PLC4X (incubating)]
|20th September 2018 |Nürtingen (GER) |Meetup |PLC4X Meetup |First general committer meetup
-|13th-14th June 2018 |Berlin (GER) |Conference |http://www.apachecon.com/euroadshow18/#[Apache EU Roadshow] |https://foss-backstage.de/session/revolutionizing-production-industry-apache-plc4x[Revolutionizing the production industry with Apache PLC4X]
+|13th-14th June 2018 |Berlin (GER) |Conference |http://www.apachecon.com/euroadshow18/#[Apache EU Roadshow] |Revolutionizing the production industry with Apache PLC4X
|4th June 2018 |Cologne (GER) |Conference |https://www.buildingiot.de/[Building IoT] |https://www.buildingiot.de/veranstaltung-6815-industrial-iot-und-edge-computing-mit-apache-plc4x-und-apache-edgent-%5Bsponsored-talk%5D.html?id=6815[Industrial IoT und Edge Computing mit Apache PLC4X und Apache Edgent]
|5th April 2018 |Hamburg (GER) |Conference |https://techcamp.hamburg/[TechCamp Hamburg] |https://techcamp.hamburg/events/revolutionizing-industrial-iot-with-apache-plc4x/[Revolutionizing Industrial IoT with Apache PLC4X]
|21th January 2018 |Hamburg (GER) |Conference |https://www.nortec-hamburg.de/[Nortec] |Mehr für Weniger? Aber Sicher!
@@ -48,4 +48,4 @@ If you've got or found any events or talks we might be missing, please inform us
== Additional Material
-link:/images/PLC4X_rollup_83x237cm-final.pdf[PLC4X Banner]
+link:https://github.com/apache/plc4x/blob/develop/media/PLC4X_rollup_83x237cm-final.pdf[PLC4X Banner]
diff --git a/website/asciidoc/modules/developers/pages/index.adoc b/website/asciidoc/modules/developers/pages/index.adoc
index 8b47ea65aa..e454fa413c 100644
--- a/website/asciidoc/modules/developers/pages/index.adoc
+++ b/website/asciidoc/modules/developers/pages/index.adoc
@@ -35,17 +35,17 @@ Using the `Maven-Wrapper` you don't even need a `Maven` installation. The build
As part of the build we have an initial build step that will do a `prerequisite check`. Depending on the activated modules, it will check if all preconditions are met and tell you what's missing.
-For details please have a look at the link:preparing/index.html[Preparing your Computer] page.
+For details please have a look at the xref:preparing/index.adoc[Preparing your Computer] page.
== Building PLC4X
-We have a dedicated page on link:building.html[Building PLC4X].
+We have a dedicated page on xref:building.adoc[Building PLC4X].
Please read this page on information about how to build Apache PLC4X.
== Contributing
-If you want to work on Apache PLC4X in order to `fix things`, `add things` and start `contributing` in general, please have a look at our link:contributing.html[Contributing] page. It should contain all the information you need.
+If you want to work on Apache PLC4X in order to `fix things`, `add things` and start `contributing` in general, please have a look at our xref:contributing.adoc[Contributing] page. It should contain all the information you need.
== Getting Help
@@ -55,6 +55,10 @@ You can search previous content in our link:++https://lists.apache.org/list.html
In order to post to the list you first need to subscribe. This can be done by sending an empty Email to dev-subscribe@plc4x.apache.org.
+The xref:users:contact.adoc[Getting in Contact] page lists all of the project's mailing lists and
+what each of them is for, as well as the other ways to reach us: the `#plc4x` channel on the Apache
+Slack, GitHub Discussions, GitHub Issues and Pull Requests.
+
diff --git a/website/asciidoc/modules/developers/pages/infrastructure/website.adoc b/website/asciidoc/modules/developers/pages/infrastructure/website.adoc
index 510708c608..ff8f24b54d 100644
--- a/website/asciidoc/modules/developers/pages/infrastructure/website.adoc
+++ b/website/asciidoc/modules/developers/pages/infrastructure/website.adoc
@@ -36,7 +36,7 @@ The site content itself is generated from `asciidoc` files (ending `.adoc`) whic
Beyond the basic goodies, the build is also configured to generate images from ASCII data using the `asciidoctor-diagram` plugin.
-This allows us to generate images like the ones on the http://plc4x.apache.org/protocols/s7/index.html[S7 Protocol Description page]
+This allows us to generate images like the ones on the xref:users:protocols/s7.adoc[S7 Protocol Description page]
== Providing new content
@@ -52,14 +52,14 @@ So if we wanted to add a new page on some (hopefully non existent) `Wombat PLC P
For example with this content:
-```
+----
= Wombat PLC Protocol
If you want to waste your money, brains and time, feel free to use a `Wombat PLC`.
In order to help you waste even more of that, we'll skip documenting anything.
-```
+----
Notice the double equals sign? This is the site Title. It seems the level `One` with only one equals sign is only used for ebook output.
@@ -83,7 +83,7 @@ In order to add links to the menus, you have to create or modify the `site.xml`
The simplest form would probably be something like this:
-```
+----
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
@@ -112,7 +112,7 @@ The simplest form would probably be something like this:
</body>
</project>
-```
+----
This will generate a `Wombat` menu at the end, and this has one link named `lalala`.
@@ -120,7 +120,7 @@ Notice that the link has to have a file ending of `.html` and not `.adoc`.
If you want to insert the menu somewhere else, you will have to re-define the entire menu.
-```
+----
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
@@ -156,7 +156,7 @@ If you want to insert the menu somewhere else, you will have to re-define the en
</body>
</project>
-```
+----
The `menu ref` items hereby reference standard menus provided by the `Maven` build.
diff --git a/website/asciidoc/modules/developers/pages/maturity.adoc b/website/asciidoc/modules/developers/pages/maturity.adoc
index 7cdc27c20c..de83e1df49 100644
--- a/website/asciidoc/modules/developers/pages/maturity.adoc
+++ b/website/asciidoc/modules/developers/pages/maturity.adoc
@@ -36,8 +36,8 @@ Community members are encouraged to contribute to this page and comment on it, t
|ID |Description |Status
|*Code* 2+|icon:check[role=green]
|CD10 |The project produces Open Source software, for distribution to the public at no charge. |icon:check[role=green] The project source code is licensed under the Apache License, version 2.0.
-|CD20 |The project's code is easily discoverable and publicly accessible. |icon:check[role=green] Our sourcecode is available at https://gitbox.apache.org/repos/asf/plc4x.git[Apache GitBox] and https://github.com/apache/plc4x[GitHub] and linked to from our https://plc4x.apache.org/scm.html[website]
-|CD30 |The code can be built in a reproducible way using widely available standard tools. |icon:check[role=green] our https://maven.apache.org[Maven] build has been tested on Linux, Mac-OS and Windows and build description is available on our https://plc4x.apache.org/developers/building.html[website]
+|CD20 |The project's code is easily discoverable and publicly accessible. |icon:check[role=green] Our sourcecode is available at https://gitbox.apache.org/repos/asf/plc4x.git[Apache GitBox] and https://github.com/apache/plc4x[GitHub] and linked to from our xref:contributing.adoc[website]
+|CD30 |The code can be built in a reproducible way using widely available standard tools. |icon:check[role=green] our https://maven.apache.org[Maven] build has been tested on Linux, Mac-OS and Windows and build description is available on our xref:building.adoc[website]
|CD40 |The full history of the project's code is available via a source code control system, in a way that allows any released version to be recreated. |icon:check[role=green] The entire commit history is available from the https://gitbox.apache.org/repos/asf?p=plc4x.git;a=commit;h=dd1fcf4649107762e91f7c494a10e55319a18785[beginning].
|CD50 |The provenance of each line of code is established via the source code control system, in a reliable way based on strong authentication of the committer. When third-party contributions are committed, commit messages provide reliable information about the code provenance. |icon:check[role=green] The project uses the git repository, managed by Apache Infra, ensuring provenance of each line of code to a committer, each line committed before entering incubation was equally configured.
|*Licenses and Copyright* 2+|icon:check[role=green]
@@ -47,30 +47,30 @@ Community members are encouraged to contribute to this page and comment on it, t
|LC40 |Committers are bound by an Individual Contributor Agreement (the http://www.apache.org/licenses/icla.txt["Apache iCLA"]) that defines which code they are allowed to commit and how they need to identify code that is not their own. |icon:check[role=green] The project uses a repository managed by Apache Gitbox -- write access requires an Apache account, which requires an ICLA on file.
|LC50 |The copyright ownership of everything that the project produces is clearly defined and documented. |All files in the source repository have appropriate headers which is enforced by tooling included in the build. ICLAs from all initial committers have been documented. CCLAs from all companies involved have been documented. SGA is on file for the initial contribution.
|*Releases* 2+|icon:wrench[role=yellow]
-|RE10 |Releases consist of source code, distributed using standard and open archive formats that are expected to stay readable in the long term. |icon:check[role=green] https://dist.apache.org/repos/dist/release/plc4x/[Current source releases] are distributed via dist.apache.org and http://archive.apache.org/dist/incubator/plc4x/[Older source releases] are available from archive.apache.org. Both are linked from the http://plc4x.apache.org/users/download.html[website].
+|RE10 |Releases consist of source code, distributed using standard and open archive formats that are expected to stay readable in the long term. |icon:check[role=green] https://dist.apache.org/repos/dist/release/plc4x/[Current source releases] are distributed via dist.apache.org and http://archive.apache.org/dist/incubator/plc4x/[Older source releases] are available from archive.apache.org. Both are linked from the xref:users:download.adoc[website].
|RE20 |Releases are approved by the project's PMC (see CS10), in order to make them an act of the Foundation. |icon:check[role=green] All incubating releases have been unanimously approved by the PLC4X community and the Incubator, all with at least 3 (P)PMC votes and more +1 than -1.
|RE30 |Releases are signed and/or distributed along with digests that can be reliably used to validate the downloaded archives. |icon:check[role=green] All releases are signed, and the https://dist.apache.org/repos/dist/release/plc4x/KEYS[KEYS] file is provided on dist.apache.org
|RE40 |Convenience binaries can be distributed alongside source code but they are not Apache Releases -- they are just a convenience provided with no guarantee. |icon:wrench[role=yellow] Convenience binaries are distributed via Maven Central Repository only. Currently due to the platform-dependency of C++ libraries, these are not distributed currently.
-|RE50 |The release process is documented and repeatable to the extent that someone new to the project is able to independently generate the complete set of artifacts required for a release. |icon:check[role=green] We have a guide for release managers, that has been tested by multiple release managers available on our http://plc4x.apache.org/developers/release/release.html[website].
+|RE50 |The release process is documented and repeatable to the extent that someone new to the project is able to independently generate the complete set of artifacts required for a release. |icon:check[role=green] We have a guide for release managers, that has been tested by multiple release managers available on our xref:release/release.adoc[website].
|*Quality* 2+|icon:check[role=green]
|QU10 |The project is open and honest about the quality of its code. Various levels of quality and maturity for various modules are natural and acceptable as long as they are clearly communicated. |icon:check[role=green] All issues are documented in our https://github.com/apache/plc4x/issues[GitHub Issues] instance, which is our primary bug and issue tracker.
|QU20 |The project puts a very high priority on producing secure software. |icon:check[role=green] even if we haven't received any security issues targeted at PLC4X yet, we proactively monitor our dependencies and if reported would treat them with the highest priority, according to the https://www.apache.org/security/committers.html[CVE/Security Advisory procedure].
-|QU30 |The project provides a well-documented, secure and private channel to report security issues, along with a documented way of responding to them. |icon:check[role=green] We are using Apaches default way to submit security related information, which is described on our http://plc4x.apache.org/users/security.html[website]
+|QU30 |The project provides a well-documented, secure and private channel to report security issues, along with a documented way of responding to them. |icon:check[role=green] We are using Apaches default way to submit security related information, which is described on our xref:users:security.adoc[website]
|QU40 |The project puts a high priority on backwards compatibility and aims to document any incompatible changes and provide tools and documentation to help users transition to new features. |icon:check[role=green] We try to keep everything as backward compatible as possible. If we are forced to introduce incompatible changes, these is documented in a `Incompatible changes` section as part of our release notes.
|QU50 |The project strives to respond to documented bug reports in a timely manner. |icon:check[role=green] Bug reports are treated with priority and are automatically posted to our developer mailing list https://lists.apache.org/list.html?dev@plc4x.apache.org so they are prominently recognised.
|*Community* 2+|icon:check[role=green]
-|CO10 |The project has a well-known homepage that points to all the information required to operate according to this maturity model. |icon:check[role=green] The project website has a http://plc4x.apache.org/[description of the project] with technical details, http://plc4x.apache.org/developers/contributing.html[how to contribute], http://plc4x.apache.org/developers/team.html[team].
+|CO10 |The project has a well-known homepage that points to all the information required to operate according to this maturity model. |icon:check[role=green] The project website has a xref:ROOT:index.adoc[description of the project] with technical details, xref:contributing.adoc[how to contribute], xref:team.adoc[team].
|CO20 |The community welcomes contributions from anyone who acts in good faith and in a respectful manner and adds value to the project. |icon:check[role=green] So far we have recognized any form of contribution and every contributor with the desire to become part of the team has been invited to join.
-|CO30 |Contributions include not only source code, but also documentation, constructive bug reports, constructive discussions, marketing and generally anything that adds value to the project. |icon:check[role=green] It’s part of the http://plc4x.apache.org/developers/contributing.html[contribution guide] and the current committers are really keen to welcome contributions.
+|CO30 |Contributions include not only source code, but also documentation, constructive bug reports, constructive discussions, marketing and generally anything that adds value to the project. |icon:check[role=green] It’s part of the xref:contributing.adoc[contribution guide] and the current committers are really keen to welcome contributions.
|CO40 |The community is meritocratic and over time aims to give more rights and responsibilities to contributors who add value to the project. |icon:check[role=green] So far the community has elected 4 committers, all of them also being added to the PPMC.
-|CO50 |The way in which contributors can be granted more rights such as commit access or decision power is clearly documented and is the same for all contributors. |icon:check[role=green] The criteria is documented in the http://plc4x.apache.org/developers/contributing.html[contribution guide].
+|CO50 |The way in which contributors can be granted more rights such as commit access or decision power is clearly documented and is the same for all contributors. |icon:check[role=green] The criteria is documented in the xref:contributing.adoc[contribution guide].
|CO60 |The community operates based on consensus of its members (see CS10) who have decision power. Dictators, benevolent or not, are not welcome in Apache projects. |icon:check[role=green] The project works to build consensus. All votes have been unanimous so far.
|CO70 |The project strives to answer user questions in a timely manner. |icon:check[role=green] Responses to reported issues or asked questions typically are handled by the community withing a matter of a few hours (Responses being faster during typical European time-zone business-hours).
|*Consensus Building* 2+|icon:times[role=red]
-|CS10 |The project maintains a public list of its contributors who have decision power -- the project's PMC (Project Management Committee) consists of those contributors. |icon:check[role=green] All members of the team have been added on http://plc4x.apache.org/developers/team.html[team page].
+|CS10 |The project maintains a public list of its contributors who have decision power -- the project's PMC (Project Management Committee) consists of those contributors. |icon:check[role=green] All members of the team have been added on xref:team.adoc[team page].
|CS20 |Decisions are made by consensus among PMC members 9 and are documented on the project's main communications channel. Community opinions are taken into account but the PMC has the final word if needed. |icon:check[role=green] All decisions are made on one of our mailing lists. Every decision discussed off-list has been taken back to the list for final discussion and we'll keep on doing that.
-|CS30 |Documented voting rules are used to build consensus when discussion is not sufficient. |icon:check[role=green] We have documented our decision-making rule on our http://plc4x.apache.org/developers/decisions.html[website].
-|CS40 |In Apache projects, vetoes are only valid for code commits and are justified by a technical explanation, as per the Apache voting rules defined in CS30. |icon:times[role=red] This part actively contradicts the voting rules of the Apache Incubator. This project follows the voting rules of the Apache Incubator which we documented on our http://plc4x.apache.org/developers/decisions.html[website].
+|CS30 |Documented voting rules are used to build consensus when discussion is not sufficient. |icon:check[role=green] We have documented our decision-making rule on our xref:decisions.adoc[website].
+|CS40 |In Apache projects, vetoes are only valid for code commits and are justified by a technical explanation, as per the Apache voting rules defined in CS30. |icon:times[role=red] This part actively contradicts the voting rules of the Apache Incubator. This project follows the voting rules of the Apache Incubator which we documented on our xref:decisions.adoc[website].
|CS50 |All "important" discussions happen asynchronously in written form on the project's main communications channel. Offline, face-to-face or private discussions 11 that affect the project are also documented on that channel. |icon:check[role=green] As mentioned in CS20 it is impossible to prevent off-list discussions when meeting in person. But we have always handled things in a way that we always write up summaries of important discussions and post them to the mailing lists.
|*Independence* 2+|icon:check[role=green]
|IN10 |The project is independent of any corporate or organizational influence. |icon:check[role=green] The group of active committers and PPMCs consists of members of more than independent 4 companies.
diff --git a/website/asciidoc/modules/developers/pages/preparing/index.adoc b/website/asciidoc/modules/developers/pages/preparing/index.adoc
index 206cac0101..ac97deb926 100644
--- a/website/asciidoc/modules/developers/pages/preparing/index.adoc
+++ b/website/asciidoc/modules/developers/pages/preparing/index.adoc
@@ -66,9 +66,9 @@ Also will PLC4X build with any Maven version starting with `Maven 3.6.0`.
The following pages will describe how to provide these requirements for your operating system.
-* link:linux.html[Linux]
-* link:macos.html[MacOS]
-* link:windows.html[Windows]
+* xref:preparing/linux.adoc[Linux]
+* xref:preparing/macos.adoc[MacOS]
+* xref:preparing/windows.adoc[Windows]
== Preparing your IDE
diff --git a/website/asciidoc/modules/developers/pages/protocols/index.adoc b/website/asciidoc/modules/developers/pages/protocols/index.adoc
deleted file mode 100644
index 82e731b809..0000000000
--- a/website/asciidoc/modules/developers/pages/protocols/index.adoc
+++ /dev/null
@@ -1,25 +0,0 @@
-//
-// 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
-//
-// https://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.
-//
-
-= Usage of protocols
-
-
-
-== Currently documented are:
-
-- link:ads/protocol.html[Beckhoff/ ADS]
-- link:eip/protocol.html[EIP]
diff --git a/website/asciidoc/modules/developers/pages/release/build-tools.adoc b/website/asciidoc/modules/developers/pages/release/build-tools.adoc
index 8bde19c695..14d0f37cec 100644
--- a/website/asciidoc/modules/developers/pages/release/build-tools.adoc
+++ b/website/asciidoc/modules/developers/pages/release/build-tools.adoc
@@ -28,7 +28,7 @@ The main `pom.xml` in the root directory is mainly for allowing to import all mo
If you want to release a part of the build-tools, please execute the following release steps in the parts sub-directory.
In general the preparation steps for releasing a build-tool is equal to those of the main project.
-So please check link:release.html[here] (Chapters: `Preparing your system for being able to release` and `Preparing the codebase for a release`)
+So please check xref:release/release.adoc[here] (Chapters: `Preparing your system for being able to release` and `Preparing the codebase for a release`)
The rest of the steps are a lot simpler than those of the main project as there aren't any profiles involved.
diff --git a/website/asciidoc/modules/developers/pages/release/release.adoc b/website/asciidoc/modules/developers/pages/release/release.adoc
index 99a83e1954..e711aacb5b 100644
--- a/website/asciidoc/modules/developers/pages/release/release.adoc
+++ b/website/asciidoc/modules/developers/pages/release/release.adoc
@@ -19,45 +19,22 @@
= Releasing PLC4X
+== TL/DR
+We've mostly automated most of the steps and checks in the project's `tools` directory.
+The only prerequisite for this is generally having `Docker` installed as we're using a `reference machine` to ensure reproducible builds.
-== TL/DR
+In regular intervals and especially before starting the release process run:
-IMPORTANT: Please be sure to execute the release with a Java version 11 or the Karaf feature tests will not run.
+- `release-0-update-generated-code.sh`: Deletes all generated code and then re-generates it (Gets rid of no longer valid types), refreshes the generated driver documentation and updates the NOTICE year.
-[%interactive]
-* [ ] Update the `RELEASE_NOTES`
-* [ ] Check year in `NOTICE`
-* [ ] Create release branch:
-[subs="verbatim,attributes"]
-----
- mvn release:branch -P with-c,with-dotnet,with-go,with-java,with-python,enable-all-checks -DbranchName=rel/{current-short-version}
-----
-[%interactive]
-* [ ] Add a new section to the `RELEASE_NOTES` on `develop`
-* [ ] Prepare the release:
-[subs="verbatim,attributes"]
-----
- mvn release:prepare -P with-c,with-dotnet,with-go,with-java,with-python,enable-all-checks
-----
-[%interactive]
-* [ ] Perform the release:
-[subs="verbatim,attributes"]
-----
- mvn clean release:perform
-----
-[%interactive]
-* [ ] Close the staging repo on `Nexus`
-* [ ] Stage the release artifacts in `SVN`
-* [ ] Vote on the mailing list
-* [ ] Move RC to the release section of `SVN`
-* [ ] Remove old releases in `SVN`
-* [ ] Release staging repo on `Nexus`
-* [ ] Add the version to the DOAP file on `develop`
-* [ ] Update Download site
-* [ ] Update GitHub Issues
-* [ ] Merge back release version to `release` branch
-* [ ] Send announce email
+When starting the release process, create the release branch:
+
+- `release-1-create-branch.sh`: Finalizes the RELEASE_NOTES for the version being released and adds a new section for the next one, checks git is configured correctly and then runs the create-branch build in docker with all modules enabled.
+
+Now usually comes a code stabilization time. As soon as that period is over or we're not doing such a stabilization phase, prepare the actual release.
+
+- `release-2-prepare-release.sh`: Executes the actual release process using maven inside Docker. Signs the locally staged artifacts. Deploys them to Nexus and stages them in SVN. It also checks if the current RMs GPG key is contained in the KEYS file as well as the SHA512. As a last step it drafts an email for starting the vote containing all necessary information.
== Preparing your system for being able to release
@@ -127,403 +104,433 @@ Also, at least `Maven 3.6` is required for CMake.
Ideally use the Maven-Wrapper to ensure the Maven version fits the build.
-NOTE: On some systems (mainly Mac) gpg signing can result in errors like:
- ```[INFO] --- maven-gpg-plugin:3.0.1:sign (sign-release-artifacts) @ plc4x-parent ---
- gpg: signing failed: Inappropriate ioctl for device```
- In this case adding the following helps: `export GPG_TTY=$(tty)`
-
-== Preparing the codebase for a release
-
-Usually you will have to update the RELEASE_NOTES document to the new version.
-I would suggest doing this prior to the branch as otherwise you will definitely have to port it back to `develop`.
-So remove the `SNAPSHOT` and `(Unreleased)` markers from the file and add missing parts.
-
-Also, if you are doing the first release in a new year, it is advisable to search for the old year and check if any occurrences are ok the way they are.
-Usually the `NOTICE` file has to be adjusted.
-
-== Creating a release branch
-
-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 `{current-full-version}-SNAPSHOT`, we create a branch `rel/{current-short-version}`.
-
-When creating the branch is exactly the moment in which the version in `develop` is incremented to the next minor version.
-
-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.
-
- mvn release:branch -P with-c,with-dotnet,with-go,with-java,with-python,enable-all-checks -DbranchName=rel/{minor-version}
-
-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 `{current-full-version}-SNAPSHOT` the command would be the following:
-
-[subs="verbatim,attributes"]
-----
- mvn release:branch -P with-c,with-dotnet,with-go,with-java,with-python,enable-all-checks -DbranchName=rel/{current-short-version}
-----
-
-The plugin will then aks for the version:
+[NOTE]
+====
+On some systems (mainly Mac) gpg signing can result in errors like:
-[subs="verbatim,attributes"]
----
- What is the new working copy version for "PLC4X"? (org.apache.plc4x:plc4x-parent) {current-next-incremental-version}-SNAPSHOT: : {current-next-minor-version}-SNAPSHOT
+[INFO] --- maven-gpg-plugin:3.0.1:sign (sign-release-artifacts) @ plc4x-parent ---
+gpg: signing failed: Inappropriate ioctl for device
----
-Here the suggested default has to be manually overridden.
-
-This step now should perform quite quickly as no build and no tests are involved.
-
-However, in the end the versions of the `develop` branch are updated and a new `rel/{current-short-version}` branch is created.
-
-== Preparing `develop` for the next iteration
-
-Now is a good time to add a new section to the `RELEASE_NOTES` document for the new `SNAPSHOT` version.
+In this case adding the following helps: `export GPG_TTY=$(tty)`
+====
-Here comes a template:
+== The release scripts
-[subs="verbatim,attributes"]
-----
-==============================================================
-(Unreleased) Apache PLC4X {current-next-minor-version}-SNAPSHOT
-==============================================================
-
-New Features
-------------
-
-Incompatible changes
---------------------
+From here on, the release is driven by the numbered scripts in the project's `tools` directory.
+They are meant to be run in order, and each one prints which script to run next when it finishes.
-Bug Fixes
----------
+[cols="1,3"]
+|===
+|Script |What it covers
-// Rest of the file
+|`release-0-update-generated-code.sh`
+|Throws away and re-generates all generated code, refreshes the driver documentation and the `NOTICE` year.
-----
+|`release-1-create-branch.sh`
+|Finalizes the `RELEASE_NOTES`, creates the `rel/<major>.<minor>` branch and moves `develop` on to the next minor version.
-Also be sure to do a quick full-text-search to check if the version was updated correctly everywhere.
+|`release-2-prepare-release.sh`
+|Tags and builds the release, signs and stages the artifacts in Nexus and SVN and drafts the `[VOTE]` and `[DISCUSS]` mails.
-WARNING: If you find anything here, you will need to pay attention during the release.
+|`release-3-finish-release.sh`
+|Everything after a successful vote: publishes the documentation of the release branch as the
+current release, adds the branch to the website build, records the release in the DOAP file and on
+the download page of both branches, drafts the `[RESULT]` and `[ANNOUNCE]` mails, moves the release
+candidate to the release part of SVN, releases the Nexus staging repository, and clears away the
+attempts that did not make it as well as the release it supersedes.
+See <<after-a-successful-vote>>.
-== Release stabilization phase
+|`release-abort.sh`
+|Helps unwinding a failed attempt.
-Now usually comes a phase in which last tests and checks should be performed.
+|`validate-release.sh`
+|Verifies a staged release candidate builds reproducibly. Mainly for the people voting.
+|===
-If any problems are found, they have to be fixed in the release branch.
+All Maven builds these scripts run happen inside the Docker container described by `tools/docker-compose.yaml`, which bind-mounts the project at `/ws` and uses `out/.repository` as its local Maven repository.
+That is what makes the build reproducible, and it is why the outcome does not depend on what is installed on your machine.
-Changes should either be re applied in `develop` or `cherry-picked`, however merging things back can cause a lot of problems, and we no longer have the same versions.
+NOTE: Docker needs at least `12 GB` of memory. `release-0-update-generated-code.sh` and `validate-release.sh` check this up front and abort if less is configured.
-== Preparing a release
+WARNING: Every script aborts immediately if `git status` reports uncommitted or untracked files, because they all commit with `git add --all` and would otherwise sweep up unrelated changes.
+Start each step from a clean checkout.
-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 additional profiles from the source release will be impossible.
+Note that the signing in `release-2-prepare-release.sh` and all `git` and `svn` operations run on your machine, not inside the container.
+So GPG, your git credentials and your Apache SVN credentials all have to work on the host.
-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.
-
-After that, the following command will to all preparation steps for the release:
-
- mvn release:prepare -P with-c,with-dotnet,with-go,with-java,with-python,enable-all-checks
-
-(The `-P with-c,with-dotnet,with-go,with-java,with-python,enable-all-checks` tells maven to activate the all profiles that partition the build and makes sure the versions of all modules are updated as part of the release)
-In general the plugin will now ask you 3 questions:
-
-1. The version we want to release as (It will suggest the version you get by omitting the `-SNAPSHOT` suffix)
-2. The name of the tag the release commit will be tagged with in the SCM (Name it `v{release-version}` (`v{current-full-version}` in our case)
-3. The next development version (The version present in the pom after the release) (`{current-next-bugfix-version}` in our case)
-
-Usually for 1 and 3 the defaults are just fine, make sure the tag name is correct as this usually is different.
-
-What the plugin now does, is automatically execute the following operations:
+== Preparing the codebase for a release
-1. Check we aren't referencing any `SNAPSHOT` dependencies.
-2. Update all pom versions to the release version.
-3. Run a build with all tests
-4. Commit the changes (commit message: `[maven-release-plugin] prepare release v{current-full-version}`)
-5. Push the commit
-6. Tag the commit
-7. Update all poms to the next development version.
-8. Commit the changes (commit message: `[maven-release-plugin] prepare for next development iteration`)
-9. Push the commit
+Run this in regular intervals during development, and definitely before starting a release:
-However, this just prepared the git repository for the release, we have to perform the release to produce and stage the release artifacts.
+----
+./tools/release-0-update-generated-code.sh
+----
-Please verify the git repository at: https://gitbox.apache.org/repos/asf?p=plc4x.git
-is in the correct state. Please select the release branch and verify the commit log looks similar to this
+It performs the following steps:
-image::release-git-history.png[]
+1. Deletes the `out` directory, which holds the Maven local repository and the artifacts of previous deployments.
+2. Deletes all generated code, and then re-generates it by running a full build with all profiles and `update-generated-code` enabled.
+ This is the point of the script: types that are no longer produced by the code generation would otherwise stay behind and silently become part of the release.
+ Hand-written files that live next to the generated ones are kept (`StaticHelper.go`, `StaticHelper_test.go`, `StaticHelper.py`, `__init__.py`).
+3. Sets the second line of the `NOTICE` file to `Copyright 2017-<current year> The Apache Software Foundation`, which takes care of the yearly update.
+4. Re-generates the driver documentation by running `mvn site -pl :plc4j-driver-all`.
+5. Commits everything that changed as `chore: updated generated code` and pushes it.
-It is important that the commit with the message "[maven-release-plugin] prepare release v{release-version}" is tagged with the release tag (in this case v{current-full-version})
+The build in step 2 runs with tests skipped, so a green run of this script says the project still compiles and generates - not that it still works.
-If you check the commit itself, it should mainly consist of version updates like this:
+=== Updating the RELEASE_NOTES
-image::release-git-diff-prepare-release.png[]
+This part is not automated and has to be done before creating the branch, because otherwise you will have to port it back to `develop` afterwards.
-The root pom has a few more changes, but in general this should be what you are seeing.
+Fill in the section for the version you are about to release: go through what has been merged since the last release and complete the `New Features`, `Incompatible changes` and `Bug Fixes` blocks.
-After that should come a second commit:
+You do not have to touch the `(Unreleased) Apache PLC4X <version>-SNAPSHOT` header or add a section for the next version - `release-1-create-branch.sh` does both.
-image::release-git-diff-next-development-iteration.png[]
-
-This now updates the versions again, but this time from the release version to the one we selected for the next development iteration (in this case 0.3.1-SNAPSHOT)
+== Creating a release branch
-NOTE: If the commit history doesn't look like this, something went wrong.
+According to SemVer, we have Major, Minor and Bugfix releases.
+For each new Major and Minor release we create a branch at the beginning of the code-freeze phase, and that is also the moment the version on `develop` is incremented.
-== What if something goes wrong?
+----
+./tools/release-1-create-branch.sh
+----
-If something goes wrong, you can always execute:
+The script derives every version it needs from the current project version, so there is nothing to type in except one confirmation.
+For a `develop` sitting at `1.0.0-SNAPSHOT` that gives:
- mvn release:rollback -P with-c,with-dotnet,with-go,with-java,with-python,enable-all-checks
+[cols="2,1,3"]
+|===
+|Value |Example |Derived as
-It will change the versions back and commit and push things.
+|Release version |`1.0.0` |project version without `-SNAPSHOT`
+|Branch name |`rel/1.0` |release version without a trailing `.0`
+|New `develop` version |`1.1.0-SNAPSHOT` |release version with the minor segment incremented
+|===
-Also, should you check if you have any uncommitted changes (as our code-generation can make git think they are "dirty")
+It then:
-However, it will not delete the tag in GIT (locally and remotely). So you have to do that manually or use a different tag next time.
+1. Asks `Have the RELEASE_NOTES been updated for this version?`.
+ Anything other than `yes` aborts.
+2. Rewrites the `(Unreleased) Apache PLC4X 1.0.0-SNAPSHOT` header in the `RELEASE_NOTES` to `Apache PLC4X 1.0.0` and commits that.
+3. Checks that `user.name` and `user.email` are configured in git, and prints the commands to fix it if they are not.
+ The commit is created inside the container, so it needs these values passed in explicitly.
+4. Runs `mvn release:branch` inside the container with `-DpushChanges=false`, with all profiles enabled.
++
+IMPORTANT: Enabling all profiles is what makes the plugin update the versions of the non-default modules too.
+Without that, those modules on `develop` would keep referencing the old version and the build would break.
-== Performing a release
+5. Prepends a fresh `(Unreleased) Apache PLC4X 1.1.0-SNAPSHOT` section to the `RELEASE_NOTES` and commits it.
+6. Pushes `develop`, checks out `rel/1.0` and pushes that with `--set-upstream`.
-This is done by executing another goal of the `maven-release-plugin`:
+When this is done, your local checkout is on the release branch and `develop` has moved on to the next minor version.
- mvn clean release:perform
+Afterwards do a quick full-text search for the old version to check it was updated everywhere.
-NOTE: The clean is only for making sure there is no artifacts in `target` directly, but only in `target/checkout/target`.
+WARNING: If you find anything here, you will need to pay attention during the release.
-This executes automatically as all information it requires is located in the `release.properties` file the `prepare`-goal prepared.
+=== How the documentation version is maintained
-The first step is that the `perform`-goal checks out the previously tagged revision into the root modules `target/checkout` directory.
-Here it automatically executes a maven build (You don't have to do this, it's just that you know what's happening):
+You do not have to do anything here - `release-1-create-branch.sh` takes care of it - but it is
+worth understanding, because it is the part that decides which version the website serves as
+the current one.
- mvn deploy -P apache-release
+Every branch names the concrete version it documents in its own `website/asciidoc/antora.yml`,
+and marks whether that version is released yet:
-As the `apache-release` profile is also activated, this builds and tests the project as well as creates the JavaDocs, Source packages and signs each of these with your PGP key.
+[cols="1,1,1,2"]
+|===
+|Branch |`version:` |`prerelease:` |Published as
-We are intentionally not adding the other profiles, as these either produce binary artifacts that usually only work on the system they were compiled on (C++, .Net) or we haven't found a good way to distribute them via Maven yet (Python).
+|`develop` |`1.1.0` |`True` |`/plc4x/pre-release/...`
+|`rel/1.0` |`1.0.0` |`False` |`/plc4x/latest/...`
+|`rel/0.13` |`0.13.1` |`False` |`/plc4x/0.13.1/...`
+|`rel/0.12` |`0.12.0` |`False` |`/plc4x/0.12.0/...`
+|===
-As this time the build is building with release versions, Maven will automatically choose the release url for deploying artifacts.
+A release branch does not start out like that, though.
+`release-1-create-branch.sh` creates it with `prerelease: True`, because at that point nothing has been voted on yet.
-The way things are set up in the apache parent pom, is that release artifacts are deployed to a so-called `staging repository`.
+While the code freeze and the vote are running, none of it is published at all: Antora only reads
+the branches listed in `content.sources` in `website/antora-playbook.yml`, and the new branch is
+only added there by `release-3-finish-release.sh`, after the vote.
+`/plc4x/latest/` therefore keeps serving the *previous* release throughout.
-You can think of a `staging repository` as a dedicated repository created on the fly as soon as the first artifact comes in.
+The `prerelease` flag matters at the moment the branch is added.
+Antora skips prereleases when it picks the latest version, so a branch added while still flagged
+would appear under its own version number instead of taking over `/plc4x/latest/`.
+`release-3-finish-release.sh` adds the branch and clears the flag in the same run, and that is what
+promotes the new release to `/plc4x/latest/` and moves the previous one to its own version number.
-After the build you will have a nice and clean Maven repository at https://repository.apache.org/ that contains only artifacts from the current build.
+No branch names itself `latest` or `pre-release`.
+Those two segments come from the playbook instead:
-After the build it is important to log in to `Nexus` at https://repository.apache.org/, select `Staging Repositories` and find the repository with the name: `orgapacheplc4x-{somenumber}`.
+----
+urls:
+ latest_version_segment: latest
+ latest_prerelease_version_segment: pre-release
+----
-Select that and click on the `Close` button.
+Antora picks the latest version of a component by version sorting and skips prereleases while
+doing so, then publishes that one under the symbolic segment.
+`develop` can therefore never become `latest`, and creating a newer release branch demotes the
+previous one to its own version number without anything on that older branch having to change.
-Now Nexus will do some checks on the artifacts and check the signatures.
+`release-1-create-branch.sh` moves `develop` on to the next version and sets the new release branch to the version it is going to release, both still flagged as prereleases.
+`release-3-finish-release.sh` takes the version from the tag `release-2-prepare-release.sh` created and clears the prerelease flag, so it also does the right thing for a bugfix release, where `release-1-create-branch.sh` never runs.
-As soon as it's finished, we are done on the Maven side and ready to continue with the rest of the release process.
+The two `current-*-version` attributes further down in the same file are kept in sync by the
+build and should not be edited by hand either.
-A release build also produces a so-called `source-assembly` zip.
+== Release stabilization phase
-This contains all sources of the project and will be what's actually the release from an Apache point of view and will be the thing we will be voting on.
+Now usually comes a phase in which last tests and checks are performed.
-This file will also be signed and `SHA512` hashes will be created.
+If any problems are found, they have to be fixed in the release branch.
-== Staging a release
+Changes should either be re-applied in `develop` or `cherry-picked`.
+Merging things back causes a lot of problems, as the branches no longer share the same versions.
-Each new release and release-candidate has to be staged in the Apache SVN under:
+== Preparing and staging a release candidate
-https://dist.apache.org/repos/dist/dev/plc4x/
+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.
-The directory structure of this directory is as follows:
+Make sure you are on the release branch, then run:
-[subs="verbatim,attributes"]
----
- ./KEYS
- ./{current-full-version}/
- ./{current-full-version}/rc1
- ./{current-full-version}/rc1/README
- ./{current-full-version}/rc1/RELEASE_NOTES
- ./{current-full-version}/rc1/apache-plc4x-{current-full-version}-source-release.zip
- ./{current-full-version}/rc1/apache-plc4x-{current-full-version}-source-release.zip.asc
- ./{current-full-version}/rc1/apache-plc4x-{current-full-version}-source-release.zip.sha512
+./tools/release-2-prepare-release.sh
----
-You can generally import the stuff, by preparing a directory structure like above locally and then using `svn import` to do the importing:
-
+This is the long one - it takes the release from a tagged commit all the way to a staged release candidate and a drafted vote mail.
+The only thing it asks for is the release-candidate number.
+
+Before it does anything, it derives the release version (`1.0.0`), the tag name (`v1.0.0`) and the next development version (`1.0.1-SNAPSHOT` - note this is a *bugfix* bump, unlike in `release-1`), and it refuses to continue if the tag already exists locally or on `origin`, telling you exactly how to remove it.
+This is the usual outcome of an earlier failed attempt.
+
+It then works through these steps:
+
+1. Runs `mvn release:prepare` in the container with all profiles enabled and the versions and tag passed in explicitly, so the plugin asks no questions.
+ This checks that no `SNAPSHOT` dependencies are referenced, updates all poms, runs a full build with tests, commits, tags and prepares the next development version.
+2. Pushes the result and records the commit hash the tag points at, for the vote mail.
+3. Runs `mvn release:perform` in the container, deploying into `out/.local-artifacts-dir` rather than straight to Nexus.
+ Nothing leaves your machine yet.
+4. Signs every artifact in that directory with `gpg -ab` - poms, jars, kars, nars, feature and site descriptors, the CycloneDX SBOMs and the source-release zip.
+ This runs on the host, using your GPG setup.
+5. Uploads the signed repository to Nexus with `nexus-staging:deploy-staged-repository` and closes it, then prints the URL of the closed staging repository.
++
+NOTE: If this fails with a `404`, the staging profile id hard-coded in the script is out of date.
+Log in to https://repository.apache.org, open `Staging Profiles`, select `org.apache.plc4x` and take the id out of the browser URL after `#stagingProfiles;`.
+
+6. Asks for the release-candidate number and assembles `out/stage/<version>/rc<n>/` containing the `README`, the `RELEASE_NOTES`, the source-release zip with its `.asc` and `.sha512`, and the CycloneDX SBOMs with their signatures.
+7. Downloads the official https://dist.apache.org/repos/dist/release/plc4x/KEYS[KEYS] file, imports it into a throw-away keyring, verifies the signature against it, and checks that the key which made the signature carries an `apache.org` address.
++
+IMPORTANT: These are the checks that catch the classic first-time-release-manager mistakes.
+If the first fails, your key is not in the `KEYS` file yet - add it, following the format documented in the file itself.
+If the second fails, you signed with a key that is not registered to your `{apache-id}@apache.org` address; the script prints the user ids the key does carry.
+A key may have several user ids and only one of them has to be the Apache one.
+
+8. Re-computes the SHA-512 of the source-release zip and compares it against the `.sha512` file.
+9. Imports the release-candidate directory into the Apache dev SVN with `svn import`, which gives the layout the vote mail refers to:
++
+[subs="verbatim,attributes"]
----
-cd ./{current-full-version}
-svn import rc1 https://dist.apache.org/repos/dist/dev/plc4x/{current-full-version}/rc1 -m"Staging of rc1 of PLC4X {current-full-version}"
+ https://dist.apache.org/repos/dist/dev/plc4x/{current-full-version}/rc1/README
+ https://dist.apache.org/repos/dist/dev/plc4x/{current-full-version}/rc1/RELEASE_NOTES
+ https://dist.apache.org/repos/dist/dev/plc4x/{current-full-version}/rc1/apache-plc4x-{current-full-version}-source-release.zip
+ https://dist.apache.org/repos/dist/dev/plc4x/{current-full-version}/rc1/apache-plc4x-{current-full-version}-source-release.zip.asc
+ https://dist.apache.org/repos/dist/dev/plc4x/{current-full-version}/rc1/apache-plc4x-{current-full-version}-source-release.zip.sha512
----
-The `KEYS` file contains the PGP public key which belongs to the private key used to sign the release artifacts.
-
-If this is your first release be sure to add your key to this file.
-For the format have a look at the file itself.
-It should contain all the information needed.
+10. Writes `out/stage/vote-email.eml` and `out/stage/discuss-email.eml`, already filled in with the release version, the RC number, the tag commit hash, the staging repository URL and the SVN URL.
-Be sure to stage exactly the `README` and `RELEASE_NOTES` files contained in the root of your project.
-Ideally you just copy them there from there.
+=== Verifying the git history
-All three `*-source-relese.zip*` artifacts should be located in the directory: `target/checkout/target`
+Even though this is now scripted, it is worth checking that the repository at https://gitbox.apache.org/repos/asf?p=plc4x.git ended up in the right state.
+Select the release branch and verify the commit log looks like this:
-After committing these files to SVN you are ready to start the vote.
-
-== Starting a vote on the mailing list
+image::release-git-history.png[]
-After staging the release candidate in the Apache SVN, it is time to actually call out the vote.
+The commit with the message `[maven-release-plugin] prepare release v{current-full-version}` has to carry the release tag, and it should consist of nothing but version updates.
+It is followed by a `[maven-release-plugin] prepare for next development iteration` commit that moves the branch on to the next bugfix version.
-For this we usually send two emails.
-The following would be the one used to do our first TLP release:
+NOTE: If the commit history doesn't look like this, something went wrong.
-[subs="verbatim,attributes"]
-----
-E-Mail Topic:
-[VOTE] Apache PLC4X {current-full-version} RC1
+== Starting a vote on the mailing list
-Message:
-Apache PLC4X {current-full-version} has been staged under [2] and it’s time to vote
-on accepting it for release. All Maven artifacts are available under [1].
-Voting will be open for 72hr.
+The two mails were drafted for you in `out/stage/`.
+Read them once, then send them - the `[VOTE]` mail from `vote-email.eml` and the `[DISCUSS]` mail from `discuss-email.eml`, both to dev@plc4x.apache.org.
-A minimum of 3 binding +1 votes and more binding +1 than binding -1
-are required to pass.
+The reason for the second mail is that counting votes gets hard if the voting and the discussion happen in the same thread.
-Release tag: v{current-full-version}
-Hash for the release tag: {replacethiswiththerealgitcommittag}
+Now we have to wait 72 hours before the result can be announced.
+This is an Apache policy, so that anyone can participate no matter where they live or what weekends and public holidays are currently happening.
-Per [3] "Before voting +1 PMC members are required to download
-the signed source code package, compile it as provided, and test
-the resulting executable on their own platform, along with also
-verifying that the package meets the requirements of the ASF policy
-on releases."
+The vote passes if at least 3 binding `+1` votes are received and more `+1` than `-1`.
-You can achieve the above by following [4].
+After the 72 hours are over and that requirement is met, the vote is closed with a reply to the
+vote thread, prefixed `[RESULT]`.
+`release-3-finish-release.sh` drafts that mail for you - it asks for the two vote counts and writes
+`out/stage/result-email.eml`, before it publishes anything, so you get it even if you stop the
+script at the confirmation.
-[ ] +1 accept (indicate what you validated - e.g. performed the non-RM items in [4])
-[ ] -1 reject (explanation required)
+=== Validating a release candidate
+Anyone voting can check that the staged artifacts really are reproducible from the staged sources:
-[1] https://repository.apache.org/content/repositories/orgapacheplc4x-{somefourdigitnumber}
-[2] https://dist.apache.org/repos/dist/dev/plc4x/{current-full-version}/rc1
-[3] https://www.apache.org/legal/release-policy.html#approving-a-release
-[4] https://cwiki.apache.org/confluence/display/PLC4X/Validating+a+staged+Release
+----
+./tools/validate-release.sh
----
-As it is sometimes to do the vote counting, if voting and discussions are going on in the same thread, we send a second email:
+It builds the project in the same container and then uses `artifact:compare` against the staging
+repository to compare the result byte for byte.
+Run it inside an unpacked `apache-plc4x-<version>-source-release.zip`, or in a checkout of the
+release tag - it refuses to run on a `SNAPSHOT` version, because comparing a development build
+against a release repository says nothing about the release candidate.
+Only the Java artifacts are compared; the C, .Net and Python ones are either platform specific or
+not published to Maven at all.
-[subs="verbatim,attributes"]
-----
-E-Mail Topic:
-[DISCUSS] Apache PLC4X {current-full-version} RC1
+The full list of things a voter is expected to check is documented on the xref:release/validation.adoc[validating a release] page.
-Message:
-This is the discussion thread for the corresponding VOTE thread.
+== What if something goes wrong?
-Please keep discussions in this thread to simplify the counting of votes.
+`tools/release-abort.sh` helps with unwinding an attempt:
-If you have to vote -1 please mention a brief description on why and then take the details to this thread.
+. Sets the versions in all modules back to the development version.
+Which version that is cannot be derived - after `release:branch` the poms hold the next minor version, after `release:prepare` the next bugfix version - so pass it as an argument or answer the prompt:
++
----
+ ./tools/release-abort.sh 1.0.0-SNAPSHOT
+----
+. Deletes the left-over `release.properties`, `pom.xml.versionsBackup` and `pom.xml.releaseBackup` files.
+. Offers to delete the release tag and the release branch, locally and on the remote, asking separately for each and skipping the ones that do not exist.
-Now we have to wait 72 hours till we can announce the result of the vote.
-
-This is an Apache policy to make it possible for anyone to participate in the vote, no matter where that person lives and not matter what weekends or public holidays might currently be.
+WARNING: It does not undo everything. Commits `release-1-create-branch.sh` already pushed to
+`develop` - the finalized `RELEASE_NOTES`, the section for the next version and the documentation
+version in `website/asciidoc/antora.yml` - stay, as does a release candidate staged in SVN and a
+Nexus staging repository. The script lists those at the end so they are not forgotten; the next
+section covers removing them.
-The vote passes, if at least 3 `+1` votes are received and more `+1` are received than `-1`.
+== Going back for a new release candidate
-After the 72-hour minimum wait period is over and we have fulfilled the requirement of at least 3 +1 votes and more +1 than -1, a final reply is sent to the vote thread with a prefix of `[RESULT]` in the title in which the summary of the vote is presented in an aggregated form.
+If a vote fails and a new RC is needed:
+1. Run `tools/release-abort.sh` to reset the versions and clean up the left-over files.
+2. Delete the tag locally and remotely:
++
[subs="verbatim,attributes"]
----
-E-Mail Topic:
-[RESULT] [VOTE] Apache PLC4X {current-full-version} RC1
-
-Message:
-So, the vote passes with {number of +1 votes} +1 votes by PMC members {number of +1 votes from non-pmc members} +1 vote by a non PMC member.
+ git tag -d v{current-full-version}
+ git push --delete origin v{current-full-version}
----
-
-== Releasing after a successful vote
-
-As soon as the votes are finished, and the results were in favor of a release, the staged artifacts can be released.
-This is done by moving them inside the Apache SVN.
-
+3. Commit and push the version changes.
+4. Drop the staging repository at https://repository.apache.org.
+5. Remove the previous RC from SVN:
++
[subs="verbatim,attributes"]
----
- svn move -m "Release Apache PLC4X {current-full-version}" \
- https://dist.apache.org/repos/dist/dev/plc4x/{current-full-version}/rc1 \
- https://dist.apache.org/repos/dist/release/plc4x/{current-full-version}
+ svn rm https://dist.apache.org/repos/dist/dev/plc4x/{current-full-version}/rc1 -m"Removed rc1 of PLC4X {current-full-version}"
----
+6. Reply to the `VOTE` and `DISCUSS` threads announcing that the vote has been cancelled, explaining why and that a new RC will follow.
+ Prefix the subject with `[CANCELLED]`.
-This will make the release artifacts available and will trigger them being copied to mirror sites.
-
-This is also the reason why you should wait at least 24 hours before sending out the release notification emails.
-
-== Going back for a new release candidate
-
-If however for some reason it is needed to prepare a new RC for the release. Please follow these steps:
-
-- Set the versions of the release branch to the previous version by using the `versions:set` plugin:
-
- mvn versions:set -DprocessAllModules=true -P with-c,with-dotnet,with-go,with-java,with-python,enable-all-checks
-
-- Delete the tag locally:
+After this you can run `release-2-prepare-release.sh` again and give it the next RC number.
- git tag -d v{current-full-version}
+[#after-a-successful-vote]
+== After a successful vote
-- Delete the tag remotely:
+`tools/release-3-finish-release.sh` covers this part.
- git push --delete origin v{current-full-version}
+Run it on the release branch once the vote has passed - it refuses to run anywhere else, because
+everything it does writes to that branch.
-- Commit all changes
+It asks for confirmation, then takes the released version from the release tag and does five things:
-- Drop the staging repo at https://repository.apache.org
+. On the release branch: points the Antora descriptor at that version and clears the `prerelease` flag, which is what publishes the new release as `/plc4x/latest/`, and adds the release to that branch's download page.
+. On `develop`: adds the release branch to the `content.sources` list in `website/antora-playbook.yml`, which is what makes Antora read the branch at all.
+. On `develop`: adds the released version to `website/resources/plc4x-doap.rdf`, at the top of the list and named `Latest`, demoting the entry that held that title to `Legacy`, and adds the release to `develop`'s copy of the download page.
+The release date is the day the script runs.
+. Drafts the `[RESULT]` and `[ANNOUNCE]` mails into `out/stage/`, the same way `release-2-prepare-release.sh` drafts the `[VOTE]` and `[DISCUSS]` ones.
+Nothing is sent - you read them and send them yourself.
+. Publishes the artifacts and clears away what the earlier attempts left behind - see <<_releasing_the_artifacts>>.
+This asks for a second confirmation, because it cannot be undone.
-- Delete the previous RC in SVN
+The two changes to `develop` are made in a throw-away worktree and pushed straight to it, so your
+checkout stays on the release branch - your local `develop` will be one commit behind afterwards.
- svn rm https://dist.apache.org/repos/dist/dev/plc4x/0.9.0/rc1 -m"Removed rc1 of PLC4x 0.9.0"
+The documentation steps are skipped if they have already been done, so re-running the script is
+harmless up to the point where it starts publishing - and that part asks first.
-- Reply to the `VOTE` and the `DISCUSS` announcing the vote has been cancelled and explain why and that you're going to start a new RC soon. Ideally prefix the title of the Emails with `[CANCELLED]`
+WARNING: Everything else in this section still has to be done by hand.
-After this you should be ready to start a new RC.
+=== Releasing the artifacts
-== Cleaning up older release versions
+`release-3-finish-release.sh` does this, and it is the point of no return - neither half can be
+undone, which is why it asks once more before going ahead, showing exactly what it is about to do.
-As a lot of mirrors are serving our releases, it is the Apache policy to clean old releases from the repo if newer versions are released.
+It works out which release candidate to publish by taking the highest numbered `rc` still staged
+under `https://dist.apache.org/repos/dist/dev/plc4x/`, then:
-This can be done like this:
+. Moves that release candidate to `https://dist.apache.org/repos/dist/release/plc4x/`, which is what starts the artifacts being copied to the mirrors.
+This is why you have to wait at least 24 hours before announcing.
+. Releases the Nexus staging repository with `nexus-staging:rc-release`, moving the Maven artifacts into the Apache release repository, from where they are synced to Maven Central.
- svn delete https://dist.apache.org/repos/dist/release/plc4x/{current-full-version}/ -m"deleted version {current-full-version}"
+The staging repository id is read from the file `release-2-prepare-release.sh` left in
+`out/.local-artifacts-dir`.
+That directory does not survive `release-0-update-generated-code.sh` and is not there at all if
+you finish the release on a different machine, in which case the script asks for the id - it is the
+last part of the URL in `[1]` of the `VOTE` email, e.g. `orgapacheplc4x-1234`.
-After this https://dist.apache.org/repos/dist/release/plc4x should only contain the latest release directory.
+The SVN move is skipped if the version is already published.
+Nexus has no equally cheap way of being asked, so if the release is already out in SVN the script
+assumes the staging repository went with it and asks before trying again - which is also how you
+recover from a run where the move succeeded but the Nexus release did not.
-== Releasing the Maven artifacts
+==== Cleaning up afterwards
-Probably the simplest part is releasing the Maven artifacts.
+Only the winning release candidate was moved, a vote that had to be repeated leaves a closed
+staging repository behind for each attempt, and Apache policy is that the mirrors carry only the
+current release.
+The script offers to clear all three away, asking before it deletes anything:
-To do this, the release manager logs into Nexus at https://repository.apache.org/, selects the staging repository and clicks on the `Release` button.
+. It lists what is left under `https://dist.apache.org/repos/dist/dev/plc4x/{current-full-version}/` and offers to remove that whole directory.
+. It lists the older releases still under `https://dist.apache.org/repos/dist/release/plc4x/` and offers to remove them.
+Only directories that look like a version are considered - `KEYS`, `build-tools` and `plc4x-extras` live in the same place and are left alone.
+. It runs `nexus-staging:rc-list` and prints the staging repositories that exist, then asks which ids to drop.
+Nexus gives us nothing we could reliably use to tell which repository belonged to which attempt, so this one is left as a decision rather than guessed at - leave the answer empty to keep them all.
-This will move all artifacts into the Apache release repository and delete the staging repository after that.
+Removing an older release does not make it unavailable: it stays on
+https://archive.apache.org/dist/plc4x/, and https://downloads.apache.org redirects there for
+anything it no longer carries, so the links on the download page keep working.
-All release artifacts released to the Apache release repo, will automatically be synced to Maven central.
+=== Updating the website
-== Add the version to the DOAP file
+`release-3-finish-release.sh` does all of this.
+Old releases are not dropped from the Antora playbook automatically, though - decide for yourself
+how many *versions of the documentation* the website should keep building. That is separate from
+the mirrors, which only ever carry the current release.
-Now that the release is out, in the `develop` branch, update the `DOAP` file for plc4x.
+The download page is worth a word, because it exists once per branch that publishes documentation
+and every copy has to list the release: `/plc4x/latest/users/download.html` is served from the
+release branch, `/plc4x/pre-release/...` from `develop`.
+The script updates both, identically.
-This is found at:
+For each copy it moves the entry that was current down into _Previous Releases_, pointing its
+source-release link at the archive, and puts the new release at the top of _Current Releases_ with
+an anchor for the ToC.
+The release notes are taken from the `RELEASE_NOTES` of the release branch and converted to
+AsciiDoc.
- src/site/resources-filtered/plc4x-doap.rdf
+NOTE: A bullet that is wrapped over several lines in the `RELEASE_NOTES` becomes a single line on
+the download page. That is deliberate: a continuation line starting with something like
+`18446744073709551615.` would otherwise be read as an ordered list item by AsciiDoc. It renders the
+same either way.
-Please add the just released version to the top of the versions.
+=== Merging back to the `release` branch
-This file is needed for Apache's tooling to automatically keep track of project release activity, and we use this internally too to automatically update the documentation to always reference the latest released version automatically.
-
-== Merge back release version to `release` branch
-
-The `release` branch should always point to the last released version.
-This has to be done with git
+The `release` branch should always point at the last released version:
[subs="verbatim,attributes"]
----
@@ -531,86 +538,23 @@ git checkout release
git merge -X theirs v{current-full-version}
----
-When there are conflicts the `theirs` merge strategy will most probably help resolve them,
+The `theirs` strategy resolves most conflicts, but a manual resolution may still be needed.
+Push afterwards.
-Possibly a manual conflict resolution has to be done afterward.
-After that, changes need to be pushed.
+=== Updating GitHub Issues
-== Updating GitHub Issues
-
-1. Set the released version to "released" and set the "release-date"
+1. Set the released version to "released" and set the "release-date".
2. Add the next version to the versions.
-== Update the download site
-
-The URL http://plc4x.apache.org/users/download.html has to be changed, and the current release has to be listed there.
-This is done by changing the `download.adoc` under `src/site/users/` (**in the develop branch, as this is where the site is generated from!**)
-
-1. Copy the last release down to _Previous Releases_
-2. Point the download links of the last release to archive, e.g. `http://archive.apache.org/dist/plc4x/{current-full-version}/apache-plc4x-{current-full-version}-source-release.zip`
-3. Add the new Release under _Current Releases_ and change all links.
-_Note: Please add an anchor for the toc_
-4. Update the sections for the changes according to the _RELEASE_NOTES_ from the release
-_Note: Transfer all to ascii-doc notation to ensure correct rendering of the site_
-_Also remove the JIRA TICKET ids in Front_
-
== Notifying the world
Make sure you have given the Apache mirrors time to fetch the release files by waiting at least 24 hours after moving the release candidate to the release part of the SVN.
-After that it is time to announce your release to the world:
-
-[subs="verbatim,attributes"]
-----
-From:
-your apache email address
-To:
-announce@apache.org
-
-CC:
-dev@plc4x.apache.org
-
-E-Mail Topic:
-[ANNOUNCE] Apache PLC4X {current-full-version} released
-
-Message:
-The Apache PLC4X team is pleased to announce the release of Apache PLC4X {current-full-version}
-
-PLC4X is a set of libraries for communicating with industrial programmable
-logic controllers (PLCs) using a variety of protocols but with a shared API.
-
-The current release contains drivers able to communicate with industrial PLCs using one of the following protocols:
-
- * AB-ETH
- * Beckhoff ADS
- * CanOpen
- * EtherNet/IP / EIP
- * Firmata
- * KNXNet/IP
- * Modbus
- * OPC UA
- * Siemens S7 (0x32)
+`release-3-finish-release.sh` has already drafted the announcement to `out/stage/announce-email.eml`,
+addressed to announce@apache.org with dev@plc4x.apache.org in copy.
-Beyond that we also provide integration modules for the following Apache projects and frameworks:
-
- * Apache Calcite
- * Apache Camel
- * Apache Edgent (Incubating / Retired)
- * Apache Kafka (Kafka Connect)
- * Apache NiFi
- * Logstash
-
-It also provides an `OPC UA Server` which can act as a bridge between legacy systems and OPC UA.
-
-Visit the Apache PLC4X website [1] for general information or
-the downloads page [2] for release notes and download information.
-
-Regards,
-The Apache PLC4X team
-
-[1] http://plc4x.apache.org
-[2] http://plc4x.apache.org/users/download.html
-----
+WARNING: The lists of drivers and integrations in that mail are a fixed text in the script, not
+generated from the build - read them before sending and correct them if they have drifted.
It is important to note that you have to send this email from your apache email address, or it will be rejected.
This wasn't very simple for me to set up.
@@ -619,5 +563,3 @@ https://reference.apache.org/committer/email
Here's what I did in Google Mail to allow sending of emails:
https://gmail.googleblog.com/2009/07/send-mail-from-another-address-without.html
Note ... you will be able to select the alternate sending address if you click into the recipients line of a new email (Not very intuitive).
-
-After that email is out the door, you're done. Congrats!
\ No newline at end of file
diff --git a/website/asciidoc/modules/developers/pages/release/validation.adoc b/website/asciidoc/modules/developers/pages/release/validation.adoc
index a7272ec674..4139a2fc3e 100644
--- a/website/asciidoc/modules/developers/pages/release/validation.adoc
+++ b/website/asciidoc/modules/developers/pages/release/validation.adoc
@@ -90,20 +90,27 @@ By piping the result into a text file gives you the chance to investigate the co
== Release Tooling
-In the `tools` directory we have a little script that can help with downloading and checking the hashes and signatures automatically.
+`tools/validate-release.sh` checks the hardest part for you: that the artifacts staged in Nexus can
+be reproduced from the staged sources.
-In order to execute this, please change directories into the projects base directory and execute the following command:
+Unpack the `apache-plc4x-{current-full-version}-source-release.zip` you downloaded above and run it
+from inside the unpacked directory:
[subs="attributes"]
----
-tools/download_staged_release.sh {current-full-version} 1
+ ./tools/validate-release.sh
----
-This will download all the files into a directory: `downloaded-plc4x-{current-full-version}1`.
+It builds the project inside the same Docker container the release was built in and then compares
+the result against the staging repository with `artifact:compare`.
+It refuses to run on a `SNAPSHOT` version, so it cannot accidentally be pointed at a development
+checkout, and it needs at least 12 GB of memory available to Docker.
-After that it will calculate the SHA512 hash and compare it with the staged hash.
+Only the Java artifacts are compared - the C, .Net and Python ones are either platform specific or
+not published to Maven at all, so there is nothing staged to compare them against.
-Last not least it will validate the PGP key and print out some information on it.
+NOTE: The signature and hash checks above are still done by hand; there is no script for those any
+more.
== Template for the email for voting
diff --git a/website/asciidoc/modules/users/nav.adoc b/website/asciidoc/modules/users/nav.adoc
index 0242270267..b26ff18d55 100644
--- a/website/asciidoc/modules/users/nav.adoc
+++ b/website/asciidoc/modules/users/nav.adoc
@@ -18,6 +18,7 @@
** xref:download.adoc[]
** xref:adopters.adoc[Adopters]
** xref:issues.adoc[]
+** xref:contact.adoc[Getting in Contact]
** xref:commercial-support.adoc[Commercial Support]
** xref:getting-started/index.adoc[]
diff --git a/website/asciidoc/modules/users/pages/adopters.adoc b/website/asciidoc/modules/users/pages/adopters.adoc
index 70baa8a0b2..af19de0d50 100644
--- a/website/asciidoc/modules/users/pages/adopters.adoc
+++ b/website/asciidoc/modules/users/pages/adopters.adoc
@@ -36,7 +36,7 @@ a|image::users/companies/logo-industryfusion.png[if, 200, 200] |https://www.indu
a|image::users/companies/logo_unistuttgart_isw.png[isw, 200, 200] |https://www.isw.uni-stuttgart.de/en/[ISW University of Stuttgart^,opts=nofollow] |IIoT / Industry 4.0 / Research |We use PLC4X for our research projects because of its great potential for retrofitting scenarios, the simplicity of the API, an active community for broad platform support and the open source flexibility.
-a|image::users/companies/logo-lebbing-automation-drives.png[re, 200, 200]|https://www.lebbing.com/[Lebbing automation & drives GmbH^,opts=nofollow] https://in2lutions.com/in2lutions/[In2Lutions]| Automation / Drives / Industry 4.0 |We used PLC4X to developed a solution to synchronize data between PLCs and customers systems. Our Solution is used for new products as well as for industry 4.0 upgrades to older machines.
+a|image::users/companies/logo-lebbing-automation-drives.png[re, 200, 200]|https://www.lebbing.com/[Lebbing automation & drives GmbH^,opts=nofollow] In2Lutions| Automation / Drives / Industry 4.0 |We used PLC4X to developed a solution to synchronize data between PLCs and customers systems. Our Solution is used for new products as well as for industry 4.0 upgrades to older machines.
a|image::users/companies/logo-pietrorimoldi.jpg[pietrorimoldi, 200, 200] |https://www.rimoldi.it[PIETRORIMOLDI&C s.r.l.^,opts=nofollow] |IIoT / Analytics |We started a project which deals with long term data analysis; the data are gathered from machines controlled in real time by PLC. Failure prediction and behavioral working condition monitoring are the main goals. PLC4x library is a fundamental part of the process.
@@ -44,7 +44,7 @@ a|image::users/companies/logo-pragmatic-industries.svg[pi, 200, 200] |https://ww
a|image::users/companies/logo-pragmatic-minds.svg[pm, 200, 200] |https://www.pragmaticminds.de[pragmatic minds GmbH^,opts=nofollow] |Big Data / Analytics |We use PLC4X to collect data from different types of PLCs as preliminary step for data analytics and visualization.
-a|image::users/companies/logo_record_evolution_single_dark_bgfont.png[re, 200, 200]|https://www.record-evolution.de/en/home-en/[Record Evolution GmbH^,opts=nofollow] | Iot / Industry 4.0 / Data Science |We developed a platform for IoT development and Data Science. We are using PLC4X to enable IoT devices in our platform to extract data from PLCs of different vendors, using different protocols.
+a|image::users/companies/logo_record_evolution_single_dark_bgfont.png[re, 200, 200]|https://www.record-evolution.de/[Record Evolution GmbH^,opts=nofollow] | Iot / Industry 4.0 / Data Science |We developed a platform for IoT development and Data Science. We are using PLC4X to enable IoT devices in our platform to extract data from PLCs of different vendors, using different protocols.
// TODO: Add your company in alphabetical order ...
diff --git a/website/asciidoc/modules/users/pages/blogs-videos-and-slides.adoc b/website/asciidoc/modules/users/pages/blogs-videos-and-slides.adoc
index dec2b6f31e..f401985fb3 100644
--- a/website/asciidoc/modules/users/pages/blogs-videos-and-slides.adoc
+++ b/website/asciidoc/modules/users/pages/blogs-videos-and-slides.adoc
@@ -38,8 +38,7 @@
- https://youtu.be/fkfc3tAe4AM[Mittelstand meets Open Source - Einführung in das Industrial IoT (IIoT) (GERMAN)]
- https://www.youtube.com/watch?v=RWKggid25ds[Apache Kafka, KSQL and Apache PLC4X for IIoT Data Integration and Processing]
- https://www.youtube.com/watch?v=pjBYtJJmWq0[Episode IV - A New Hope: Industry 4.0 done our way]
-- https://aceu19.apachecon.com/session/idea-apache-tlp[From an idea to an Apache TLP]
-- https://mediathek.hhu.de/watch/6014a3fd-aadf-4bcf-adf6-3134162aef1b[Wie wir mit Apache PLC4X die Silos in der Automatisierungsindustrie aufbechen]
+- https://youtu.be/mD0Lh7si5Hc?si=J1Sf1VAj8pyzLzpH[From an idea to an Apache TLP]
== Slides
diff --git a/website/asciidoc/modules/users/pages/commercial-support.adoc b/website/asciidoc/modules/users/pages/commercial-support.adoc
index d8c56e8769..61ea84336d 100644
--- a/website/asciidoc/modules/users/pages/commercial-support.adoc
+++ b/website/asciidoc/modules/users/pages/commercial-support.adoc
@@ -46,7 +46,7 @@ Anyone who provides `Apache PLC4X` related services can be added to this list (e
== How can I get added to this list?
-Please create a Pull-Request on GitHub as described https://plc4x.apache.org/latest/developers/contributing.html[here]. The resource requiring editing can be found https://github.com/apache/plc4x/blob/develop/website/asciidoc/modules/users/pages/commercial-support.adoc[here]
+Please create a Pull-Request on GitHub as described xref:developers:contributing.adoc[here]. The resource requiring editing can be found https://github.com/apache/plc4x/blob/develop/website/asciidoc/modules/users/pages/commercial-support.adoc[here]
When updating the table, please keep the alphabetical sort by company name.
diff --git a/website/asciidoc/modules/users/pages/contact.adoc b/website/asciidoc/modules/users/pages/contact.adoc
new file mode 100644
index 0000000000..19345cf466
--- /dev/null
+++ b/website/asciidoc/modules/users/pages/contact.adoc
@@ -0,0 +1,125 @@
+//
+// 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
+//
+// https://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.
+//
+
+
+= Getting in Contact
+
+There is no single "support address" for Apache PLC4X - where to ask depends on what you want to
+do. Everything below is public and archived, with the one exception noted under
+<<_private_plc4x_apache_org,private@>>.
+
+== Mailing Lists
+
+The mailing lists are the official channels of the project.
+Anything that has to be on the record - decisions, releases, votes - happens on `dev@`, because
+that is the only place the whole community can follow along and the archives are permanent.
+
+To subscribe to a list, send an empty mail to `<list>-subscribe@plc4x.apache.org` and reply to the
+confirmation you get back; to leave one again, use `<list>-unsubscribe@plc4x.apache.org`.
+You do not have to be subscribed to read a list - all of them are archived at
+https://lists.apache.org/[lists.apache.org].
+
+[IMPORTANT]
+====
+Posting without being subscribed works, but please subscribe first if you intend to take part in a
+discussion at all.
+
+* *Every* mail from a non-subscriber has to be approved by a moderator by hand - not just the
+first one. That is work for a small number of volunteers, every single time, so treat it as the
+exceptional path rather than the normal way to write to a list.
+* You will not receive any replies. Answers go to the list, and the list only delivers to its
+subscribers, so you would have to go and look your own thread up on
+https://lists.apache.org/[lists.apache.org] to find out whether anybody answered.
+====
+
+[cols="1,3"]
+|===
+|List |What it is for
+
+|dev@plc4x.apache.org
+|The development list. All official discussions happen here: design questions, release votes,
+proposals and anything else that needs a decision. If you are unsure where something belongs, it
+belongs here.
+
+|issues@plc4x.apache.org
+|Where the traffic from GitHub Issues goes. Subscribe if you want to follow what is being reported
+without watching the repository on GitHub.
+
+|commits@plc4x.apache.org
+|Where commits and pull-request related posts go. This is a firehose - useful if you want to see
+every change as it lands.
+
+|[[_private_plc4x_apache_org]]private@plc4x.apache.org
+|*Not a public list.* Only PMC members and members of the foundation can post to or read it. It is
+used for the few things that cannot be discussed in public, such as personnel matters and security
+reports before they are disclosed.
+|===
+
+=== If your mails do not seem to arrive
+
+A mailing list forwards your message on to every subscriber, which means the mail that reaches them
+was sent by the list rather than directly by you. Mail providers with strict security settings -
+Proton is one example - tell the rest of the world to treat anything not sent directly by them as
+suspicious, and the receiving mail services then apply that to the forwarded copy: it can end up in
+somebody's spam folder or be quarantined before they ever see it.
+
+The confusing part is that from your side everything looks fine. Your mail is accepted, it shows up
+in the archives on https://lists.apache.org/[lists.apache.org], and yet some subscribers never got
+it and nobody answers.
+
+If that happens to you, the archive is the thing to check first: if your message is there, it
+reached the list and the problem is on the delivery side rather than something you did wrong.
+
+[TIP]
+====
+If you have an Apache account - which you do if you are a committer on at least one Apache project -
+sign in at https://lists.apache.org/[lists.apache.org] and write your mail from there.
+It is then sent by the foundation's own infrastructure instead of being forwarded on from your
+provider, so it is guaranteed to reach every subscriber.
+
+Without an Apache account, sending from a different address is the usual way around it.
+====
+
+NOTE: We are aware of this and are working on a solution.
+
+== Slack
+
+We have a `#plc4x` channel on the Apache Slack instance, which is a good place for quick questions
+that do not warrant a mail to `dev@`.
+
+If you are a committer on at least one Apache project you can sign yourself up at
+https://s.apache.org/slack-invite[s.apache.org/slack-invite] using your `@apache.org` address.
+If you are not, ask one of the active PMC members of the project for an invite.
+
+IMPORTANT: Slack is convenient, but it is not the record. Anything that needs a decision has to
+make its way to `dev@` - see the note about official discussions above.
+
+== GitHub
+
+The project uses GitHub for everything that is code:
+
+* https://github.com/apache/plc4x/discussions[GitHub Discussions] for questions and open-ended
+conversations that do not fit a mailing list thread.
+* https://github.com/apache/plc4x/issues[GitHub Issues] for reporting bugs and requesting features.
+See xref:issues.adoc[] for more on the issue tracker.
+* https://github.com/apache/plc4x/pulls[Pull Requests] for contributing changes.
+The xref:developers:contributing.adoc[contribution guide] describes how to prepare one.
+
+== Reporting a security issue
+
+Security problems must *not* be reported through GitHub Issues or any of the public lists.
+Please follow the process described on the xref:security.adoc[security] page instead.
diff --git a/website/asciidoc/modules/users/pages/download.adoc b/website/asciidoc/modules/users/pages/download.adoc
index 978c1cec3f..4e8247be6d 100644
--- a/website/asciidoc/modules/users/pages/download.adoc
+++ b/website/asciidoc/modules/users/pages/download.adoc
@@ -156,7 +156,7 @@ improved.
- Core: Fixed several leaks of open threads.
[#release-0_11_0]
-=== 0.11.0 Official https://archive.apache.org/dist/plc4x/0.11.0/apache-plc4x-0.11.0-source-release.zip[source release] [ https://downloads.apache.org/plc4x/0.11.0/apache-plc4x-0.11.0-source-release.zip.sha512[SHA512] ] [ https://downloads.apache.org/plc4x/0.11.0/apache-plc4x-0.10.0-source-release.zip.asc[ASC] ]
+=== 0.11.0 Official https://archive.apache.org/dist/plc4x/0.11.0/apache-plc4x-0.11.0-source-release.zip[source release] [ https://downloads.apache.org/plc4x/0.11.0/apache-plc4x-0.11.0-source-release.zip.sha512[SHA512] ] [ https://downloads.apache.org/plc4x/0.11.0/apache-plc4x-0.11.0-source-release.zip.asc[ASC] ]
The APIs have been streamlined in a preparation for a hopefully soon 1.0.0 release.
Many drivers have been re-implemented with much more features.
@@ -334,7 +334,7 @@ driver is still being ported to the new mspec format.
- All drivers connection strings now follow the same pattern:
{protocol-code:(transport-code:)?//{transport-config}(?{params})?
Please check the drivers documentation on our website:
-https://plc4x.apache.org/users/protocols/s7.html
+xref:protocols/s7.adoc[S7 driver documentation]
- The karaf-feature modules are removed as the drivers now all
provide both a feature.xml as well as a `kar` bundled archive
diff --git a/website/asciidoc/modules/users/pages/getting-started/general-concepts.adoc b/website/asciidoc/modules/users/pages/getting-started/general-concepts.adoc
index df66507c1d..d4a2f6a4dd 100644
--- a/website/asciidoc/modules/users/pages/getting-started/general-concepts.adoc
+++ b/website/asciidoc/modules/users/pages/getting-started/general-concepts.adoc
@@ -83,9 +83,9 @@ For example with a `TCP` and `UDP` transport, this will be the `IP address` or `
For a `Serial` transport this will be the `name of the serial interface`. `Raw Sockets` will require the `device name` or a `MAC address` and so on.
-For a full description of all transports and their options, please consult the `Transport Documentation` link:../transports/index.html[here].
+For a full description of all transports and their options, please consult the `Transport Documentation` xref:transports/index.adoc[here].
-The last segment - `options` - can be used to fine tune some protocol or transport options to non-default values. Usually these vary quite a bit from protocol to protocol. For details on these options, please have a look at the `Protocol Documentation` link:../protocols/index.html[here]. Even if most transports also have common options, their defaults vary quite a bit, depending on the protocol being used. So, instead of having a look at the general `Transport Documentation` link:../tran [...]
+The last segment - `options` - can be used to fine tune some protocol or transport options to non-default values. Usually these vary quite a bit from protocol to protocol. For details on these options, please have a look at the `Protocol Documentation` xref:protocols/index.adoc[here]. Even if most transports also have common options, their defaults vary quite a bit, depending on the protocol being used. So, instead of having a look at the general `Transport Documentation` xref:transports [...]
The general structure of this part is always the same:
@@ -108,7 +108,7 @@ For more information on the default settings for a given protocol or transport,
== Individual Resource Addresses (Tags)
Addresses for individual tags on a PLC are extremely dependent on the used protocol.
-As we usually decided to stick to the address formats that are used in those particular environments, please check the `Protocol Documentation` on details about these address formats link:../protocols/index.html[here].
+As we usually decided to stick to the address formats that are used in those particular environments, please check the `Protocol Documentation` on details about these address formats xref:protocols/index.adoc[here].
The tag syntax is fairly generic and can be summarized as `type:address`.
Some protocols might support tag attributes which are specified as key-value pairs after primary tag address.
diff --git a/website/asciidoc/modules/users/pages/getting-started/index.adoc b/website/asciidoc/modules/users/pages/getting-started/index.adoc
index 16bafec37a..e649054419 100644
--- a/website/asciidoc/modules/users/pages/getting-started/index.adoc
+++ b/website/asciidoc/modules/users/pages/getting-started/index.adoc
@@ -23,12 +23,12 @@ Depending on the programming language, the usage will differ, therefore please g
== Go/Golang
-For guides on how to write PLC4X applications with Go, please go to the link:plc4go.html[Go Getting Started]
+For guides on how to write PLC4X applications with Go, please go to the xref:getting-started/plc4go.adoc[Go Getting Started]
== Java
-For guides on how to write PLC4X applications with Java, please go to the link:plc4j.html[Java Getting Started]
+For guides on how to write PLC4X applications with Java, please go to the xref:getting-started/plc4j.adoc[Java Getting Started]
== Python
-For guides on how to write PLC4X applications with Python, please go to the link:plc4py.html[Python Getting Started]
+For guides on how to write PLC4X applications with Python, please go to the xref:getting-started/plc4py.adoc[Python Getting Started]
diff --git a/website/asciidoc/modules/users/pages/getting-started/plc4go.adoc b/website/asciidoc/modules/users/pages/getting-started/plc4go.adoc
index d045c13548..74ce17b8d0 100644
--- a/website/asciidoc/modules/users/pages/getting-started/plc4go.adoc
+++ b/website/asciidoc/modules/users/pages/getting-started/plc4go.adoc
@@ -34,11 +34,11 @@ This will effectively only create a `go.mod` file, which is sort of like Go's co
This should look like this:
-```
+----
module main
go 1.16
-```
+----
Now we need to create a `app.go` file which will be our main program.
diff --git a/website/asciidoc/modules/users/pages/index.adoc b/website/asciidoc/modules/users/pages/index.adoc
index 361a17b766..a72880dbb1 100644
--- a/website/asciidoc/modules/users/pages/index.adoc
+++ b/website/asciidoc/modules/users/pages/index.adoc
@@ -32,7 +32,7 @@ This is possible, as PLC4X implements the protocols for the most common industri
This allows users to develop software mostly independent of the actual type of hardware used.
-## About Apache PLC4X
+== About Apache PLC4X
Apache PLC4X is an effort to create a set of libraries for communicating with industrial grade programmable logic controllers (PLCs) in a uniform way.
We are planning on shipping libraries for usage in:
@@ -58,9 +58,9 @@ And brings stand-alone (Java) utils like:
It also provides (Java) tools for usage inside an application:
-- link:tools/connection-cache.html[Connection Cache] (Connection Cache for PLC connections)
-- link:tools/event-pump.html[Event-Pump] (Util for automating fetching PLC data using a variety of triggers)
-- link:tools/opm.html[Object PLC Mapping (OPM)] (Object PLC Mapping - Like JPA for PLC data)
-- link:tools/plc4x-server.adoc[PLC4X-Server] (A small relay server that speaks the **PLC4X proxy protocol**.)
-- link:tools/testing.html[Testing-Utils] (Want to build/test an application without having a PLC? ... this is the tool for you)
+- xref:tools/connection-cache.adoc[Connection Cache] (Connection Cache for PLC connections)
+- xref:tools/event-pump.adoc[Event-Pump] (Util for automating fetching PLC data using a variety of triggers)
+- xref:tools/opm.adoc[Object PLC Mapping (OPM)] (Object PLC Mapping - Like JPA for PLC data)
+- xref:tools/plc4x-server.adoc[PLC4X-Server] (A small relay server that speaks the **PLC4X proxy protocol**.)
+- xref:tools/testing.adoc[Testing-Utils] (Want to build/test an application without having a PLC? ... this is the tool for you)
diff --git a/website/asciidoc/modules/users/pages/integrations/apache-kafka.adoc b/website/asciidoc/modules/users/pages/integrations/apache-kafka.adoc
index dbdc1a3459..4dbcabe94d 100644
--- a/website/asciidoc/modules/users/pages/integrations/apache-kafka.adoc
+++ b/website/asciidoc/modules/users/pages/integrations/apache-kafka.adoc
@@ -28,7 +28,7 @@ mission-critical applications.
== PLC4X Kafka Connectors
The PLC4X connectors have the ability to pass data between Kafka and devices using industrial protocols.
-They can be built from source from the latest https://github.com/apache/plc4x-extras/tree/main/plc4j/integrations/apache-kafka[plc4x extras - kafka integration] and plc4x https://plc4x.apache.org/users/download.html[release] of
+They can be built from source from the latest https://github.com/apache/plc4x-extras/tree/main/plc4j/integrations/apache-kafka[plc4x extras - kafka integration] and plc4x xref:download.adoc[release] of
PLC4X or from the latest snapshot from https://github.com/apache/plc4x[github].
== Introduction
diff --git a/website/asciidoc/modules/users/pages/integrations/apache-nifi.adoc b/website/asciidoc/modules/users/pages/integrations/apache-nifi.adoc
index cf347d5cfc..f2b30b70bc 100644
--- a/website/asciidoc/modules/users/pages/integrations/apache-nifi.adoc
+++ b/website/asciidoc/modules/users/pages/integrations/apache-nifi.adoc
@@ -74,13 +74,13 @@ As soon as your new processor is added to the canvas you need to configure it. D
Here you now need to provide a `PLC4X connection string` and a `PLC resource address String`.
-The `PLC connection String` is just a normal PLC4X connection string. Please consult the documentation on using the different types of supported connections link:https://plc4x.apache.org/users/protocols/index.html[Here]
+The `PLC connection String` is just a normal PLC4X connection string. Please consult the documentation on using the different types of supported connections xref:protocols/index.adoc[Here]
The `PLC resource address String` is a `;`-separarated list of `name-value-pairs`, where each `name` is assigned a `plc4x addrress`.
[NOTE]
====
-For information on how an address string looks for the type of driver you are using, please check the documentation for the driver you are using link:https://plc4x.apache.org/users/protocols/index.html[Here]
+For information on how an address string looks for the type of driver you are using, please check the documentation for the driver you are using xref:protocols/index.adoc[Here]
====
Example:
diff --git a/website/asciidoc/modules/users/pages/integrations/eclipse-milo.adoc b/website/asciidoc/modules/users/pages/integrations/eclipse-milo.adoc
index 6b7d3a4096..531bf8f527 100644
--- a/website/asciidoc/modules/users/pages/integrations/eclipse-milo.adoc
+++ b/website/asciidoc/modules/users/pages/integrations/eclipse-milo.adoc
@@ -25,9 +25,9 @@ industrial devices effectively acting as a industrial OPC UA gateway.
== Building the server
The OPC UA server can be built using maven as part of the PLC4X build.
-```
+----
mvn install
-```
+----
This creates a target directory within plc4x/plc4j/integrations/opcua-server containing a jar file which is the main java
executable.
@@ -60,7 +60,7 @@ the OPC UA server tree. Be sure that this is unique within the configuration fil
An example configuration file is shown below.
-```
+----
---
version: "0.8"
dir: {path-to-security-dir}
@@ -93,14 +93,14 @@ devices:
address: "RANDOM/Temporary:Integer"
tcpPort: 12687
httpPort: 8445
-```
+----
== Running
To run the java executable execute:-
-```
+----
java -jar plc4x-opcua-server-0.8.0-uber-jar.jar -c {path-to-config-file} -i
-```
+----
This will start the OPC UA server with the interactive switch (-i). This prompts the server to ask for usernames and
passwords upon startup. However, during normal operation the -i switch should be left out.
@@ -109,15 +109,15 @@ created. This certificate is password protected with the security password given
If you place another certificate here make sure it is password protected and set the password by running the server
again with --set-password switch.
-```
+----
java -jar plc4x-opcua-server-0.8.0-uber-jar.jar -c {path-to-config-file} -i -s
-```
+----
Once the OPC UA server is running you are able to connect to it from your favorite OPC UA client using the connection
string.
-```
+----
opc.tcp://{ip.address}:12687/plc4x
-```
+----
Replacing the {ip.address} with the servers IP address.
If you want to use an encrypted connection be sure to move the client certificate created in
diff --git a/website/asciidoc/modules/users/pages/protocols/can.adoc b/website/asciidoc/modules/users/pages/protocols/can.adoc
index fc3cdc9183..097f9b6289 100644
--- a/website/asciidoc/modules/users/pages/protocols/can.adoc
+++ b/website/asciidoc/modules/users/pages/protocols/can.adoc
@@ -22,8 +22,8 @@
image::users/protocols/can_banner.png[banner,512,167]
NOTE: This page describes how the CAN drivers are put together. There is no driver with the
-protocol code `can` - connect with xref:canopen.adoc[CANopen] (`canopen`) or
-xref:genericcan.adoc[GenericCAN] (`genericcan`) instead.
+protocol code `can` - connect with xref:protocols/canopen.adoc[CANopen] (`canopen`) or
+xref:protocols/genericcan.adoc[GenericCAN] (`genericcan`) instead.
CAN differs from the other buses PLC4X supports in that the wire carries short, identifier-tagged
frames rather than a request/response stream. The transports own the bus access and hand the
@@ -32,7 +32,7 @@ application-layer protocol.
== Transport and frame model
-The link:../transports/can.html[CAN transport facade] provides a single frame representation that
+The xref:transports/can.adoc[CAN transport facade] provides a single frame representation that
all CAN drivers work against:
* `CanFrame` (`plc4j/transports/can`) - an identifier, up to 8 data bytes, and the standard/extended
@@ -51,9 +51,9 @@ components against each other without a physical interface).
Each CAN driver is a `ConnectionBase` implementation that owns a message codec translating between
`CanFrame` and its own protocol frame:
-* xref:canopen.adoc[CANopen] - `CANOpenConnection` with `CANOpenMessageCodec`, implementing the
+* xref:protocols/canopen.adoc[CANopen] - `CANOpenConnection` with `CANOpenMessageCodec`, implementing the
CANopen service model (SDO, PDO, NMT, heartbeat).
-* xref:genericcan.adoc[GenericCAN] - `GenericCANConnection`, which applies no application-layer
+* xref:protocols/genericcan.adoc[GenericCAN] - `GenericCANConnection`, which applies no application-layer
semantics at all and simply maps identifiers to typed payload slices.
Incoming frames arrive from the codec and are dispatched to the subscriptions registered for the
diff --git a/website/asciidoc/modules/users/pages/protocols/df1.adoc b/website/asciidoc/modules/users/pages/protocols/df1.adoc
index ecc86851e7..6613b411f6 100644
--- a/website/asciidoc/modules/users/pages/protocols/df1.adoc
+++ b/website/asciidoc/modules/users/pages/protocols/df1.adoc
@@ -44,7 +44,7 @@ builds a connection, transport or tag handler on top of it.
== Related: AB-ETH
-The DF1 *command* layer is reused by the xref:ab-eth.adoc[AB-ETH] driver, which tunnels DF1
+The DF1 *command* layer is reused by the xref:protocols/ab-eth.adoc[AB-ETH] driver, which tunnels DF1
commands inside CIP encapsulation over Ethernet. That is a working driver in Java, and it is what
you want if your device is reachable over Ethernet rather than a serial port. The DF1 message types
it uses are generated into the ab-eth module rather than shared from here.
diff --git a/website/asciidoc/modules/users/pages/protocols/opcua.adoc b/website/asciidoc/modules/users/pages/protocols/opcua.adoc
index be7f34b19e..1b2db1552c 100644
--- a/website/asciidoc/modules/users/pages/protocols/opcua.adoc
+++ b/website/asciidoc/modules/users/pages/protocols/opcua.adoc
@@ -70,7 +70,7 @@ Manual tests proven that driver is able to communicate with OPC UA server launch
Depending on actual configuration of remote end there might be necessity to prepare client certificate.
Preparation of certificate is beyond driver, however in case when no client certificate is provided, it will be auto-generated to establish a session.
-Please follow our tutorial link:../getting-started/opcua-client-certificate.html[on provisioning of client private key and certificate].
+Please follow our tutorial xref:getting-started/opcua-client-certificate.adoc[on provisioning of client private key and certificate].
By following it you will be able to create self-signed certificate for use with both hardware and software based OPC-UA servers.
Please note that there are multiple appearances of certificates within specification.
There is the application instance certificate securing the communication channel, which is provided through the keystore options described below, and there is a X509 certificate identifying the *user*, which is supplied separately - see <<User authentication>>.
@@ -112,7 +112,7 @@ opcua:tcp://127.0.0.1:12686?security-policy=Basic256Sha256&message-security=SIGN
A generated certificate is fresh for every connection, so a server that keeps a trust list will
reject it until it is trusted there. For anything beyond a first connection attempt, supply your own
certificate through `tls.keystore` instead - see
-link:../getting-started/opcua-client-certificate.html[the client certificate tutorial].
+xref:getting-started/opcua-client-certificate.adoc[the client certificate tutorial].
== User authentication
@@ -350,7 +350,7 @@ So far Apache PLC4X OPC-UA client have been confirmed to be working with below s
- https://github.com/OPCFoundation/UA-.NETStandard[OPC Foundation UA-.NET Standard]
- Simocode OPC UA server
* versions prior 0.12
-- https://eclipse.org/milo[Eclipse Milo]
+- https://eclipse.dev/milo/[Eclipse Milo]
== More details on OPC UA
diff --git a/website/asciidoc/modules/users/pages/tools/testing.adoc b/website/asciidoc/modules/users/pages/tools/testing.adoc
index cb16b77752..e459e30d54 100644
--- a/website/asciidoc/modules/users/pages/tools/testing.adoc
+++ b/website/asciidoc/modules/users/pages/tools/testing.adoc
@@ -40,7 +40,7 @@ The connection string Syntax for the mock driver is `mock:{name-of-the-connectio
The Mock Driver does nothing else than forwarding all Requests to a `Virtual Device which we can provide to control all responses and also Monitor them, e.g. for unit tests.
The Interface for the Mock Device is
-```
+----
public interface MockDevice {
Pair<PlcResponseCode, PlcValue> read(String fieldQuery);
@@ -54,7 +54,7 @@ public interface MockDevice {
// ...
}
-```
+----
== Simple Example
@@ -62,17 +62,17 @@ Imagine we have some Code which we cannot control or whose functionality we want
This can be done with the Mock Driver in the following way.
First, a new Mock Connection is established (like any other connection also would be):
-```
+----
PlcMockConnection connection = (PlcMockConnection) PlcDriverManager.getDefault().getConnectionFactory().getConnection("mock:my-mock-connection");
-```
+----
You see, that we directly cast the Connection to a `PlcMockConnection`. This is done, because we need to _connect_ a Device to this Mock Connection.
This is done in the following Snippet
-```
+----
connection.setDevice(mockDevice);
-```
+----
Here, we pass it an instance of `MockDevice` which could be a simple Implementation of the interface like
-```
+----
MockDevice mockDevice = new MockDevice() {
Pair<PlcResponseCode, PlcValue> read(String fieldQuery) {
@@ -88,7 +88,7 @@ MockDevice mockDevice = new MockDevice() {
// ...
}
-```
+----
This would just return a String Value `hello` for every request and print all read and write requests to the Console.
== Unit Testing with the Mock Driver
@@ -96,7 +96,7 @@ This would just return a String Value `hello` for every request and print all re
To use the Mock driver in Unit Tests the easiest way is to generate the `MockDriver` instance as Mockito (or any other Framework) Mock.
Like in the following Example
-```
+----
MockDevice mockDevice = Mockito.mock(MockDevice.class);
PlcMockConnection connection = (PlcMockConnection) PlcDriverManager.getDefault().getConnectionFactory().getConnection("mock:my-mock-connection");
@@ -117,11 +117,11 @@ connection
// Check that the we really issued a Read request to the Field "MyAdress"
verify(mockDevice).read(eq("MyAdress"));
-```
+----
But as the `MockDriver` uses a static Mock Connection registry the following Code works also
-```
+----
MockDevice mockDevice = Mockito.mock(MockDevice.class);
// Setup
@@ -147,7 +147,7 @@ try (PlcConnection conn = PlcDriverManager.getDefault().getConnectionFactory().g
// Check that the we really issued a Read request to the Field "MyAdress"
verify(mockDevice).read(eq("MyAdress"));
-```
+----
The Snippet above shows that the part under test really has to share nothing with the test code except for the connection string.
diff --git a/website/asciidoc/modules/users/pages/transports/can.adoc b/website/asciidoc/modules/users/pages/transports/can.adoc
index a8001cac83..8124fe59c1 100644
--- a/website/asciidoc/modules/users/pages/transports/can.adoc
+++ b/website/asciidoc/modules/users/pages/transports/can.adoc
@@ -72,8 +72,8 @@ In this regard, these operations can be made by library available for specific C
== Developer notes
Usage of CAN transport APIs is recommended for portability reasons.
-Please have a look on link:../protocols/can.html[CAN] describe usage of CAN driver adapter with CAN transport facade.
+Please have a look on xref:protocols/can.adoc[CAN] describe usage of CAN driver adapter with CAN transport facade.
== Compatible CAN transports
-- link:socketcan.html[SocketCAN]
\ No newline at end of file
+- xref:transports/socketcan.adoc[SocketCAN]
\ No newline at end of file
diff --git a/website/asciidoc/modules/users/pages/transports/index.adoc b/website/asciidoc/modules/users/pages/transports/index.adoc
index faebe57390..c1a698b639 100644
--- a/website/asciidoc/modules/users/pages/transports/index.adoc
+++ b/website/asciidoc/modules/users/pages/transports/index.adoc
@@ -21,10 +21,10 @@
-- link:tcp.html[TCP]
-- link:udp.html[UDP]
-- link:raw-socket.html[Raw Socket]
-- link:serial.html[Serial Port]
-- link:can.html[CAN bus]
-- link:socketcan.html[SocketCAN]
-- link:pcap-replay.html[PCAP replay]
+- xref:transports/tcp.adoc[TCP]
+- xref:transports/udp.adoc[UDP]
+- xref:transports/raw-socket.adoc[Raw Socket]
+- xref:transports/serial.adoc[Serial Port]
+- xref:transports/can.adoc[CAN bus]
+- xref:transports/socketcan.adoc[SocketCAN]
+- xref:transports/pcap-replay.adoc[PCAP replay]
diff --git a/website/asciidoc/modules/users/partials/opcua.adoc b/website/asciidoc/modules/users/partials/opcua.adoc
index ddb25feb42..6a7678c8ba 100644
--- a/website/asciidoc/modules/users/partials/opcua.adoc
+++ b/website/asciidoc/modules/users/partials/opcua.adoc
@@ -82,9 +82,10 @@ has not named before. Set to 0 for no limit.
expanded twice, so a reference cycle terminates on its own, but a server naming a fresh node at +
every level describes a tree with no bottom. Set to 0 for no limit.
|`tls.verify` |BOOLEAN |true| |Verifies the OPC UA server's certificate. Set to false to trust any certificate the server presents. +
-This is UNSAFE: it leaves the connection open to man-in-the-middle attacks and defeats the integrity/authenticity +
-guarantees of a signed secure channel. Only turn verification off for local testing. In production, establish trust with +
-`tls.trust-store` (chain validation) or `server-certificate-file` (certificate pinning) instead.
+Turning it off is UNSAFE: it leaves the connection open to man-in-the-middle attacks and defeats the +
+integrity/authenticity guarantees of a signed secure channel. Only do so for local testing. In production, +
+establish trust with `tls.trust-store` (chain validation) or `server-certificate-file` (certificate +
+pinning) instead.
|`channel-lifetime-ms` |LONG |3600000| |Time for which negotiated secure channel, its keys and session remains open. Value in milliseconds, by default 60 minutes.
|`min-channel-lifetime-ms` |LONG |5000| |Shortest secure-channel lifetime this client will work with, in milliseconds. A server may revise the requested channel-lifetime-ms downwards, and the renewal schedule is derived from whatever it returns - so a very short lifetime means very frequent renewals, on an executor shared by every OPC UA connection in this JVM. A server-supplied lifetime below this value is raised to it and a warning is logged. If a server genuinely needs faster renewal, [...]
|`session-timeout-ms` |LONG |120000| |Expiry time for opened secure session, value in milliseconds. Defaults to 2 minutes.
diff --git a/website/resources/plc4x-doap.rdf b/website/resources/plc4x-doap.rdf
index 2cb1e6faa7..07eb1f75eb 100644
--- a/website/resources/plc4x-doap.rdf
+++ b/website/resources/plc4x-doap.rdf
@@ -53,7 +53,7 @@
<description>PLC4X is a set of libraries for communicating with industrial programmable logic controllers (PLCs) using a variety of protocols but with a shared API.</description>
<bug-database rdf:resource="https://github.com/apache/plc4x/issues"/>
<download-page rdf:resource="https://plc4x.apache.org/plc4x/latest/users/download.html"/>
- <mailing-list rdf:resource="https://plc4x.apache.org/plc4x/latest/mailing-lists.html"/>
+ <mailing-list rdf:resource="https://plc4x.apache.org/plc4x/latest/users/contact.html"/>
<programming-language>C</programming-language>
<programming-language>C++</programming-language>