ptlrs commented on code in PR #100: URL: https://github.com/apache/ozone-site/pull/100#discussion_r1839436324
########## docs/08-developer-guide/01-build/02-maven.md: ########## @@ -8,3 +8,99 @@ sidebar_label: Maven - Cover basic Maven commands to build and run tests. - Document all the Ozone specific Maven flags we use to speed up or skip parts of the build, and when they are useful. + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +This guide explains how to build Apache Ozone from source using Maven and prepare it for deployment. + +## Prerequisites + +**TODO** : [HDDS-11625](https://issues.apache.org/jira/browse/HDDS-11625) Finalize the version numbers of prerequisite packages Review Comment: That's a good point we should take advantage of the enforcer plugin to have reproducible builds. However, what should be considered the minimum version for Maven and Git? We depend on Hadoop and I can see if they have a minimum version specified for Maven. On that note, it is also not clear what the minimum version of Java should be. We do build with versions 8, 11, 17. Some of the pom files specify the compiler source and target versions to Java 8. Some of the tests fail when run from the IDE with a newer JDK and need extra JVM parameters to allow Java lang and util modules and the security manager. ########## cspell.yaml: ########## @@ -99,3 +99,7 @@ words: - UX - devs - CLI +- xzf +- Dskip +- Pdist +- Pnative Review Comment: Fixed ########## docs/08-developer-guide/01-build/02-maven.md: ########## @@ -8,3 +8,99 @@ sidebar_label: Maven - Cover basic Maven commands to build and run tests. - Document all the Ozone specific Maven flags we use to speed up or skip parts of the build, and when they are useful. + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +This guide explains how to build Apache Ozone from source using Maven and prepare it for deployment. + +## Prerequisites + +**TODO** : [HDDS-11625](https://issues.apache.org/jira/browse/HDDS-11625) Finalize the version numbers of prerequisite packages + +Before you begin, ensure you have the following installed on your build machine: + +- Java 1.8 or higher +- Apache Maven 3.6.3 or higher +- Git (if building from source repository) + +## Building Ozone + +You can build Apache Ozone either by cloning the source code from Git or by downloading the official source tarball. + +### 1. Obtain the Source Code + +Choose one of the following methods to get the source code: + +<Tabs> + <TabItem value="Git" label="Git" default> + ```bash + git clone https://github.com/apache/ozone.git + cd ozone + ``` + </TabItem> + <TabItem value="Tarball" label="Tarball"> Review Comment: >We should also clarify that the published tarballs correspond to official releases only. We don't publish snapshots so if an intermediate build is desired it will have to be done from source. I am not sure I follow what needs to be clarified. This page is about building from source. The official sources will have the source code corresponding to the build and the git option is an alternative to get the other versions of the source code. ########## docs/08-developer-guide/01-build/02-maven.md: ########## @@ -8,3 +8,99 @@ sidebar_label: Maven - Cover basic Maven commands to build and run tests. - Document all the Ozone specific Maven flags we use to speed up or skip parts of the build, and when they are useful. + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +This guide explains how to build Apache Ozone from source using Maven and prepare it for deployment. + +## Prerequisites + +**TODO** : [HDDS-11625](https://issues.apache.org/jira/browse/HDDS-11625) Finalize the version numbers of prerequisite packages + +Before you begin, ensure you have the following installed on your build machine: + +- Java 1.8 or higher +- Apache Maven 3.6.3 or higher +- Git (if building from source repository) + +## Building Ozone + +You can build Apache Ozone either by cloning the source code from Git or by downloading the official source tarball. + +### 1. Obtain the Source Code + +Choose one of the following methods to get the source code: + +<Tabs> + <TabItem value="Git" label="Git" default> + ```bash + git clone https://github.com/apache/ozone.git + cd ozone + ``` + </TabItem> + <TabItem value="Tarball" label="Tarball"> + ```bash + curl -OL https://dlcdn.apache.org/ozone/1.4.0/ozone-1.4.0-src.tar.gz + tar xzf ozone-1.4.0-src.tar.gz + cd ozone-1.4.0-src + ``` + </TabItem> +</Tabs> + +### 2. Build the Project + +#### Basic Build + +For a basic build that skips tests: + +```bash +mvn clean package -DskipTests=true +``` + +This command will: + +- Clean previous build artifacts +- Compile the source code +- Package the compiled code into JAR files +- Create a distribution in `hadoop-ozone/dist/target/ozone-<version>` + +#### Build with Tests + +To run unit tests during the build: + +```bash +mvn clean package +``` + +#### Create Distribution Tarball + +To create a distribution tarball for deployment: + +```bash +mvn clean package -DskipTests=true -Pdist +``` + +This creates a tarball in `hadoop-ozone/dist/target` that contains all necessary files for deployment. + +### Maven Build Options + +Several Maven options are available to customize the build process: + +- `-DskipTests=true`: Skip all tests +- `-Pdist`: Enable the distribution profile to create deployment tarballs +- `-Pnative`: Build native libraries (requires additional system dependencies) +- `-T 4`: Use 4 threads for parallel building (adjust number based on your CPU) +- `-am -pl module-name`: Build a specific module and its dependencies + +### Build Output + +The build process creates several important artifacts: + +- **Distribution Directory**: `hadoop-ozone/dist/target/ozone-<version>/` +- **Distribution Tarball**: `hadoop-ozone/dist/target/ozone-<version>.tar.gz` (when using `-Pdist`) +- **Individual Module JARs**: Found in `target/` directories within each module Review Comment: I think `share/ozone/lib` is a better path to share as it has all the jars. ########## docs/08-developer-guide/01-build/02-maven.md: ########## @@ -8,3 +8,99 @@ sidebar_label: Maven - Cover basic Maven commands to build and run tests. - Document all the Ozone specific Maven flags we use to speed up or skip parts of the build, and when they are useful. + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +This guide explains how to build Apache Ozone from source using Maven and prepare it for deployment. + +## Prerequisites + +**TODO** : [HDDS-11625](https://issues.apache.org/jira/browse/HDDS-11625) Finalize the version numbers of prerequisite packages + +Before you begin, ensure you have the following installed on your build machine: + +- Java 1.8 or higher +- Apache Maven 3.6.3 or higher +- Git (if building from source repository) + +## Building Ozone + +You can build Apache Ozone either by cloning the source code from Git or by downloading the official source tarball. + +### 1. Obtain the Source Code + +Choose one of the following methods to get the source code: + +<Tabs> + <TabItem value="Git" label="Git" default> + ```bash + git clone https://github.com/apache/ozone.git + cd ozone + ``` + </TabItem> + <TabItem value="Tarball" label="Tarball"> + ```bash + curl -OL https://dlcdn.apache.org/ozone/1.4.0/ozone-1.4.0-src.tar.gz + tar xzf ozone-1.4.0-src.tar.gz + cd ozone-1.4.0-src + ``` + </TabItem> +</Tabs> + +### 2. Build the Project + +#### Basic Build + +For a basic build that skips tests: + +```bash +mvn clean package -DskipTests=true +``` + +This command will: + +- Clean previous build artifacts +- Compile the source code +- Package the compiled code into JAR files +- Create a distribution in `hadoop-ozone/dist/target/ozone-<version>` + +#### Build with Tests + +To run unit tests during the build: + +```bash +mvn clean package +``` + +#### Create Distribution Tarball + +To create a distribution tarball for deployment: + +```bash +mvn clean package -DskipTests=true -Pdist +``` + +This creates a tarball in `hadoop-ozone/dist/target` that contains all necessary files for deployment. + +### Maven Build Options + +Several Maven options are available to customize the build process: + +- `-DskipTests=true`: Skip all tests +- `-Pdist`: Enable the distribution profile to create deployment tarballs +- `-Pnative`: Build native libraries (requires additional system dependencies) +- `-T 4`: Use 4 threads for parallel building (adjust number based on your CPU) +- `-am -pl module-name`: Build a specific module and its dependencies Review Comment: I update the `package` commands to `install`. ########## docs/08-developer-guide/01-build/02-maven.md: ########## @@ -8,3 +8,99 @@ sidebar_label: Maven - Cover basic Maven commands to build and run tests. - Document all the Ozone specific Maven flags we use to speed up or skip parts of the build, and when they are useful. + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +This guide explains how to build Apache Ozone from source using Maven and prepare it for deployment. + +## Prerequisites + +**TODO** : [HDDS-11625](https://issues.apache.org/jira/browse/HDDS-11625) Finalize the version numbers of prerequisite packages + +Before you begin, ensure you have the following installed on your build machine: + +- Java 1.8 or higher +- Apache Maven 3.6.3 or higher +- Git (if building from source repository) + +## Building Ozone + +You can build Apache Ozone either by cloning the source code from Git or by downloading the official source tarball. + +### 1. Obtain the Source Code + +Choose one of the following methods to get the source code: + +<Tabs> + <TabItem value="Git" label="Git" default> + ```bash + git clone https://github.com/apache/ozone.git + cd ozone + ``` + </TabItem> + <TabItem value="Tarball" label="Tarball"> + ```bash + curl -OL https://dlcdn.apache.org/ozone/1.4.0/ozone-1.4.0-src.tar.gz + tar xzf ozone-1.4.0-src.tar.gz + cd ozone-1.4.0-src + ``` + </TabItem> +</Tabs> + +### 2. Build the Project + +#### Basic Build + +For a basic build that skips tests: + +```bash +mvn clean package -DskipTests=true +``` + +This command will: + +- Clean previous build artifacts +- Compile the source code +- Package the compiled code into JAR files +- Create a distribution in `hadoop-ozone/dist/target/ozone-<version>` + +#### Build with Tests + +To run unit tests during the build: + +```bash +mvn clean package +``` + +#### Create Distribution Tarball + +To create a distribution tarball for deployment: + +```bash +mvn clean package -DskipTests=true -Pdist +``` + +This creates a tarball in `hadoop-ozone/dist/target` that contains all necessary files for deployment. + +### Maven Build Options + +Several Maven options are available to customize the build process: + +- `-DskipTests=true`: Skip all tests +- `-Pdist`: Enable the distribution profile to create deployment tarballs +- `-Pnative`: Build native libraries (requires additional system dependencies) Review Comment: This option is for building GraalVM/OpenJDK native images. Those native images have a shorter JVM startup time but not the optimization capabilities of the full JVM. Also, some features like reflection are not supported. I guess we can run an experiment later to see if it (a) works and (b) is of any use to us. ########## docs/08-developer-guide/01-build/02-maven.md: ########## @@ -8,3 +8,99 @@ sidebar_label: Maven - Cover basic Maven commands to build and run tests. - Document all the Ozone specific Maven flags we use to speed up or skip parts of the build, and when they are useful. + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +This guide explains how to build Apache Ozone from source using Maven and prepare it for deployment. + +## Prerequisites + +**TODO** : [HDDS-11625](https://issues.apache.org/jira/browse/HDDS-11625) Finalize the version numbers of prerequisite packages + +Before you begin, ensure you have the following installed on your build machine: + +- Java 1.8 or higher +- Apache Maven 3.6.3 or higher +- Git (if building from source repository) + +## Building Ozone + +You can build Apache Ozone either by cloning the source code from Git or by downloading the official source tarball. + +### 1. Obtain the Source Code + +Choose one of the following methods to get the source code: + +<Tabs> + <TabItem value="Git" label="Git" default> + ```bash + git clone https://github.com/apache/ozone.git + cd ozone + ``` + </TabItem> + <TabItem value="Tarball" label="Tarball"> + ```bash + curl -OL https://dlcdn.apache.org/ozone/1.4.0/ozone-1.4.0-src.tar.gz + tar xzf ozone-1.4.0-src.tar.gz + cd ozone-1.4.0-src + ``` + </TabItem> +</Tabs> + +### 2. Build the Project + +#### Basic Build + +For a basic build that skips tests: + +```bash +mvn clean package -DskipTests=true +``` + +This command will: + +- Clean previous build artifacts +- Compile the source code +- Package the compiled code into JAR files +- Create a distribution in `hadoop-ozone/dist/target/ozone-<version>` + +#### Build with Tests + +To run unit tests during the build: + +```bash +mvn clean package +``` + +#### Create Distribution Tarball + +To create a distribution tarball for deployment: + +```bash +mvn clean package -DskipTests=true -Pdist +``` + +This creates a tarball in `hadoop-ozone/dist/target` that contains all necessary files for deployment. + +### Maven Build Options + +Several Maven options are available to customize the build process: + +- `-DskipTests=true`: Skip all tests +- `-Pdist`: Enable the distribution profile to create deployment tarballs +- `-Pnative`: Build native libraries (requires additional system dependencies) +- `-T 4`: Use 4 threads for parallel building (adjust number based on your CPU) Review Comment: Added this as well ########## docs/08-developer-guide/01-build/02-maven.md: ########## @@ -8,3 +8,99 @@ sidebar_label: Maven - Cover basic Maven commands to build and run tests. - Document all the Ozone specific Maven flags we use to speed up or skip parts of the build, and when they are useful. + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +This guide explains how to build Apache Ozone from source using Maven and prepare it for deployment. + +## Prerequisites + +**TODO** : [HDDS-11625](https://issues.apache.org/jira/browse/HDDS-11625) Finalize the version numbers of prerequisite packages + +Before you begin, ensure you have the following installed on your build machine: + +- Java 1.8 or higher +- Apache Maven 3.6.3 or higher +- Git (if building from source repository) + +## Building Ozone Review Comment: Fixed ########## docs/08-developer-guide/01-build/02-maven.md: ########## @@ -8,3 +8,99 @@ sidebar_label: Maven - Cover basic Maven commands to build and run tests. - Document all the Ozone specific Maven flags we use to speed up or skip parts of the build, and when they are useful. + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +This guide explains how to build Apache Ozone from source using Maven and prepare it for deployment. + +## Prerequisites Review Comment: Fixed ########## docs/08-developer-guide/01-build/02-maven.md: ########## @@ -8,3 +8,99 @@ sidebar_label: Maven - Cover basic Maven commands to build and run tests. - Document all the Ozone specific Maven flags we use to speed up or skip parts of the build, and when they are useful. + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +This guide explains how to build Apache Ozone from source using Maven and prepare it for deployment. + +## Prerequisites + +**TODO** : [HDDS-11625](https://issues.apache.org/jira/browse/HDDS-11625) Finalize the version numbers of prerequisite packages + +Before you begin, ensure you have the following installed on your build machine: + +- Java 1.8 or higher +- Apache Maven 3.6.3 or higher +- Git (if building from source repository) + +## Building Ozone + +You can build Apache Ozone either by cloning the source code from Git or by downloading the official source tarball. + +### 1. Obtain the Source Code + +Choose one of the following methods to get the source code: + +<Tabs> + <TabItem value="Git" label="Git" default> + ```bash + git clone https://github.com/apache/ozone.git + cd ozone + ``` + </TabItem> + <TabItem value="Tarball" label="Tarball"> + ```bash + curl -OL https://dlcdn.apache.org/ozone/1.4.0/ozone-1.4.0-src.tar.gz + tar xzf ozone-1.4.0-src.tar.gz + cd ozone-1.4.0-src + ``` + </TabItem> +</Tabs> + +### 2. Build the Project + +#### Basic Build + +For a basic build that skips tests: + +```bash +mvn clean package -DskipTests=true +``` + +This command will: + +- Clean previous build artifacts +- Compile the source code +- Package the compiled code into JAR files +- Create a distribution in `hadoop-ozone/dist/target/ozone-<version>` + +#### Build with Tests + +To run unit tests during the build: + +```bash +mvn clean package +``` + +#### Create Distribution Tarball + +To create a distribution tarball for deployment: + +```bash +mvn clean package -DskipTests=true -Pdist +``` + +This creates a tarball in `hadoop-ozone/dist/target` that contains all necessary files for deployment. + +### Maven Build Options Review Comment: Fixed ########## docs/08-developer-guide/01-build/02-maven.md: ########## @@ -8,3 +8,99 @@ sidebar_label: Maven - Cover basic Maven commands to build and run tests. - Document all the Ozone specific Maven flags we use to speed up or skip parts of the build, and when they are useful. + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +This guide explains how to build Apache Ozone from source using Maven and prepare it for deployment. + +## Prerequisites + +**TODO** : [HDDS-11625](https://issues.apache.org/jira/browse/HDDS-11625) Finalize the version numbers of prerequisite packages + +Before you begin, ensure you have the following installed on your build machine: + +- Java 1.8 or higher +- Apache Maven 3.6.3 or higher +- Git (if building from source repository) + +## Building Ozone + +You can build Apache Ozone either by cloning the source code from Git or by downloading the official source tarball. + +### 1. Obtain the Source Code + +Choose one of the following methods to get the source code: + +<Tabs> + <TabItem value="Git" label="Git" default> + ```bash + git clone https://github.com/apache/ozone.git + cd ozone + ``` + </TabItem> + <TabItem value="Tarball" label="Tarball"> + ```bash + curl -OL https://dlcdn.apache.org/ozone/1.4.0/ozone-1.4.0-src.tar.gz + tar xzf ozone-1.4.0-src.tar.gz + cd ozone-1.4.0-src + ``` + </TabItem> +</Tabs> + +### 2. Build the Project + +#### Basic Build + +For a basic build that skips tests: + +```bash +mvn clean package -DskipTests=true +``` + +This command will: + +- Clean previous build artifacts +- Compile the source code +- Package the compiled code into JAR files +- Create a distribution in `hadoop-ozone/dist/target/ozone-<version>` + +#### Build with Tests + +To run unit tests during the build: + +```bash +mvn clean package +``` + +#### Create Distribution Tarball + +To create a distribution tarball for deployment: + +```bash +mvn clean package -DskipTests=true -Pdist +``` + +This creates a tarball in `hadoop-ozone/dist/target` that contains all necessary files for deployment. + +### Maven Build Options + +Several Maven options are available to customize the build process: + +- `-DskipTests=true`: Skip all tests +- `-Pdist`: Enable the distribution profile to create deployment tarballs +- `-Pnative`: Build native libraries (requires additional system dependencies) +- `-T 4`: Use 4 threads for parallel building (adjust number based on your CPU) +- `-am -pl module-name`: Build a specific module and its dependencies + +### Build Output Review Comment: This is good. I added it as a simple test here. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
