This is an automated email from the ASF dual-hosted git repository. jmclean pushed a commit to branch incubator in repository https://gitbox.apache.org/repos/asf/training.git
commit bb402f031fc00af99e04a16fa9acf1d2b1f662e2 Author: Justin Mclean <[email protected]> AuthorDate: Tue Sep 16 12:19:12 2025 +1000 Added slide decks on podling PPMC and Committers onboarding --- .../.mvn/wrapper/maven-wrapper.properties | 19 + content/Apache/Incubator/Committers/Dockerfile | 81 +++++ content/Apache/Incubator/Committers/README.md | 57 +++ .../Incubator/Committers/docker-compose.yaml | 31 ++ .../Incubator/Committers/install-deps-centos.sh | 61 ++++ .../Incubator/Committers/install-deps-mac.sh | 52 +++ content/Apache/Incubator/Committers/mvnw | 259 ++++++++++++++ content/Apache/Incubator/Committers/mvnw.cmd | 149 ++++++++ content/Apache/Incubator/Committers/pom.xml | 64 ++++ .../Committers/src/main/asciidoc/_settings.adoc | 36 ++ .../Committers/src/main/asciidoc/index.adoc | 278 +++++++++++++++ .../main/java/org/apache/training/StringUtils.java | 27 ++ .../Committers/src/main/resources/apache.css | 381 +++++++++++++++++++++ .../PPMC/.mvn/wrapper/maven-wrapper.properties | 19 + content/Apache/Incubator/PPMC/Dockerfile | 81 +++++ content/Apache/Incubator/PPMC/README.md | 57 +++ content/Apache/Incubator/PPMC/docker-compose.yaml | 31 ++ .../Apache/Incubator/PPMC/install-deps-centos.sh | 61 ++++ content/Apache/Incubator/PPMC/install-deps-mac.sh | 52 +++ content/Apache/Incubator/PPMC/mvnw | 259 ++++++++++++++ content/Apache/Incubator/PPMC/mvnw.cmd | 149 ++++++++ content/Apache/Incubator/PPMC/pom.xml | 64 ++++ .../PPMC/src/main/asciidoc/_settings.adoc | 36 ++ .../Incubator/PPMC/src/main/asciidoc/index.adoc | 244 +++++++++++++ .../main/java/org/apache/training/StringUtils.java | 27 ++ .../Incubator/PPMC/src/main/resources/apache.css | 381 +++++++++++++++++++++ content/Apache/Incubator/pom.xml | 2 + content/Conferences/Gravitino/convert-slides.js | 27 ++ site/pom.xml | 14 + 29 files changed, 2999 insertions(+) diff --git a/content/Apache/Incubator/Committers/.mvn/wrapper/maven-wrapper.properties b/content/Apache/Incubator/Committers/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 0000000..d58dfb7 --- /dev/null +++ b/content/Apache/Incubator/Committers/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,19 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# 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. +wrapperVersion=3.3.2 +distributionType=only-script +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip diff --git a/content/Apache/Incubator/Committers/Dockerfile b/content/Apache/Incubator/Committers/Dockerfile new file mode 100644 index 0000000..95f8d06 --- /dev/null +++ b/content/Apache/Incubator/Committers/Dockerfile @@ -0,0 +1,81 @@ +# 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. + +########################################################################################## +# Build Apache Training +########################################################################################## + +# Fixed version of this in order to have a fixed JDK version +FROM azul/zulu-openjdk:21 as build + +# Install some stuff we need to run the build +RUN apt update -y +RUN apt install -y git graphviz wget bzip2 python3 python3-pip imagemagick curl protobuf-compiler mc + +# Install the version 1.76.0 of the Rust toolchain +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.76.0 +ENV PATH="/root/.cargo/bin:$PATH" +# Install svgbob +RUN cargo install svgbob_cli +RUN cp /root/.cargo/bin/svgbob_cli /usr/local/bin + +# Forced version of pillow as with version 10 the build fails +RUN python3 -m pip install --upgrade pip setuptools==57.5.0 seqdiag blockdiag actdiag nwdiag convert racks opc-diag pillow==9.5.0 + +#ENV CONDA_DIR /opt/conda +#RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh -O /root/miniconda.sh +#RUN sh /root/miniconda.sh -b -p $CONDA_DIR +#ENV PATH=$CONDA_DIR/bin:$PATH +#RUN conda update -y conda +#RUN rm /root/miniconda.sh +#RUN wget --quiet https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh -O /root/miniconda.sh && sh /root/miniconda.sh -b -p /opt/conda +#ENV PATH=$CONDA_DIR/bin:$PATH + +# Install vg2svg for rendering vega diagrams +# NOTE: Installing vega-cli doesn't seem to work as dependencies are not available for arm64 (silicon) +ENV NODE_VERSION=18.20.4 +RUN curl --silent -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash +RUN /root/.nvm/install.sh +ENV PATH=/root/.nvm/versions/node/v$NODE_VERSION/bin:$PATH +#RUN npm install --no-audit vega + +#RUN wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 +#RUN bunzip2 phantomjs-2.1.1-linux-x86_64.tar.bz2 +#RUN tar -xvf phantomjs-2.1.1-linux-x86_64.tar + +# Install ERD +RUN apt install -y golang +ENV PATH=/root/go/bin:$PATH +RUN go install github.com/kaishuu0123/[email protected] + +# Install Syntrax +# https://kevinpt.github.io/syntrax/ +# Problem is, that newer versions of python don't have use_2to3 +#RUN apt install -y libcairo2-dev pkg-config python3-dev python3-gi python3-gi-cairo gir1.2-gtk-4.0 +RUN apt install -y libcairo2-dev pkg-config python3-dev python3-gi gir1.2-gtk-4.0 +RUN python3 -m pip install --upgrade pycairo pango syntrax +# For some reason, if we install this before the python stuff, it doesn't work +RUN apt install -y python3-gi-cairo + +# Install Mermaid +# Mermaid seems to have issues with Apple Silicon +#RUN apt install -y nodejs npm +RUN npm install -g @mermaid-js/mermaid-cli + +# Required for running on Windows systems +RUN apt install -y dos2unix + +# Change the working directory (where commands are executed) into the new "ws" directory +WORKDIR /ws \ No newline at end of file diff --git a/content/Apache/Incubator/Committers/README.md b/content/Apache/Incubator/Committers/README.md new file mode 100644 index 0000000..cf2dfe4 --- /dev/null +++ b/content/Apache/Incubator/Committers/README.md @@ -0,0 +1,57 @@ +<!-- + + 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. + +--> + +# Presentation with Reveal.JS and AsciiDoctor + +Remarks: +- In order to use the preview of the IntelliJ asciidoctor plugin, you need to set an attribute in the plugin settings: `imagesdir` = `../resources/images` +- Any css adjustments can go to `src/main/theme/apache.css` as this is automatically embedded into the themes directory. + +## Building the presentation + +Apache Training makes use of several tools in order to compile the presentations. +The probably simplest way to build the project is using Docker, as we provide the Dockerfile for installing all prerequisites. +``` +docker compose up +``` +This should produce compiled versions of all presentations in your local working copy. + +If you want to build the presentation on your local system the following command should do. +However, if you are missing prerequisites, then this build will most probably fail. + +By running the following command, you can generate the presentation: +``` +mvn package +``` +## Running the presentation + +In order to show the presentation, go into the `target` directory and look for a directory named {artifactId}-{version}. +This direcotry contains an `index.html` file. + +Simply open this in any browser of your choice. + +## Generating PDF versions + +In order to generate a PDF version of the presentation just add `?print-pdf` to the url. (Keep in mind, that you have to add it before any `#blahblah`) + +The following link should do the trick: +``` +http:///{someFilePath}/?print-pdf +``` +As soon as that's loaded, the presentation will look a bit odd. Now just use the normal `print` functionality of the browser and select `print as PDF`. diff --git a/content/Apache/Incubator/Committers/docker-compose.yaml b/content/Apache/Incubator/Committers/docker-compose.yaml new file mode 100644 index 0000000..c33a0a3 --- /dev/null +++ b/content/Apache/Incubator/Committers/docker-compose.yaml @@ -0,0 +1,31 @@ +# +# 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. +# + +version: "3.8" +services: + builder: + build: + context: . + dockerfile: Dockerfile + command: ["/ws/mvnw", "-e", "-Dmaven.repo.local=/ws/out/.repository", "clean", "install"] + volumes: + # Bind the local directory as "/ws" + - type: bind + source: . + target: /ws diff --git a/content/Apache/Incubator/Committers/install-deps-centos.sh b/content/Apache/Incubator/Committers/install-deps-centos.sh new file mode 100644 index 0000000..b83d36d --- /dev/null +++ b/content/Apache/Incubator/Committers/install-deps-centos.sh @@ -0,0 +1,61 @@ +#!/usr/bin/env bash +# ---------------------------------------------------------------------------- +# 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. +# ---------------------------------------------------------------------------- + + +############# install necessary packages +yum install -y git graphviz maven nodejs wget bzip2 python36 python36-pip pygobject3 cargo + +############# +python3 -m pip install --upgrade pip setuptools seqdiag blockdiag actdiag nwdiag convert syntrax racks opc-diag +npm install vega pango + +############# install stack +wget -qO- https://get.haskellstack.org/ | sh + +############# install PhantomJS +wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 +bunzip2 phantomjs-2.1.1-linux-x86_64.tar.bz2 +tar -xvf phantomjs-2.1.1-linux-x86_64.tar + +############# install ERD +cd libs +mkdir third-party +cd third-party +git clone https://github.com/BurntSushi/erd.git +cd erd +stack install +read -p "Add stack ($HOME/.local/bin) to PATH ($PATH) ? (y/n)" -n 1 -r YES_NO +if [ $YES_NO = "y" ]; then + echo 'export PATH=$PATH:$HOME/.local/bin' >> ~/.bash_profile + . ~/.bash_profile +fi + +############# install SVGBob +cargo install svgbob_cli +read -p "Add cargo ($HOME/.cargo/bin) to PATH ($PATH) ? (y/n)" -n 1 -r YES_NO +if [ $YES_NO = "y" ]; then + echo 'export PATH=$PATH:$HOME/.cargo/bin' >> ~/.bash_profile + . ~/.bash_profile +fi + +############# +cd ../../.. +mvn jetty:run-exploded + diff --git a/content/Apache/Incubator/Committers/install-deps-mac.sh b/content/Apache/Incubator/Committers/install-deps-mac.sh new file mode 100644 index 0000000..25d677a --- /dev/null +++ b/content/Apache/Incubator/Committers/install-deps-mac.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash +# ---------------------------------------------------------------------------- +# 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. +# ---------------------------------------------------------------------------- + +cd libs +mkdir third-party +cd third-party + +# Install ERD +git clone git://github.com/BurntSushi/erd +cd erd +stack init +stack build --system-ghc +cd .. + +# Install Mermaid +npm install mermaid.cli + +# Install PhantomJS +wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-macosx.zip +unzip phantomjs-2.1.1-macosx.zip + +# SVGBob +cargo install svgbob_cli --path ./svgbob + +# Syntrax +pip install --upgrade syntrax +pip install pycairo +brew install pygobject3 + +# Vega +npm install vega + +# ImageMagic +#wget https://imagemagick.org/download/binaries/ImageMagick-x86_64-apple-darwin17.7.0.tar.gz +#tar xvzf ImageMagick-x86_64-apple-darwin17.7.0.tar.gz diff --git a/content/Apache/Incubator/Committers/mvnw b/content/Apache/Incubator/Committers/mvnw new file mode 100755 index 0000000..19529dd --- /dev/null +++ b/content/Apache/Incubator/Committers/mvnw @@ -0,0 +1,259 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# 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. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Apache Maven Wrapper startup batch script, version 3.3.2 +# +# Optional ENV vars +# ----------------- +# JAVA_HOME - location of a JDK home dir, required when download maven via java source +# MVNW_REPOURL - repo url base for downloading maven distribution +# MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven +# MVNW_VERBOSE - true: enable verbose log; debug: trace the mvnw script; others: silence the output +# ---------------------------------------------------------------------------- + +set -euf +[ "${MVNW_VERBOSE-}" != debug ] || set -x + +# OS specific support. +native_path() { printf %s\\n "$1"; } +case "$(uname)" in +CYGWIN* | MINGW*) + [ -z "${JAVA_HOME-}" ] || JAVA_HOME="$(cygpath --unix "$JAVA_HOME")" + native_path() { cygpath --path --windows "$1"; } + ;; +esac + +# set JAVACMD and JAVACCMD +set_java_home() { + # For Cygwin and MinGW, ensure paths are in Unix format before anything is touched + if [ -n "${JAVA_HOME-}" ]; then + if [ -x "$JAVA_HOME/jre/sh/java" ]; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACCMD="$JAVA_HOME/jre/sh/javac" + else + JAVACMD="$JAVA_HOME/bin/java" + JAVACCMD="$JAVA_HOME/bin/javac" + + if [ ! -x "$JAVACMD" ] || [ ! -x "$JAVACCMD" ]; then + echo "The JAVA_HOME environment variable is not defined correctly, so mvnw cannot run." >&2 + echo "JAVA_HOME is set to \"$JAVA_HOME\", but \"\$JAVA_HOME/bin/java\" or \"\$JAVA_HOME/bin/javac\" does not exist." >&2 + return 1 + fi + fi + else + JAVACMD="$( + 'set' +e + 'unset' -f command 2>/dev/null + 'command' -v java + )" || : + JAVACCMD="$( + 'set' +e + 'unset' -f command 2>/dev/null + 'command' -v javac + )" || : + + if [ ! -x "${JAVACMD-}" ] || [ ! -x "${JAVACCMD-}" ]; then + echo "The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run." >&2 + return 1 + fi + fi +} + +# hash string like Java String::hashCode +hash_string() { + str="${1:-}" h=0 + while [ -n "$str" ]; do + char="${str%"${str#?}"}" + h=$(((h * 31 + $(LC_CTYPE=C printf %d "'$char")) % 4294967296)) + str="${str#?}" + done + printf %x\\n $h +} + +verbose() { :; } +[ "${MVNW_VERBOSE-}" != true ] || verbose() { printf %s\\n "${1-}"; } + +die() { + printf %s\\n "$1" >&2 + exit 1 +} + +trim() { + # MWRAPPER-139: + # Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds. + # Needed for removing poorly interpreted newline sequences when running in more + # exotic environments such as mingw bash on Windows. + printf "%s" "${1}" | tr -d '[:space:]' +} + +# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties +while IFS="=" read -r key value; do + case "${key-}" in + distributionUrl) distributionUrl=$(trim "${value-}") ;; + distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;; + esac +done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties" +[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties" + +case "${distributionUrl##*/}" in +maven-mvnd-*bin.*) + MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ + case "${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)" in + *AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;; + :Darwin*x86_64) distributionPlatform=darwin-amd64 ;; + :Darwin*arm64) distributionPlatform=darwin-aarch64 ;; + :Linux*x86_64*) distributionPlatform=linux-amd64 ;; + *) + echo "Cannot detect native platform for mvnd on $(uname)-$(uname -m), use pure java version" >&2 + distributionPlatform=linux-amd64 + ;; + esac + distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip" + ;; +maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;; +*) MVN_CMD="mvn${0##*/mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;; +esac + +# apply MVNW_REPOURL and calculate MAVEN_HOME +# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash> +[ -z "${MVNW_REPOURL-}" ] || distributionUrl="$MVNW_REPOURL$_MVNW_REPO_PATTERN${distributionUrl#*"$_MVNW_REPO_PATTERN"}" +distributionUrlName="${distributionUrl##*/}" +distributionUrlNameMain="${distributionUrlName%.*}" +distributionUrlNameMain="${distributionUrlNameMain%-bin}" +MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}" +MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")" + +exec_maven() { + unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || : + exec "$MAVEN_HOME/bin/$MVN_CMD" "$@" || die "cannot exec $MAVEN_HOME/bin/$MVN_CMD" +} + +if [ -d "$MAVEN_HOME" ]; then + verbose "found existing MAVEN_HOME at $MAVEN_HOME" + exec_maven "$@" +fi + +case "${distributionUrl-}" in +*?-bin.zip | *?maven-mvnd-?*-?*.zip) ;; +*) die "distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found '${distributionUrl-}'" ;; +esac + +# prepare tmp dir +if TMP_DOWNLOAD_DIR="$(mktemp -d)" && [ -d "$TMP_DOWNLOAD_DIR" ]; then + clean() { rm -rf -- "$TMP_DOWNLOAD_DIR"; } + trap clean HUP INT TERM EXIT +else + die "cannot create temp dir" +fi + +mkdir -p -- "${MAVEN_HOME%/*}" + +# Download and Install Apache Maven +verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." +verbose "Downloading from: $distributionUrl" +verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" + +# select .zip or .tar.gz +if ! command -v unzip >/dev/null; then + distributionUrl="${distributionUrl%.zip}.tar.gz" + distributionUrlName="${distributionUrl##*/}" +fi + +# verbose opt +__MVNW_QUIET_WGET=--quiet __MVNW_QUIET_CURL=--silent __MVNW_QUIET_UNZIP=-q __MVNW_QUIET_TAR='' +[ "${MVNW_VERBOSE-}" != true ] || __MVNW_QUIET_WGET='' __MVNW_QUIET_CURL='' __MVNW_QUIET_UNZIP='' __MVNW_QUIET_TAR=v + +# normalize http auth +case "${MVNW_PASSWORD:+has-password}" in +'') MVNW_USERNAME='' MVNW_PASSWORD='' ;; +has-password) [ -n "${MVNW_USERNAME-}" ] || MVNW_USERNAME='' MVNW_PASSWORD='' ;; +esac + +if [ -z "${MVNW_USERNAME-}" ] && command -v wget >/dev/null; then + verbose "Found wget ... using wget" + wget ${__MVNW_QUIET_WGET:+"$__MVNW_QUIET_WGET"} "$distributionUrl" -O "$TMP_DOWNLOAD_DIR/$distributionUrlName" || die "wget: Failed to fetch $distributionUrl" +elif [ -z "${MVNW_USERNAME-}" ] && command -v curl >/dev/null; then + verbose "Found curl ... using curl" + curl ${__MVNW_QUIET_CURL:+"$__MVNW_QUIET_CURL"} -f -L -o "$TMP_DOWNLOAD_DIR/$distributionUrlName" "$distributionUrl" || die "curl: Failed to fetch $distributionUrl" +elif set_java_home; then + verbose "Falling back to use Java to download" + javaSource="$TMP_DOWNLOAD_DIR/Downloader.java" + targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName" + cat >"$javaSource" <<-END + public class Downloader extends java.net.Authenticator + { + protected java.net.PasswordAuthentication getPasswordAuthentication() + { + return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() ); + } + public static void main( String[] args ) throws Exception + { + setDefault( new Downloader() ); + java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() ); + } + } + END + # For Cygwin/MinGW, switch paths to Windows format before running javac and java + verbose " - Compiling Downloader.java ..." + "$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java" + verbose " - Running Downloader.java ..." + "$(native_path "$JAVACMD")" -cp "$(native_path "$TMP_DOWNLOAD_DIR")" Downloader "$distributionUrl" "$(native_path "$targetZip")" +fi + +# If specified, validate the SHA-256 sum of the Maven distribution zip file +if [ -n "${distributionSha256Sum-}" ]; then + distributionSha256Result=false + if [ "$MVN_CMD" = mvnd.sh ]; then + echo "Checksum validation is not supported for maven-mvnd." >&2 + echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 + exit 1 + elif command -v sha256sum >/dev/null; then + if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c >/dev/null 2>&1; then + distributionSha256Result=true + fi + elif command -v shasum >/dev/null; then + if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | shasum -a 256 -c >/dev/null 2>&1; then + distributionSha256Result=true + fi + else + echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2 + echo "Please install either command, or disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 + exit 1 + fi + if [ $distributionSha256Result = false ]; then + echo "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised." >&2 + echo "If you updated your Maven version, you need to update the specified distributionSha256Sum property." >&2 + exit 1 + fi +fi + +# unzip and move +if command -v unzip >/dev/null; then + unzip ${__MVNW_QUIET_UNZIP:+"$__MVNW_QUIET_UNZIP"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -d "$TMP_DOWNLOAD_DIR" || die "failed to unzip" +else + tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar" +fi +printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/mvnw.url" +mv -- "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME" + +clean || : +exec_maven "$@" diff --git a/content/Apache/Incubator/Committers/mvnw.cmd b/content/Apache/Incubator/Committers/mvnw.cmd new file mode 100644 index 0000000..249bdf3 --- /dev/null +++ b/content/Apache/Incubator/Committers/mvnw.cmd @@ -0,0 +1,149 @@ +<# : batch portion +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Apache Maven Wrapper startup batch script, version 3.3.2 +@REM +@REM Optional ENV vars +@REM MVNW_REPOURL - repo url base for downloading maven distribution +@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven +@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output +@REM ---------------------------------------------------------------------------- + +@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0) +@SET __MVNW_CMD__= +@SET __MVNW_ERROR__= +@SET __MVNW_PSMODULEP_SAVE=%PSModulePath% +@SET PSModulePath= +@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @( + IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B) +) +@SET PSModulePath=%__MVNW_PSMODULEP_SAVE% +@SET __MVNW_PSMODULEP_SAVE= +@SET __MVNW_ARG0_NAME__= +@SET MVNW_USERNAME= +@SET MVNW_PASSWORD= +@IF NOT "%__MVNW_CMD__%"=="" (%__MVNW_CMD__% %*) +@echo Cannot start maven from wrapper >&2 && exit /b 1 +@GOTO :EOF +: end batch / begin powershell #> + +$ErrorActionPreference = "Stop" +if ($env:MVNW_VERBOSE -eq "true") { + $VerbosePreference = "Continue" +} + +# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties +$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl +if (!$distributionUrl) { + Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties" +} + +switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) { + "maven-mvnd-*" { + $USE_MVND = $true + $distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip" + $MVN_CMD = "mvnd.cmd" + break + } + default { + $USE_MVND = $false + $MVN_CMD = $script -replace '^mvnw','mvn' + break + } +} + +# apply MVNW_REPOURL and calculate MAVEN_HOME +# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash> +if ($env:MVNW_REPOURL) { + $MVNW_REPO_PATTERN = if ($USE_MVND) { "/org/apache/maven/" } else { "/maven/mvnd/" } + $distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace '^.*'+$MVNW_REPO_PATTERN,'')" +} +$distributionUrlName = $distributionUrl -replace '^.*/','' +$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$','' +$MAVEN_HOME_PARENT = "$HOME/.m2/wrapper/dists/$distributionUrlNameMain" +if ($env:MAVEN_USER_HOME) { + $MAVEN_HOME_PARENT = "$env:MAVEN_USER_HOME/wrapper/dists/$distributionUrlNameMain" +} +$MAVEN_HOME_NAME = ([System.Security.Cryptography.MD5]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join '' +$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME" + +if (Test-Path -Path "$MAVEN_HOME" -PathType Container) { + Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME" + Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" + exit $? +} + +if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) { + Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl" +} + +# prepare tmp dir +$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile +$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir" +$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null +trap { + if ($TMP_DOWNLOAD_DIR.Exists) { + try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } + catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } + } +} + +New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null + +# Download and Install Apache Maven +Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." +Write-Verbose "Downloading from: $distributionUrl" +Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" + +$webclient = New-Object System.Net.WebClient +if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) { + $webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD) +} +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 +$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null + +# If specified, validate the SHA-256 sum of the Maven distribution zip file +$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum +if ($distributionSha256Sum) { + if ($USE_MVND) { + Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." + } + Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash + if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) { + Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property." + } +} + +# unzip and move +Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null +Rename-Item -Path "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" -NewName $MAVEN_HOME_NAME | Out-Null +try { + Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null +} catch { + if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) { + Write-Error "fail to move MAVEN_HOME" + } +} finally { + try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } + catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } +} + +Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" diff --git a/content/Apache/Incubator/Committers/pom.xml b/content/Apache/Incubator/Committers/pom.xml new file mode 100644 index 0000000..fbca77d --- /dev/null +++ b/content/Apache/Incubator/Committers/pom.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + + 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. + +--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.training</groupId> + <artifactId>content-parent-pom</artifactId> + <version>1.4.0</version> + <relativePath>../../../../tools/content-parent-pom/pom.xml</relativePath> + </parent> + + <artifactId>incubator-committers</artifactId> + <groupId>org.apache.training.content</groupId> + <version>1.0.0-SNAPSHOT</version> + <packaging>war</packaging> + + <name>Training: Content: Incubator: Committers</name> + + <!-- Make Snapshots of Apache projects available --> + <repositories> + <repository> + <id>apache-snapshots</id> + <url>https://repository.apache.org/content/repositories/snapshots</url> + <releases> + <enabled>false</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + </repository> + </repositories> + + <!-- Make Snapshots of Apache plugins available --> + <pluginRepositories> + <pluginRepository> + <id>apache-snapshots</id> + <url>https://repository.apache.org/content/repositories/snapshots</url> + <releases> + <enabled>false</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + </pluginRepository> + </pluginRepositories> + +</project> diff --git a/content/Apache/Incubator/Committers/src/main/asciidoc/_settings.adoc b/content/Apache/Incubator/Committers/src/main/asciidoc/_settings.adoc new file mode 100644 index 0000000..242a08b --- /dev/null +++ b/content/Apache/Incubator/Committers/src/main/asciidoc/_settings.adoc @@ -0,0 +1,36 @@ +//// + + 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. + +//// + +:goto: +:menu: +:navigation: +:status: +:arrows: +:revealjs_theme: cc_black +:revealjs_progress: true +:revealjs_slidenumber: true +:pdf-page-size: A4 +:revealjs_center: false +:revealjs_history: true +:icons: font +:imagesdir: images +:sourcedir: ../java +:title-slide-background-image: background-dark-orig.jpg +:idprefix: +:idseparator: - diff --git a/content/Apache/Incubator/Committers/src/main/asciidoc/index.adoc b/content/Apache/Incubator/Committers/src/main/asciidoc/index.adoc new file mode 100644 index 0000000..0fd7c0a --- /dev/null +++ b/content/Apache/Incubator/Committers/src/main/asciidoc/index.adoc @@ -0,0 +1,278 @@ +//// + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + 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. +//// + +include::_settings.adoc[] +:presenter_name: Your Name +:presenter_company: Your Company +:description: ASF Committer Onboarding +:keywords: Apache, Incubator, Podling, Committer +:author: Your Name +:email: Your email +:position: Your role +:revealjs_plugins: notes +:revealjs_slideNumber: true +:customcss: apache.css + +== Welcome Committers +* You now have write access to the project repository +* Recognition of your sustained contributions +* Trust comes with responsibility + +[.notes] +-- +Give the new committer a warm welcome. This is an important milestone. +Becoming a committer means the community recognizes your sustained, high-quality contributions. +This is an earned role: you’ve shown reliability, respect for process, and technical ability. +With this new access comes responsibility. The community trusts you, and you now help protect the project's integrity. +-- + +== The Apache Way +* Transparency +* Meritocracy +* Consensus +* Community over Code + +[.notes] +-- +These four principles shape everything we do: +- **Transparency**: all important decisions happen on public mailing lists, not in private. +- **Meritocracy**: influence is earned by contributing, not assigned by title. +- **Consensus**: aim for agreement; disagreements are worked out in the open. +- **Community over Code**: Code can always be changed, but strong relationships and a healthy community keep projects going over time. +As a committer, you are expected to embody and model these values. +-- + +== ICLA Requirement +* An Individual Contributor License Agreement (ICLA) must be on file +* Required before commit access is granted +* Ensures legal clarity for contributions + +[.notes] +-- +Every committer must have an ICLA on file with the ASF Secretary. +This ensures that contributions are legally valid and the ASF can distribute them. +If you’re not sure whether your ICLA is recorded, you can confirm through project or ASF records. +-- + +== Your Role +* Contribute code, docs, tests +* Review pull requests and patches +* Help new contributors +* Follow project norms + +[.notes] +-- +Your role is to keep the project healthy and moving forward. +- Write code, improve documentation, and add tests. Quality matters. +- Review contributions from others: thoughtful reviews are as valuable as code. +- Help onboard new contributors, answer questions, point them to resources, and encourage them to stick around. +- Every project has its own working norms: some are review-then-commit, others are commit-then-review. Learn and follow them. +-- + +== Commit-Then-Review vs. Review-Then-Commit +* Some projects allow direct commits +* Others require review before commit +* Always follow your project’s chosen practice + +[.notes] +-- +This is one of the biggest variations between ASF projects. +- **Commit-then-review**: committers can commit directly, but all changes are subject to later review and possible rollback. +- **Review-then-commit**: commits only happen after someone else has reviewed and approved. +Both models are valid. What matters is following the norms of your project. +If you’re unsure, ask the PPMC about the expected workflow. +-- + +== Responsibilities +* Keep the codebase healthy +* Write clear commit messages +* Respect licenses and IP +* Coordinate on bigger changes + +[.notes] +-- +Day-to-day responsibilities: +- Keep the build green: don’t commit code that breaks tests or CI. +- Use clear, descriptive commit messages. This helps with history and release notes. +- Respect IP rules: don’t copy in code or docs from incompatible licenses. Always check license compatibility when adding dependencies. +- For larger refactors or behavior changes, coordinate early so the team is aligned. +-- + +== Releases & Your Role +* Committers do not cast binding votes +* But you can test and review releases +* Feedback helps ensure quality + +[.notes] +-- +Committers are encouraged to participate in release testing and reviews. +Although your votes are not binding, your feedback is still important. +This is a great way to learn the ASF release policy and contribute to the project’s quality and compliance. +-- + +== Security Awareness +* Follow ASF security policy +* Do not commit fixes to public repos before disclosure +* Ask the PPMC if in doubt + +[.notes] +-- +Security issues must be handled carefully: +- ASF has a defined process for reporting and handling vulnerabilities. +- Never push security fixes directly to a public repo before coordination. +- If unsure, pause and ask the PPMC or ASF Security team. +This protects users and the ASF’s reputation. +-- + +== ASF Infrastructure Basics +* Use the project issue tracker +* Follow project GitHub rules +* Project websites are on ASF infra + +[.notes] +-- +Committers are expected to: +- Use the official issue tracker (GitHub Issues or JIRA) to plan and track work. +- Follow ASF GitHub norms: don’t rewrite history; don’t use personal repos for official work. +- Remember that websites and download areas are ASF property, not individually owned. +-- + +== What Committers Do Not Do +* No binding votes on releases +* Do not set project direction +* Do not speak on behalf of the ASF + +[.notes] +-- +This slide is about boundaries: +- Committers can participate in release votes, but only PPMC members have binding votes in incubation. +- Committers don’t set overall project direction, that’s the PPMC’s responsibility. +- Committers do not speak for the ASF in public or legal matters. Only the Board and officers have that authority. +Understanding these limits helps avoid confusion. +-- + +== Code of Conduct +* Be respectful and constructive +* Assume good faith +* No personal attacks +* Everyone deserves a safe community + +[.notes] +-- +Committers set the tone for new contributors. +- Be constructive in reviews, especially with newcomers. +- Assume good intentions, many are learning. +- Never use personal attacks or hostile language. +The ASF Code of Conduct applies to all, and committers are role models. +-- + +== Working with the PPMC +* Committers are part of the community +* PPMC provides project oversight +* Both roles are essential + +[.notes] +-- +Explain the relationship clearly: +- Committers focus on technical contributions and daily development. +- The PPMC oversees governance, ensures ASF rules are followed, and represents the podling to the IPMC. +Both roles are essential: without committers, there’s no project; without the PPMC, there’s no path to graduation. +Committers who demonstrate sustained, thoughtful involvement are often invited to join the PPMC. +-- + +== Communication +* Discuss on `dev@` +* Summarize any off-list progress to the list +* Be respectful and constructive + +[.notes] +-- +Reinforce mailing list culture: +- `dev@` is the canonical archive of project discussions and decisions. +- If you make progress in Slack, Discord, or GitHub issues, *summarize the outcome to the list*. +- Be professional and constructive: disagreements happen, but personal attacks are never acceptable. +Transparency and respect keep the community healthy. +-- + +== Diversity & Growth +* Welcome new contributors +* Encourage diverse participation +* Help the community grow + +[.notes] +-- +Part of your role is to make the project welcoming: +- Be encouraging when new contributors send a PR, even if it needs work. +- Encourage contributions from people with different skills (not just code, docs, testing, design matters too). +- Diversity of contributors and organizations is key to project health and eventual graduation. +Committers are often the first “friendly face” new people interact with. +-- + +== Next Steps +* Make your first commit +* Join and participate in mailing list discussions +* Review and help with pull requests +* Grow into a community leader + +[.notes] +-- +Encourage the new committer to take action right away: +- Make a small but visible first commit; it’s a great way to mark the milestone. +- Participate in discussions, not just coding; community input matters. +- Review others’ PRs: giving feedback builds trust and reduces bottlenecks. +- Over time, committers who show leadership and maturity are invited to join the PPMC. +This marks the beginning of a journey toward greater responsibility within the ASF. +-- + +== Where to Get Help +* Ask on `dev@` first +* PPMC members can guide you +* ASF documentation & Infra resources +* It’s always OK to ask questions + +[.notes] +-- +New committers will have questions. Reassure them. +- Start with the project’s `dev@` list. +- PPMC members are responsible for guidance. +- ASF has extensive documentation, including infra FAQs and committer guides. +Most importantly: no one expects you to know everything right away. Asking questions is a strength. +-- + +== Looking Ahead +* Committer is a starting point +* Continued participation builds trust +* Active committers may be invited to PPMC +* Leadership grows from contribution + +[.notes] +-- +Set expectations for the future: +Becoming a committer is not the end of the journey. It’s the beginning of deeper involvement. +Sustained, constructive participation often leads to being invited to the PPMC. +Leadership at Apache grows naturally out of contribution, not titles. +-- + +== Final Thoughts +* Respect and collaboration build trust +* Stewardship matters as much as code +* Strong communities create great software + +[.notes] +-- +Leave them with the culture: be a good teammate, think like a steward, and prioritize community health alongside technical excellence. +-- diff --git a/content/Apache/Incubator/Committers/src/main/java/org/apache/training/StringUtils.java b/content/Apache/Incubator/Committers/src/main/java/org/apache/training/StringUtils.java new file mode 100644 index 0000000..beac597 --- /dev/null +++ b/content/Apache/Incubator/Committers/src/main/java/org/apache/training/StringUtils.java @@ -0,0 +1,27 @@ +/* + 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. +*/ +package org.apache.training; + +public class StringUtils { + // tag::contains[] + public boolean contains(String haystack, String needle) { + return haystack.contains(needle); + } + // end::contains[] +} diff --git a/content/Apache/Incubator/Committers/src/main/resources/apache.css b/content/Apache/Incubator/Committers/src/main/resources/apache.css new file mode 100644 index 0000000..0840cf6 --- /dev/null +++ b/content/Apache/Incubator/Committers/src/main/resources/apache.css @@ -0,0 +1,381 @@ +/* + 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. +*/ + +section.has-light-background, section.has-light-background h1, section.has-light-background h2, section.has-light-background h3, section.has-light-background h4, section.has-light-background h5, section.has-light-background h6 { + color: #fff; } + +/********************************************* + * GLOBAL STYLES + *********************************************/ +body { +/* TODO: Fix this */ +/* background-image: url("../../../images/background.jpg");*/ + background-repeat: no-repeat; + background-size: cover; + background-color: #fff; } + +.reveal { + font-family: Panton-Regular, Helvetica, sans-serif; + font-size: 34px; + font-weight: normal; + color: #000; } + +::selection { + color: #000; + background: #bee4fd; + text-shadow: none; } + +.reveal .slides > section, .reveal .slides > section > section { + line-height: 1.3; + font-weight: inherit; } + +/********************************************* + * HEADERS + *********************************************/ +.reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 { + margin: 0 0 20px 0; + color: #000; + font-family: Panton-Regular, Helvetica, sans-serif; + font-weight: 600; + line-height: 1.2; + letter-spacing: normal; + text-transform: none; + text-shadow: none; + word-wrap: break-word; } + +.reveal h1 { + font-size: 2.5em; } + +.reveal h2 { + font-size: 1.6em; } + +.reveal h3 { + font-size: 1.3em; } + +.reveal h4 { + font-size: 1em; } + +.reveal h1 { + text-shadow: none; } + +/********************************************* + * OTHER + *********************************************/ +.reveal p { + margin: 20px 0; + line-height: 1.3; } + +/* Ensure certain elements are never larger than the slide itself */ +.reveal img, .reveal video, .reveal iframe { + max-width: 95%; + max-height: 95%; } + +.reveal strong, .reveal b { + font-weight: bold; } + +.reveal em { + font-style: italic; } + +.reveal ol, .reveal dl, .reveal ul { + display: inline-block; + text-align: left; + margin: 0 0 0 1em; } + +.reveal ol { + list-style-type: decimal; } + +.reveal ul { + list-style-type: disc; } + +.reveal ul ul { + list-style-type: square; } + +.reveal ul ul ul { + list-style-type: circle; } + +.reveal ul ul, .reveal ul ol, .reveal ol ol, .reveal ol ul { + display: block; + margin-left: 40px; } + +.reveal dt { + font-weight: bold; } + +.reveal dd { + margin-left: 40px; } + +.reveal q, .reveal blockquote { + quotes: none; } + +.reveal blockquote { + display: block; + position: relative; + width: 70%; + margin: 20px auto; + padding: 5px; + font-style: italic; + background: rgba(255, 255, 255, 0.05); + box-shadow: 0 0 2px rgba(0, 0, 0, 0.2); } + +.reveal blockquote p:first-child, .reveal blockquote p:last-child { + display: inline-block; } + +.reveal q { + font-style: italic; } + +.reveal pre { + display: block; + position: relative; + width: 90%; + margin: 20px auto; + text-align: left; + font-size: 0.55em; + font-family: monospace; + line-height: 1.2em; + word-wrap: break-word; + box-shadow: 0 0 6px rgba(0, 0, 0, 0.3); } + +.reveal code { + font-family: monospace; } + +.reveal pre code { + display: block; + padding: 5px; + overflow: auto; + max-height: 400px; + word-wrap: normal; + background: #3F3F3F; + color: #DCDCDC; } + +.reveal table { + margin: auto; + border-collapse: collapse; + border-spacing: 0; } + +.reveal table th { + font-weight: bold; } + +.reveal table th, .reveal table td { + text-align: left; + padding: 0.2em 0.5em 0.2em 0.5em; + border-bottom: 1px solid; } + +.reveal table th[align="center"], .reveal table td[align="center"] { + text-align: center; } + +.reveal table th[align="right"], .reveal table td[align="right"] { + text-align: right; } + +.reveal table tr:last-child td { + border-bottom: none; } + +.reveal sup { + vertical-align: super; } + +.reveal sub { + vertical-align: sub; } + +.reveal small { + display: inline-block; + font-size: 0.6em; + line-height: 1.2em; + vertical-align: top; } + +.reveal small * { + vertical-align: top; } + +/********************************************* + * LINKS + *********************************************/ +.reveal a { + color: #42affa; + text-decoration: none; + -webkit-transition: color 0.15s ease; + -moz-transition: color 0.15s ease; + transition: color 0.15s ease; } + +.reveal a:hover { + color: #8dcffc; + text-shadow: none; + border: none; } + +.reveal .roll span:after { + color: #fff; + background: #068ee9; } + +/********************************************* + * IMAGES + *********************************************/ +.reveal section img { + margin: 15px 0; + /*background: rgba(255, 255, 255, 0.12);*/ + /*border: 4px solid #fff;*/ + /*box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);*/ } + +.reveal a img { + -webkit-transition: all 0.15s linear; + -moz-transition: all 0.15s linear; + transition: all 0.15s linear; } + +.reveal a:hover img { + background: rgba(255, 255, 255, 0.2); + border-color: #42affa; + box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); } + +/********************************************* + * NAVIGATION CONTROLS + *********************************************/ +.reveal .controls div.navigate-left, .reveal .controls div.navigate-left.enabled { + border-right-color: #42affa; } + +.reveal .controls div.navigate-right, .reveal .controls div.navigate-right.enabled { + border-left-color: #42affa; } + +.reveal .controls div.navigate-up, .reveal .controls div.navigate-up.enabled { + border-bottom-color: #42affa; } + +.reveal .controls div.navigate-down, .reveal .controls div.navigate-down.enabled { + border-top-color: #42affa; } + +.reveal .controls div.navigate-left.enabled:hover { + border-right-color: #8dcffc; } + +.reveal .controls div.navigate-right.enabled:hover { + border-left-color: #8dcffc; } + +.reveal .controls div.navigate-up.enabled:hover { + border-bottom-color: #8dcffc; } + +.reveal .controls div.navigate-down.enabled:hover { + border-top-color: #8dcffc; } + +/********************************************* + * PROGRESS BAR + *********************************************/ +.reveal .progress { + background: rgba(0, 0, 0, 0.2); } + +.reveal .progress span { + background: #42affa; + -webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); + -moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); + transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); } + +/********************************************* + * SLIDE NUMBER + *********************************************/ +.reveal .slide-number { + color: #42affa; + background-color: rgba(0, 0, 0, 0); +} + +/********************************************* + * GENERAL PURPOSE COLORS + *********************************************/ + +.reveal .red { + color: red; +} + +.reveal .orange { + color: orange; +} + +.reveal .yellow { + color: yellow; +} + +.reveal .green { + color: green; +} + +/********************************************* + * C3JS Charts + *********************************************/ + +.c3 { + fill: white; } + +.c3 line, .c3 path { + stroke: white !important; } + +/********************************************* + * Custom styling of individual charts + *********************************************/ + +#most-significant-barriers .c3-shape .c3-shape-2 .c3-bar .c3-bar-2 { + color: red; +} + +/********************************************* + * Footer and Header + *********************************************/ + +.header { + position:relative; +} +/*.header .left { + position:absolute; + top: 5px; + left: 5px; + width: 196px; + height: 100px; + background-image: url("../../../images/logo-building-iot.png"); +}*/ +.header .right { + position:absolute; + top: 5px; + right: 5px; + width: 246px; + height: 100px; + background-image: url("../../../images/logo-apache.png"); +} + +.footer { + position:relative; +} +/*.footer .left { + position:absolute; + bottom: 5px; + left: 5px; + width: 392px; + height: 50px; + background-image: url("../../../images/logo-company.png"); +} +.footer .right { + position:absolute; + bottom: 5px; + right: 5px; + width: 306px; + height: 100px; + background-image: url("../../../images/logo-training.png"); +}*/ + +/********************************************* + * Add the ability to split into two columns + *********************************************/ + +.reveal .west { + position: fixed; + left: 5%; +} + +.reveal .east { + position: fixed; + right: 5%; +} diff --git a/content/Apache/Incubator/PPMC/.mvn/wrapper/maven-wrapper.properties b/content/Apache/Incubator/PPMC/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 0000000..d58dfb7 --- /dev/null +++ b/content/Apache/Incubator/PPMC/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,19 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# 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. +wrapperVersion=3.3.2 +distributionType=only-script +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip diff --git a/content/Apache/Incubator/PPMC/Dockerfile b/content/Apache/Incubator/PPMC/Dockerfile new file mode 100644 index 0000000..95f8d06 --- /dev/null +++ b/content/Apache/Incubator/PPMC/Dockerfile @@ -0,0 +1,81 @@ +# 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. + +########################################################################################## +# Build Apache Training +########################################################################################## + +# Fixed version of this in order to have a fixed JDK version +FROM azul/zulu-openjdk:21 as build + +# Install some stuff we need to run the build +RUN apt update -y +RUN apt install -y git graphviz wget bzip2 python3 python3-pip imagemagick curl protobuf-compiler mc + +# Install the version 1.76.0 of the Rust toolchain +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.76.0 +ENV PATH="/root/.cargo/bin:$PATH" +# Install svgbob +RUN cargo install svgbob_cli +RUN cp /root/.cargo/bin/svgbob_cli /usr/local/bin + +# Forced version of pillow as with version 10 the build fails +RUN python3 -m pip install --upgrade pip setuptools==57.5.0 seqdiag blockdiag actdiag nwdiag convert racks opc-diag pillow==9.5.0 + +#ENV CONDA_DIR /opt/conda +#RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh -O /root/miniconda.sh +#RUN sh /root/miniconda.sh -b -p $CONDA_DIR +#ENV PATH=$CONDA_DIR/bin:$PATH +#RUN conda update -y conda +#RUN rm /root/miniconda.sh +#RUN wget --quiet https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh -O /root/miniconda.sh && sh /root/miniconda.sh -b -p /opt/conda +#ENV PATH=$CONDA_DIR/bin:$PATH + +# Install vg2svg for rendering vega diagrams +# NOTE: Installing vega-cli doesn't seem to work as dependencies are not available for arm64 (silicon) +ENV NODE_VERSION=18.20.4 +RUN curl --silent -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash +RUN /root/.nvm/install.sh +ENV PATH=/root/.nvm/versions/node/v$NODE_VERSION/bin:$PATH +#RUN npm install --no-audit vega + +#RUN wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 +#RUN bunzip2 phantomjs-2.1.1-linux-x86_64.tar.bz2 +#RUN tar -xvf phantomjs-2.1.1-linux-x86_64.tar + +# Install ERD +RUN apt install -y golang +ENV PATH=/root/go/bin:$PATH +RUN go install github.com/kaishuu0123/[email protected] + +# Install Syntrax +# https://kevinpt.github.io/syntrax/ +# Problem is, that newer versions of python don't have use_2to3 +#RUN apt install -y libcairo2-dev pkg-config python3-dev python3-gi python3-gi-cairo gir1.2-gtk-4.0 +RUN apt install -y libcairo2-dev pkg-config python3-dev python3-gi gir1.2-gtk-4.0 +RUN python3 -m pip install --upgrade pycairo pango syntrax +# For some reason, if we install this before the python stuff, it doesn't work +RUN apt install -y python3-gi-cairo + +# Install Mermaid +# Mermaid seems to have issues with Apple Silicon +#RUN apt install -y nodejs npm +RUN npm install -g @mermaid-js/mermaid-cli + +# Required for running on Windows systems +RUN apt install -y dos2unix + +# Change the working directory (where commands are executed) into the new "ws" directory +WORKDIR /ws \ No newline at end of file diff --git a/content/Apache/Incubator/PPMC/README.md b/content/Apache/Incubator/PPMC/README.md new file mode 100644 index 0000000..cf2dfe4 --- /dev/null +++ b/content/Apache/Incubator/PPMC/README.md @@ -0,0 +1,57 @@ +<!-- + + 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. + +--> + +# Presentation with Reveal.JS and AsciiDoctor + +Remarks: +- In order to use the preview of the IntelliJ asciidoctor plugin, you need to set an attribute in the plugin settings: `imagesdir` = `../resources/images` +- Any css adjustments can go to `src/main/theme/apache.css` as this is automatically embedded into the themes directory. + +## Building the presentation + +Apache Training makes use of several tools in order to compile the presentations. +The probably simplest way to build the project is using Docker, as we provide the Dockerfile for installing all prerequisites. +``` +docker compose up +``` +This should produce compiled versions of all presentations in your local working copy. + +If you want to build the presentation on your local system the following command should do. +However, if you are missing prerequisites, then this build will most probably fail. + +By running the following command, you can generate the presentation: +``` +mvn package +``` +## Running the presentation + +In order to show the presentation, go into the `target` directory and look for a directory named {artifactId}-{version}. +This direcotry contains an `index.html` file. + +Simply open this in any browser of your choice. + +## Generating PDF versions + +In order to generate a PDF version of the presentation just add `?print-pdf` to the url. (Keep in mind, that you have to add it before any `#blahblah`) + +The following link should do the trick: +``` +http:///{someFilePath}/?print-pdf +``` +As soon as that's loaded, the presentation will look a bit odd. Now just use the normal `print` functionality of the browser and select `print as PDF`. diff --git a/content/Apache/Incubator/PPMC/docker-compose.yaml b/content/Apache/Incubator/PPMC/docker-compose.yaml new file mode 100644 index 0000000..c33a0a3 --- /dev/null +++ b/content/Apache/Incubator/PPMC/docker-compose.yaml @@ -0,0 +1,31 @@ +# +# 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. +# + +version: "3.8" +services: + builder: + build: + context: . + dockerfile: Dockerfile + command: ["/ws/mvnw", "-e", "-Dmaven.repo.local=/ws/out/.repository", "clean", "install"] + volumes: + # Bind the local directory as "/ws" + - type: bind + source: . + target: /ws diff --git a/content/Apache/Incubator/PPMC/install-deps-centos.sh b/content/Apache/Incubator/PPMC/install-deps-centos.sh new file mode 100644 index 0000000..b83d36d --- /dev/null +++ b/content/Apache/Incubator/PPMC/install-deps-centos.sh @@ -0,0 +1,61 @@ +#!/usr/bin/env bash +# ---------------------------------------------------------------------------- +# 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. +# ---------------------------------------------------------------------------- + + +############# install necessary packages +yum install -y git graphviz maven nodejs wget bzip2 python36 python36-pip pygobject3 cargo + +############# +python3 -m pip install --upgrade pip setuptools seqdiag blockdiag actdiag nwdiag convert syntrax racks opc-diag +npm install vega pango + +############# install stack +wget -qO- https://get.haskellstack.org/ | sh + +############# install PhantomJS +wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 +bunzip2 phantomjs-2.1.1-linux-x86_64.tar.bz2 +tar -xvf phantomjs-2.1.1-linux-x86_64.tar + +############# install ERD +cd libs +mkdir third-party +cd third-party +git clone https://github.com/BurntSushi/erd.git +cd erd +stack install +read -p "Add stack ($HOME/.local/bin) to PATH ($PATH) ? (y/n)" -n 1 -r YES_NO +if [ $YES_NO = "y" ]; then + echo 'export PATH=$PATH:$HOME/.local/bin' >> ~/.bash_profile + . ~/.bash_profile +fi + +############# install SVGBob +cargo install svgbob_cli +read -p "Add cargo ($HOME/.cargo/bin) to PATH ($PATH) ? (y/n)" -n 1 -r YES_NO +if [ $YES_NO = "y" ]; then + echo 'export PATH=$PATH:$HOME/.cargo/bin' >> ~/.bash_profile + . ~/.bash_profile +fi + +############# +cd ../../.. +mvn jetty:run-exploded + diff --git a/content/Apache/Incubator/PPMC/install-deps-mac.sh b/content/Apache/Incubator/PPMC/install-deps-mac.sh new file mode 100644 index 0000000..25d677a --- /dev/null +++ b/content/Apache/Incubator/PPMC/install-deps-mac.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash +# ---------------------------------------------------------------------------- +# 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. +# ---------------------------------------------------------------------------- + +cd libs +mkdir third-party +cd third-party + +# Install ERD +git clone git://github.com/BurntSushi/erd +cd erd +stack init +stack build --system-ghc +cd .. + +# Install Mermaid +npm install mermaid.cli + +# Install PhantomJS +wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-macosx.zip +unzip phantomjs-2.1.1-macosx.zip + +# SVGBob +cargo install svgbob_cli --path ./svgbob + +# Syntrax +pip install --upgrade syntrax +pip install pycairo +brew install pygobject3 + +# Vega +npm install vega + +# ImageMagic +#wget https://imagemagick.org/download/binaries/ImageMagick-x86_64-apple-darwin17.7.0.tar.gz +#tar xvzf ImageMagick-x86_64-apple-darwin17.7.0.tar.gz diff --git a/content/Apache/Incubator/PPMC/mvnw b/content/Apache/Incubator/PPMC/mvnw new file mode 100755 index 0000000..19529dd --- /dev/null +++ b/content/Apache/Incubator/PPMC/mvnw @@ -0,0 +1,259 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# 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. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Apache Maven Wrapper startup batch script, version 3.3.2 +# +# Optional ENV vars +# ----------------- +# JAVA_HOME - location of a JDK home dir, required when download maven via java source +# MVNW_REPOURL - repo url base for downloading maven distribution +# MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven +# MVNW_VERBOSE - true: enable verbose log; debug: trace the mvnw script; others: silence the output +# ---------------------------------------------------------------------------- + +set -euf +[ "${MVNW_VERBOSE-}" != debug ] || set -x + +# OS specific support. +native_path() { printf %s\\n "$1"; } +case "$(uname)" in +CYGWIN* | MINGW*) + [ -z "${JAVA_HOME-}" ] || JAVA_HOME="$(cygpath --unix "$JAVA_HOME")" + native_path() { cygpath --path --windows "$1"; } + ;; +esac + +# set JAVACMD and JAVACCMD +set_java_home() { + # For Cygwin and MinGW, ensure paths are in Unix format before anything is touched + if [ -n "${JAVA_HOME-}" ]; then + if [ -x "$JAVA_HOME/jre/sh/java" ]; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACCMD="$JAVA_HOME/jre/sh/javac" + else + JAVACMD="$JAVA_HOME/bin/java" + JAVACCMD="$JAVA_HOME/bin/javac" + + if [ ! -x "$JAVACMD" ] || [ ! -x "$JAVACCMD" ]; then + echo "The JAVA_HOME environment variable is not defined correctly, so mvnw cannot run." >&2 + echo "JAVA_HOME is set to \"$JAVA_HOME\", but \"\$JAVA_HOME/bin/java\" or \"\$JAVA_HOME/bin/javac\" does not exist." >&2 + return 1 + fi + fi + else + JAVACMD="$( + 'set' +e + 'unset' -f command 2>/dev/null + 'command' -v java + )" || : + JAVACCMD="$( + 'set' +e + 'unset' -f command 2>/dev/null + 'command' -v javac + )" || : + + if [ ! -x "${JAVACMD-}" ] || [ ! -x "${JAVACCMD-}" ]; then + echo "The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run." >&2 + return 1 + fi + fi +} + +# hash string like Java String::hashCode +hash_string() { + str="${1:-}" h=0 + while [ -n "$str" ]; do + char="${str%"${str#?}"}" + h=$(((h * 31 + $(LC_CTYPE=C printf %d "'$char")) % 4294967296)) + str="${str#?}" + done + printf %x\\n $h +} + +verbose() { :; } +[ "${MVNW_VERBOSE-}" != true ] || verbose() { printf %s\\n "${1-}"; } + +die() { + printf %s\\n "$1" >&2 + exit 1 +} + +trim() { + # MWRAPPER-139: + # Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds. + # Needed for removing poorly interpreted newline sequences when running in more + # exotic environments such as mingw bash on Windows. + printf "%s" "${1}" | tr -d '[:space:]' +} + +# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties +while IFS="=" read -r key value; do + case "${key-}" in + distributionUrl) distributionUrl=$(trim "${value-}") ;; + distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;; + esac +done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties" +[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties" + +case "${distributionUrl##*/}" in +maven-mvnd-*bin.*) + MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ + case "${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)" in + *AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;; + :Darwin*x86_64) distributionPlatform=darwin-amd64 ;; + :Darwin*arm64) distributionPlatform=darwin-aarch64 ;; + :Linux*x86_64*) distributionPlatform=linux-amd64 ;; + *) + echo "Cannot detect native platform for mvnd on $(uname)-$(uname -m), use pure java version" >&2 + distributionPlatform=linux-amd64 + ;; + esac + distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip" + ;; +maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;; +*) MVN_CMD="mvn${0##*/mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;; +esac + +# apply MVNW_REPOURL and calculate MAVEN_HOME +# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash> +[ -z "${MVNW_REPOURL-}" ] || distributionUrl="$MVNW_REPOURL$_MVNW_REPO_PATTERN${distributionUrl#*"$_MVNW_REPO_PATTERN"}" +distributionUrlName="${distributionUrl##*/}" +distributionUrlNameMain="${distributionUrlName%.*}" +distributionUrlNameMain="${distributionUrlNameMain%-bin}" +MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}" +MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")" + +exec_maven() { + unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || : + exec "$MAVEN_HOME/bin/$MVN_CMD" "$@" || die "cannot exec $MAVEN_HOME/bin/$MVN_CMD" +} + +if [ -d "$MAVEN_HOME" ]; then + verbose "found existing MAVEN_HOME at $MAVEN_HOME" + exec_maven "$@" +fi + +case "${distributionUrl-}" in +*?-bin.zip | *?maven-mvnd-?*-?*.zip) ;; +*) die "distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found '${distributionUrl-}'" ;; +esac + +# prepare tmp dir +if TMP_DOWNLOAD_DIR="$(mktemp -d)" && [ -d "$TMP_DOWNLOAD_DIR" ]; then + clean() { rm -rf -- "$TMP_DOWNLOAD_DIR"; } + trap clean HUP INT TERM EXIT +else + die "cannot create temp dir" +fi + +mkdir -p -- "${MAVEN_HOME%/*}" + +# Download and Install Apache Maven +verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." +verbose "Downloading from: $distributionUrl" +verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" + +# select .zip or .tar.gz +if ! command -v unzip >/dev/null; then + distributionUrl="${distributionUrl%.zip}.tar.gz" + distributionUrlName="${distributionUrl##*/}" +fi + +# verbose opt +__MVNW_QUIET_WGET=--quiet __MVNW_QUIET_CURL=--silent __MVNW_QUIET_UNZIP=-q __MVNW_QUIET_TAR='' +[ "${MVNW_VERBOSE-}" != true ] || __MVNW_QUIET_WGET='' __MVNW_QUIET_CURL='' __MVNW_QUIET_UNZIP='' __MVNW_QUIET_TAR=v + +# normalize http auth +case "${MVNW_PASSWORD:+has-password}" in +'') MVNW_USERNAME='' MVNW_PASSWORD='' ;; +has-password) [ -n "${MVNW_USERNAME-}" ] || MVNW_USERNAME='' MVNW_PASSWORD='' ;; +esac + +if [ -z "${MVNW_USERNAME-}" ] && command -v wget >/dev/null; then + verbose "Found wget ... using wget" + wget ${__MVNW_QUIET_WGET:+"$__MVNW_QUIET_WGET"} "$distributionUrl" -O "$TMP_DOWNLOAD_DIR/$distributionUrlName" || die "wget: Failed to fetch $distributionUrl" +elif [ -z "${MVNW_USERNAME-}" ] && command -v curl >/dev/null; then + verbose "Found curl ... using curl" + curl ${__MVNW_QUIET_CURL:+"$__MVNW_QUIET_CURL"} -f -L -o "$TMP_DOWNLOAD_DIR/$distributionUrlName" "$distributionUrl" || die "curl: Failed to fetch $distributionUrl" +elif set_java_home; then + verbose "Falling back to use Java to download" + javaSource="$TMP_DOWNLOAD_DIR/Downloader.java" + targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName" + cat >"$javaSource" <<-END + public class Downloader extends java.net.Authenticator + { + protected java.net.PasswordAuthentication getPasswordAuthentication() + { + return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() ); + } + public static void main( String[] args ) throws Exception + { + setDefault( new Downloader() ); + java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() ); + } + } + END + # For Cygwin/MinGW, switch paths to Windows format before running javac and java + verbose " - Compiling Downloader.java ..." + "$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java" + verbose " - Running Downloader.java ..." + "$(native_path "$JAVACMD")" -cp "$(native_path "$TMP_DOWNLOAD_DIR")" Downloader "$distributionUrl" "$(native_path "$targetZip")" +fi + +# If specified, validate the SHA-256 sum of the Maven distribution zip file +if [ -n "${distributionSha256Sum-}" ]; then + distributionSha256Result=false + if [ "$MVN_CMD" = mvnd.sh ]; then + echo "Checksum validation is not supported for maven-mvnd." >&2 + echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 + exit 1 + elif command -v sha256sum >/dev/null; then + if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c >/dev/null 2>&1; then + distributionSha256Result=true + fi + elif command -v shasum >/dev/null; then + if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | shasum -a 256 -c >/dev/null 2>&1; then + distributionSha256Result=true + fi + else + echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2 + echo "Please install either command, or disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 + exit 1 + fi + if [ $distributionSha256Result = false ]; then + echo "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised." >&2 + echo "If you updated your Maven version, you need to update the specified distributionSha256Sum property." >&2 + exit 1 + fi +fi + +# unzip and move +if command -v unzip >/dev/null; then + unzip ${__MVNW_QUIET_UNZIP:+"$__MVNW_QUIET_UNZIP"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -d "$TMP_DOWNLOAD_DIR" || die "failed to unzip" +else + tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar" +fi +printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/mvnw.url" +mv -- "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME" + +clean || : +exec_maven "$@" diff --git a/content/Apache/Incubator/PPMC/mvnw.cmd b/content/Apache/Incubator/PPMC/mvnw.cmd new file mode 100644 index 0000000..249bdf3 --- /dev/null +++ b/content/Apache/Incubator/PPMC/mvnw.cmd @@ -0,0 +1,149 @@ +<# : batch portion +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Apache Maven Wrapper startup batch script, version 3.3.2 +@REM +@REM Optional ENV vars +@REM MVNW_REPOURL - repo url base for downloading maven distribution +@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven +@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output +@REM ---------------------------------------------------------------------------- + +@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0) +@SET __MVNW_CMD__= +@SET __MVNW_ERROR__= +@SET __MVNW_PSMODULEP_SAVE=%PSModulePath% +@SET PSModulePath= +@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @( + IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B) +) +@SET PSModulePath=%__MVNW_PSMODULEP_SAVE% +@SET __MVNW_PSMODULEP_SAVE= +@SET __MVNW_ARG0_NAME__= +@SET MVNW_USERNAME= +@SET MVNW_PASSWORD= +@IF NOT "%__MVNW_CMD__%"=="" (%__MVNW_CMD__% %*) +@echo Cannot start maven from wrapper >&2 && exit /b 1 +@GOTO :EOF +: end batch / begin powershell #> + +$ErrorActionPreference = "Stop" +if ($env:MVNW_VERBOSE -eq "true") { + $VerbosePreference = "Continue" +} + +# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties +$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl +if (!$distributionUrl) { + Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties" +} + +switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) { + "maven-mvnd-*" { + $USE_MVND = $true + $distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip" + $MVN_CMD = "mvnd.cmd" + break + } + default { + $USE_MVND = $false + $MVN_CMD = $script -replace '^mvnw','mvn' + break + } +} + +# apply MVNW_REPOURL and calculate MAVEN_HOME +# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash> +if ($env:MVNW_REPOURL) { + $MVNW_REPO_PATTERN = if ($USE_MVND) { "/org/apache/maven/" } else { "/maven/mvnd/" } + $distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace '^.*'+$MVNW_REPO_PATTERN,'')" +} +$distributionUrlName = $distributionUrl -replace '^.*/','' +$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$','' +$MAVEN_HOME_PARENT = "$HOME/.m2/wrapper/dists/$distributionUrlNameMain" +if ($env:MAVEN_USER_HOME) { + $MAVEN_HOME_PARENT = "$env:MAVEN_USER_HOME/wrapper/dists/$distributionUrlNameMain" +} +$MAVEN_HOME_NAME = ([System.Security.Cryptography.MD5]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join '' +$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME" + +if (Test-Path -Path "$MAVEN_HOME" -PathType Container) { + Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME" + Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" + exit $? +} + +if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) { + Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl" +} + +# prepare tmp dir +$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile +$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir" +$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null +trap { + if ($TMP_DOWNLOAD_DIR.Exists) { + try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } + catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } + } +} + +New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null + +# Download and Install Apache Maven +Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." +Write-Verbose "Downloading from: $distributionUrl" +Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" + +$webclient = New-Object System.Net.WebClient +if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) { + $webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD) +} +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 +$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null + +# If specified, validate the SHA-256 sum of the Maven distribution zip file +$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum +if ($distributionSha256Sum) { + if ($USE_MVND) { + Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." + } + Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash + if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) { + Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property." + } +} + +# unzip and move +Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null +Rename-Item -Path "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" -NewName $MAVEN_HOME_NAME | Out-Null +try { + Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null +} catch { + if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) { + Write-Error "fail to move MAVEN_HOME" + } +} finally { + try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } + catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } +} + +Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" diff --git a/content/Apache/Incubator/PPMC/pom.xml b/content/Apache/Incubator/PPMC/pom.xml new file mode 100644 index 0000000..c2100f5 --- /dev/null +++ b/content/Apache/Incubator/PPMC/pom.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + + 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. + +--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.training</groupId> + <artifactId>content-parent-pom</artifactId> + <version>1.4.0</version> + <relativePath>../../../../tools/content-parent-pom/pom.xml</relativePath> + </parent> + + <artifactId>incubator-ppmc</artifactId> + <groupId>org.apache.training.content</groupId> + <version>1.0.0-SNAPSHOT</version> + <packaging>war</packaging> + + <name>Training: Content: Incubator: PPMC</name> + + <!-- Make Snapshots of Apache projects available --> + <repositories> + <repository> + <id>apache-snapshots</id> + <url>https://repository.apache.org/content/repositories/snapshots</url> + <releases> + <enabled>false</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + </repository> + </repositories> + + <!-- Make Snapshots of Apache plugins available --> + <pluginRepositories> + <pluginRepository> + <id>apache-snapshots</id> + <url>https://repository.apache.org/content/repositories/snapshots</url> + <releases> + <enabled>false</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + </pluginRepository> + </pluginRepositories> + +</project> diff --git a/content/Apache/Incubator/PPMC/src/main/asciidoc/_settings.adoc b/content/Apache/Incubator/PPMC/src/main/asciidoc/_settings.adoc new file mode 100644 index 0000000..242a08b --- /dev/null +++ b/content/Apache/Incubator/PPMC/src/main/asciidoc/_settings.adoc @@ -0,0 +1,36 @@ +//// + + 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. + +//// + +:goto: +:menu: +:navigation: +:status: +:arrows: +:revealjs_theme: cc_black +:revealjs_progress: true +:revealjs_slidenumber: true +:pdf-page-size: A4 +:revealjs_center: false +:revealjs_history: true +:icons: font +:imagesdir: images +:sourcedir: ../java +:title-slide-background-image: background-dark-orig.jpg +:idprefix: +:idseparator: - diff --git a/content/Apache/Incubator/PPMC/src/main/asciidoc/index.adoc b/content/Apache/Incubator/PPMC/src/main/asciidoc/index.adoc new file mode 100644 index 0000000..144545b --- /dev/null +++ b/content/Apache/Incubator/PPMC/src/main/asciidoc/index.adoc @@ -0,0 +1,244 @@ +//// + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + 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. +//// + +include::_settings.adoc[] +:presenter_name: Your Name +:presenter_company: Your Company +:description: ASF Podling PPMC Onboarding +:keywords: Apache, Incubator, Podling, PPMC +:author: Your Name +:email: Your email +:position: Your role +:revealjs_plugins: notes +:revealjs_slideNumber: true +:customcss: apache.css + + +== Welcome to the PPMC +* Podling Project Management Committee (PPMC) +* Oversees podling during incubation +* Goal: healthy, self-governing community + +[.notes] +-- +Welcome the new members warmly. +Explain that being on the PPMC means stepping into both a **leadership and stewardship role**. +This isn’t only about writing or reviewing code. It’s about helping the podling become a self-sustaining Apache community. +The PPMC helps the podling grow until it is ready to graduate to a Top-Level Project (TLP). +-- + +== The Apache Way +* Transparency +* Meritocracy +* Consensus +* Community over Code + +[.notes] +-- +Introduce the Apache Way as the **cultural foundation** of the ASF. +- Transparency: All important decisions happen on public mailing lists. +- Meritocracy: People gain influence through their contributions. +- Consensus: Strive for agreement; silence usually means consent. +- Community over Code: The project’s long-term health is more important than any single technical feature. +Reinforce that PPMC members are guardians of these principles. +-- + +== Your Role +* Active participation +* Guide decisions “the Apache Way” +* Mentor contributors +* Support inclusivity + +[.notes] +-- +Your role is broader than writing code: +- Be active in discussions; inactivity weakens the podling. +- Ensure decisions follow ASF culture, not just personal preference. +- Help bring in and mentor new contributors so the community grows. +- Support inclusivity: welcome different viewpoints, time zones, and backgrounds. +-- + +== ASF Basics +* ASF is a 501(c)(3) nonprofit +* Podlings are not independent legal entities +* Trademarks and assets owned by the ASF +* PPMC manages the project with the help of the IPMC + +[.notes] +-- +Clarify the legal structure: +The ASF is the legal umbrella, a US nonprofit. +Podlings don’t own their trademarks, domains, or infrastructure, the ASF does. +The PPMC manages the podling’s community and technical direction but **cannot sign contracts or act as a separate legal entity**. +This helps avoid legal risk and ensures consistency. +-- + +== Committer vs. PPMC +* Initial committers are PPMC members +* Committers: can commit code changes +* PPMC: sets technical direction & community growth + +[.notes] +-- +Clarify the distinction: +- Committers have write access to the repository. They review and commit code, but they do not “vote” on patches or PRs. +- The PPMC, however, looks after the bigger picture: community health, project direction, releases, and oversight. +Both roles overlap in practice, but PPMC has assumed additional governance responsibilities. +-- + +== Relationship with IPMC +* PPMC reports to Incubator PMC +* IPMC oversees incubation +* Some votes (e.g., releases, graduation) need IPMC approval + +[.notes] +-- +The PPMC is not alone, it works under the supervision of the **Incubator PMC (IPMC)**. +The IPMC has final oversight during the incubation period. +Release votes, for example, require approval by both the PPMC *and* the IPMC. +When the PPMC feels ready for graduation, it proposes it to the IPMC, which decides whether to recommend graduation to the ASF Board. +-- + +== Responsibilities +* Review/vote on releases +* Ensure IP/licensing compliance +* Nurture community health +* Engage in discussions + +[.notes] +-- +The PPMC’s responsibilities include: +- Reviewing releases to ensure they comply with ASF legal and policy requirements. +- Checking for license compliance (dependencies must be compatible with ALv2). +- Supporting and maintaining a healthy, respectful, and diverse community. +- Being active in discussions, and decisions require participation. +-- + +== Voting +* +1, 0, -1 +* Lazy consensus common +* PPMC votes are binding + +[.notes] +-- +Quick primer on voting: +- +1 = approve, -1 = veto (with reasoning), 0 = neutral. +- Most ASF decisions use “lazy consensus”, silence is consent. +- Not all votes are equal: only PPMC members cast **binding votes** in incubation. +Encourage members to vote, even if it’s just +1, to show engagement. +-- + +== Communication +* Use `dev@` mailing list +* Keep decisions public +* Escalate when needed + +[.notes] +-- +Reinforce that the **mailing list is the official record**. +Decisions in Slack, Discord, or private chat don’t count unless summarized to the list. +This ensures transparency, maintains a historical record, and keeps everyone informed. +If a discussion is stalled or contentious, escalate it early instead of letting it fester. +-- + +== Escalation Path +* Start with the PPMC +* Escalate to IPMC if unresolved +* Further escalation: ASF President or Board + +[.notes] +-- +Explain the chain of escalation: +1. Try to resolve issues within the PPMC. +2. If that fails, involve the IPMC, they are responsible for podlings. +Knowing the path helps avoid confusion when problems arise. +-- + +== Infra Basics +* ASF GitHub repos +* Mailing lists +* Issue tracker +* Website on ASF infra + +[.notes] +-- +Cover infrastructure at a high level: +- Use ASF GitHub repos, not personal ones. +- Mailing lists are the heart of communication. +- Use JIRA or GitHub Issues as your tracker. +- Project websites are hosted on ASF infrastructure. +Refer to Infra documentation for technical details; there's no need to overload newcomers here. +-- + +== Releases +* Follow ASF release policy +* Generally 72h minimum vote +* Source = official release +* Distribute via `dist.apache.org` + +[.notes] +-- +Releases are **the most important PPMC duty**. +- They must comply with ASF release policy. +- Voting should run at least 72 hours to give everyone a fair chance. +- Source is the official release artifact. +- Binaries are for convenience but must always be built from the source. +- Final distribution is through ASF’s infrastructure at `dist.apache.org`. +-- + +== Diversity of Community +* Broad, diverse participation +* Avoid vendor dominance +* Needed for graduation + +[.notes] +-- +Graduation requires a diverse community. +If the project depends on a single vendor or group, it’s at risk. +The PPMC should actively encourage participation from new people and different organizations. +This helps ensure long-term sustainability. +-- + +== Growth & Graduation +* Add new committers and PPMC members +* Support project diversity +* Graduation depends on community health + +[.notes] +-- +Graduation is not automatic. +The PPMC should regularly nominate and vote in new committers and PPMC members. +A podling that doesn’t grow its community usually won’t graduate. +Graduation is about proving the project can sustain itself independently as a TLP. +-- + +== Next Steps +* Join discussions +* Review PRs/issues +* Vote on releases +* Help onboard contributors + +[.notes] +-- +Conclude with a call to action: +- Engage right away on the mailing list. +- Review open issues and PRs, activity shows leadership. +- Take part in release votes, even as a reviewer. +- Help onboard new contributors, they are the future of the project. +Encourage members to see themselves as stewards of both code and community. +-- + diff --git a/content/Apache/Incubator/PPMC/src/main/java/org/apache/training/StringUtils.java b/content/Apache/Incubator/PPMC/src/main/java/org/apache/training/StringUtils.java new file mode 100644 index 0000000..beac597 --- /dev/null +++ b/content/Apache/Incubator/PPMC/src/main/java/org/apache/training/StringUtils.java @@ -0,0 +1,27 @@ +/* + 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. +*/ +package org.apache.training; + +public class StringUtils { + // tag::contains[] + public boolean contains(String haystack, String needle) { + return haystack.contains(needle); + } + // end::contains[] +} diff --git a/content/Apache/Incubator/PPMC/src/main/resources/apache.css b/content/Apache/Incubator/PPMC/src/main/resources/apache.css new file mode 100644 index 0000000..90e5950 --- /dev/null +++ b/content/Apache/Incubator/PPMC/src/main/resources/apache.css @@ -0,0 +1,381 @@ +/* + 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. +*/ + +section.has-light-background, section.has-light-background h1, section.has-light-background h2, section.has-light-background h3, section.has-light-background h4, section.has-light-background h5, section.has-light-background h6 { + color: #fff; } + +/********************************************* + * GLOBAL STYLES + *********************************************/ +body { +/* TODO: Fix this */ +/* background-image: url("../../../images/background.jpg");*/ + background-repeat: no-repeat; + background-size: cover; + background-color: #fff; } + +.reveal { + font-family: Panton-Regular, Helvetica, sans-serif; + font-size: 34px; + font-weight: normal; + color: #000; } + +::selection { + color: #000; + background: #bee4fd; + text-shadow: none; } + +.reveal .slides > section, .reveal .slides > section > section { + line-height: 1.3; + font-weight: inherit; } + +/********************************************* + * HEADERS + *********************************************/ +.reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 { + margin: 0 0 20px 0; + color: #000; + font-family: Panton-Regular, Helvetica, sans-serif; + font-weight: 600; + line-height: 1.2; + letter-spacing: normal; + text-transform: none; + text-shadow: none; + word-wrap: break-word; } + +.reveal h1 { + font-size: 2.5em; } + +.reveal h2 { + font-size: 1.6em; } + +.reveal h3 { + font-size: 1.3em; } + +.reveal h4 { + font-size: 1em; } + +.reveal h1 { + text-shadow: none; } + +/********************************************* + * OTHER + *********************************************/ +.reveal p { + margin: 20px 0; + line-height: 1.3; } + +/* Ensure certain elements are never larger than the slide itself */ +.reveal img, .reveal video, .reveal iframe { + max-width: 95%; + max-height: 95%; } + +.reveal strong, .reveal b { + font-weight: bold; } + +.reveal em { + font-style: italic; } + +.reveal ol, .reveal dl, .reveal ul { + display: inline-block; + text-align: left; + margin: 0 0 0 1em; } + +.reveal ol { + list-style-type: decimal; } + +.reveal ul { + list-style-type: disc; } + +.reveal ul ul { + list-style-type: square; } + +.reveal ul ul ul { + list-style-type: circle; } + +.reveal ul ul, .reveal ul ol, .reveal ol ol, .reveal ol ul { + display: block; + margin-left: 40px; } + +.reveal dt { + font-weight: bold; } + +.reveal dd { + margin-left: 40px; } + +.reveal q, .reveal blockquote { + quotes: none; } + +.reveal blockquote { + display: block; + position: relative; + width: 70%; + margin: 20px auto; + padding: 5px; + font-style: italic; + background: rgba(255, 255, 255, 0.05); + box-shadow: 0 0 2px rgba(0, 0, 0, 0.2); } + +.reveal blockquote p:first-child, .reveal blockquote p:last-child { + display: inline-block; } + +.reveal q { + font-style: italic; } + +.reveal pre { + display: block; + position: relative; + width: 90%; + margin: 20px auto; + text-align: left; + font-size: 0.55em; + font-family: monospace; + line-height: 1.2em; + word-wrap: break-word; + box-shadow: 0 0 6px rgba(0, 0, 0, 0.3); } + +.reveal code { + font-family: monospace; } + +.reveal pre code { + display: block; + padding: 5px; + overflow: auto; + max-height: 400px; + word-wrap: normal; + background: #3F3F3F; + color: #DCDCDC; } + +.reveal table { + margin: auto; + border-collapse: collapse; + border-spacing: 0; } + +.reveal table th { + font-weight: bold; } + +.reveal table th, .reveal table td { + text-align: left; + padding: 0.2em 0.5em 0.2em 0.5em; + border-bottom: 1px solid; } + +.reveal table th[align="center"], .reveal table td[align="center"] { + text-align: center; } + +.reveal table th[align="right"], .reveal table td[align="right"] { + text-align: right; } + +.reveal table tr:last-child td { + border-bottom: none; } + +.reveal sup { + vertical-align: super; } + +.reveal sub { + vertical-align: sub; } + +.reveal small { + display: inline-block; + font-size: 0.6em; + line-height: 1.2em; + vertical-align: top; } + +.reveal small * { + vertical-align: top; } + +/********************************************* + * LINKS + *********************************************/ +.reveal a { + color: #42affa; + text-decoration: none; + -webkit-transition: color 0.15s ease; + -moz-transition: color 0.15s ease; + transition: color 0.15s ease; } + +.reveal a:hover { + color: #8dcffc; + text-shadow: none; + border: none; } + +.reveal .roll span:after { + color: #fff; + background: #068ee9; } + +/********************************************* + * IMAGES + *********************************************/ +.reveal section img { + margin: 15px 0; + /*background: rgba(255, 255, 255, 0.12);*/ + /*border: 4px solid #fff;*/ + /*box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);*/ } + +.reveal a img { + -webkit-transition: all 0.15s linear; + -moz-transition: all 0.15s linear; + transition: all 0.15s linear; } + +.reveal a:hover img { + background: rgba(255, 255, 255, 0.2); + border-color: #42affa; + box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); } + +/********************************************* + * NAVIGATION CONTROLS + *********************************************/ +.reveal .controls div.navigate-left, .reveal .controls div.navigate-left.enabled { + border-right-color: #42affa; } + +.reveal .controls div.navigate-right, .reveal .controls div.navigate-right.enabled { + border-left-color: #42affa; } + +.reveal .controls div.navigate-up, .reveal .controls div.navigate-up.enabled { + border-bottom-color: #42affa; } + +.reveal .controls div.navigate-down, .reveal .controls div.navigate-down.enabled { + border-top-color: #42affa; } + +.reveal .controls div.navigate-left.enabled:hover { + border-right-color: #8dcffc; } + +.reveal .controls div.navigate-right.enabled:hover { + border-left-color: #8dcffc; } + +.reveal .controls div.navigate-up.enabled:hover { + border-bottom-color: #8dcffc; } + +.reveal .controls div.navigate-down.enabled:hover { + border-top-color: #8dcffc; } + +/********************************************* + * PROGRESS BAR + *********************************************/ +.reveal .progress { + background: rgba(0, 0, 0, 0.2); } + +.reveal .progress span { + background: #42affa; + -webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); + -moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); + transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); } + +/********************************************* + * SLIDE NUMBER + *********************************************/ +.reveal .slide-number { + color: #42affa; + background-color: rgba(0, 0, 0, 0); +} + +/********************************************* + * GENERAL PURPOSE COLORS + *********************************************/ + +.reveal .red { + color: red; +} + +.reveal .orange { + color: orange; +} + +.reveal .yellow { + color: yellow; +} + +.reveal .green { + color: green; +} + +/********************************************* + * C3JS Charts + *********************************************/ + +.c3 { + fill: white; } + +.c3 line, .c3 path { + stroke: white !important; } + +/********************************************* + * Custom styling of individual charts + *********************************************/ + +#most-significant-barriers .c3-shape .c3-shape-2 .c3-bar .c3-bar-2 { + color: red; +} + +/********************************************* + * Footer and Header + *********************************************/ + +.header { + position:relative; +} +/*.header .left { + position:absolute; + top: 5px; + left: 5px; + width: 196px; + height: 100px; + background-image: url("../../../images/logo-building-iot.png"); +}*/ +.header .right { + position:absolute; + top: 5px; + right: 5px; + width: 246px; + height: 100px; + background-image: url("../../../images/logo-apache.png"); +} + +.footer { + position:relative; +} +/*.footer .left { + position:absolute; + bottom: 5px; + left: 5px; + width: 392px; + height: 50px; + background-image: url("../../../images/logo-company.png"); +} +.footer .right { + position:absolute; + bottom: 5px; + right: 5px; + width: 306px; + height: 100px; + background-image: url("../../../images/logo-training.png"); +}*/ + +/********************************************* + * Add the ability to split into two columns + *********************************************/ + +.reveal .west { + position: fixed; + left: 5%; +} + +.reveal .east { + position: fixed; + right: 5%; +} \ No newline at end of file diff --git a/content/Apache/Incubator/pom.xml b/content/Apache/Incubator/pom.xml index a63eb9a..5face1d 100644 --- a/content/Apache/Incubator/pom.xml +++ b/content/Apache/Incubator/pom.xml @@ -38,6 +38,8 @@ <module>Mentors</module> <module>NavigatingASFIncubation</module> <module>ReleaseChecklist</module> + <module>PPMC</module> + <module>Committers</module> </modules> </project> diff --git a/content/Conferences/Gravitino/convert-slides.js b/content/Conferences/Gravitino/convert-slides.js new file mode 100644 index 0000000..4e50c84 --- /dev/null +++ b/content/Conferences/Gravitino/convert-slides.js @@ -0,0 +1,27 @@ +/* + * 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. + */ + +// Load Asciidoctor.js and the reveal.js converter +var asciidoctor = require('@asciidoctor/core')() +var asciidoctorRevealjs = require('@asciidoctor/reveal.js') +asciidoctorRevealjs.register() + +// Convert the document using the reveal.js converter +var options = { safe: 'safe', backend: 'revealjs' } +asciidoctor.convertFile('src/main/asciidoc/index_en.adoc', options) diff --git a/site/pom.xml b/site/pom.xml index dddb704..d776349 100644 --- a/site/pom.xml +++ b/site/pom.xml @@ -309,6 +309,20 @@ <type>war</type> <outputDirectory>${project.build.directory}/site/presentations/apache/incubator/mentors</outputDirectory> </artifactItem> + <artifactItem> + <groupId>org.apache.training.content</groupId> + <artifactId>incubator-ppmc</artifactId> + <version>1.0.0-SNAPSHOT</version> + <type>war</type> + <outputDirectory>${project.build.directory}/site/presentations/apache/incubator/PPMC</outputDirectory> + </artifactItem> + <artifactItem> + <groupId>org.apache.training.content</groupId> + <artifactId>incubator-committers</artifactId> + <version>1.0.0-SNAPSHOT</version> + <type>war</type> + <outputDirectory>${project.build.directory}/site/presentations/apache/incubator/Committers</outputDirectory> + </artifactItem> <artifactItem> <groupId>org.apache.training.content</groupId> <artifactId>training-content-apache-incubator-navigating-asf-incubation</artifactId>
