You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2023/06/27 10:03:39 UTC

[camel] branch main updated: (chores) doc: consolidated building documentation

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

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new ff31a2435b4 (chores) doc: consolidated building documentation
ff31a2435b4 is described below

commit ff31a2435b4c692f6aea48ed0933e9c0e46d59ac
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Tue Jun 27 11:16:22 2023 +0200

    (chores) doc: consolidated building documentation
---
 docs/main/modules/contributing/pages/building.adoc | 106 +++++++++++++++++++++
 docs/main/modules/contributing/pages/index.adoc    |  35 ++-----
 docs/user-manual/modules/ROOT/pages/building.adoc  |  67 +------------
 3 files changed, 115 insertions(+), 93 deletions(-)

diff --git a/docs/main/modules/contributing/pages/building.adoc b/docs/main/modules/contributing/pages/building.adoc
new file mode 100644
index 00000000000..86d780edca8
--- /dev/null
+++ b/docs/main/modules/contributing/pages/building.adoc
@@ -0,0 +1,106 @@
+= Building Camel from Source
+
+== Common Requirements
+
+* About 10Gb of free disk space for the compiled code and local Maven cache.
+
+* At least 3.5Gb of RAM.
+
+* A relatively modern operating system (Linux, Windows, macOS, *BSDs).
+
+** Other operating systems capable of running Java should work too, although that is not tested by the project
+
+== Prerequisites for Camel 3.x
+
+* Java 11 (we test using https://adoptium.net/[OpenJDK], but any modern JDK should be fine).
+
+* https://maven.apache.org[Apache Maven] version 3.8.0 or greater to build the code. You can either use your own Maven package or build using the https://github.com/takari/maven-wrapper[Maven Wrapper] (`mvnw`) provided with the project.
+
+== Prerequisites for Camel 4.x
+
+* Java 17 (we test using https://adoptium.net/[OpenJDK], but any modern JDK should be fine).
+
+* https://github.com/takari/maven-wrapper[Maven Wrapper] can be used and is bundled.
+
+* https://maven.apache.org[Apache Maven] version 3.9.0 or greater to build the code. You can either use your own Maven package or build using the https://github.com/takari/maven-wrapper[Maven Wrapper] (`mvnw`) provided with the project.
+
+== Maven
+
+Running the Maven Wrapper `mvnw` script with `-v` parameter from the root directory of the project will reveal the recommended Maven version:
+
+[source,bash]
+----
+./mvnw -v
+Apache Maven 1.2.3
+Maven home: /home/user/.m2/wrapper/dists/apache-maven-1.2.3-bin/deadbeef/apache-maven-1.2.3
+Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: /home/user/java/17.0.5-tem
+Default locale: en_IE, platform encoding: UTF-8
+OS name: "linux", version: "6.3.7-200.fc38.x86_64", arch: "amd64", family: "unix"
+----
+
+If you do not like installing Maven manually, you can keep using `mvnw` instead of `mvn`.
+
+[NOTE]
+====
+Camel committers and experienced Camel contributors are may also use Maven Daemon `mvnd` to build Camel faster.
+====
+
+== Maven options
+
+To build Camel maven has to be configured to use more memory, which is done automatically via
+the `.mvn/jvm.config` file.
+
+== A normal build
+
+Beware this runs all the unit tests which takes many hours.
+
+[source,bash]
+-----------------
+mvn clean install
+-----------------
+
+=== Building Camel 3
+
+The following command will do a fast build.
+
+[source,bash]
+----
+mvn clean install -Pfastinstall
+----
+
+=== Building Camel 4
+
+The following command will do a fast build.
+
+[source,bash]
+----
+mvn clean install -Dquickly
+----
+
+[NOTE]
+====
+On Camel 4, you can also use `-Pfastinstall` to trigger a fast build, but we encourage contributors to switch to the new command.
+====
+
+The commands above will build Camel in a quick way: skipping build optional artifacts and running tests. In most modern computers, this should complete in at most 30 minutes (usually much less, for newer hardware).
+
+
+=== Building source jars
+
+If you want to build jar files with the source code, then you can run this command from the camel root folder:
+
+[source,bash]
+------------------------------------------
+mvn -Pfastinstall,source-jar clean install
+------------------------------------------
+
+=== Building for deployment
+
+If you want to build Camel so it can be deployed to a Maven repository, then you can run this command from the camel root folder:
+
+[source,bash]
+------------------------------------------
+mvn -Pfastinstall,deploy clean install
+------------------------------------------
+
+The build with deployment will build source jars, javadoc and other artifacts needed for deployment.
diff --git a/docs/main/modules/contributing/pages/index.adoc b/docs/main/modules/contributing/pages/index.adoc
index ed9ab92bf94..5ba1beaf15f 100644
--- a/docs/main/modules/contributing/pages/index.adoc
+++ b/docs/main/modules/contributing/pages/index.adoc
@@ -100,36 +100,17 @@ git branch my-new-feature
 git checkout my-new-feature
 ----
 
-**NOTE:** If you are an Apache Camel committer, then you may also clone the https://gitbox.apache.org/repos/asf/camel.git[ASF git repo].
-
-
-== Building on the code
-
-To build the project, you need http://maven.apache.org/download.html[Apache Maven].
-
-- To build Camel 3, you need Apache Maven version 3.6.x or newer.
-- To build Camel 4, you need Apache Maven version 3.9.x or newer.
-
-
-Running the Maven Wrapper `mvnw` script with `-v` parameter from the root directory of the project will reveal the recommended Maven version:
-
-[source,bash]
-----
-./mvnw -v
-Apache Maven 1.2.3
-Maven home: /home/user/.m2/wrapper/dists/apache-maven-1.2.3-bin/deadbeef/apache-maven-1.2.3
-Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: /home/user/java/17.0.5-tem
-Default locale: en_IE, platform encoding: UTF-8
-OS name: "linux", version: "6.3.7-200.fc38.x86_64", arch: "amd64", family: "unix"
-----
-
-If you do not like installing Maven manually, you can keep using `mvnw` instead of `mvn`.
-
 [NOTE]
 ====
-Camel committers and experienced Camel contributors are also encouraged to use Maven Daemon `mvnd` to build Camel faster.
+If you are an Apache Camel committer, then you may also clone the https://gitbox.apache.org/repos/asf/camel.git[ASF git repo].
 ====
 
+== Building the code
+
+To build the project, you need http://maven.apache.org/download.html[Apache Maven].
+
+- To build Camel 3, you need Java 11 and Apache Maven version 3.6.x or newer.
+- To build Camel 4, you need Java 17 Apache Maven version 3.9.x or newer.
 
 === Building Camel 3
 
@@ -154,7 +135,7 @@ mvn clean install -Dquickly
 On Camel 4, you can also use `-Pfastinstall` to trigger a fast build, but we encourage contributors to switch to the new command.
 ====
 
-You can find more details about building Camel on the xref:manual::building.adoc[Building Camel] page.
+You can find more details about building Camel on the xref:contributing:building.adoc[Building Camel] page.
 
 **Tips**: if you aren’t able to build a component after adding some new URI parameters due to `Empty doc for option: [OPTION], parent options: <null>` please make sure that you either added properly javadoc for get/set method or description in `@UriPath` annotation.
 
diff --git a/docs/user-manual/modules/ROOT/pages/building.adoc b/docs/user-manual/modules/ROOT/pages/building.adoc
index dde1de76dfe..a66d5444c6a 100644
--- a/docs/user-manual/modules/ROOT/pages/building.adoc
+++ b/docs/user-manual/modules/ROOT/pages/building.adoc
@@ -1,69 +1,4 @@
 = Building Camel from Source
 
-Camel uses http://maven.apache.org/[Maven] as its build and management
-tool. If you don't fancy using Maven you can use your IDE directly or
-Download a distribution or JAR.
-
-== Prerequisites
-
-* Java 11
-
-* https://github.com/takari/maven-wrapper[Maven Wrapper] can be used and are bundled.
-
-* Otherwise, http://maven.apache.org/download.html[download and install Maven]
-** Maven 3.8.x or newer is required to build Camel 3 onwards
-
-* Get the latest source from https://github.com/apache/camel/[Github]
-
-== Maven options
-
-To build Camel maven has to be configured to use more memory, which is done automatically via
-the `.mvn/jvm.config` file.
-
-== A normal build
-
-Beware this runs all the unit tests which takes many hours.
-
-[source,bash]
------------------
-mvn clean install
------------------
-
-== A quick build without running tests
-
-The following skips building the manual, the distro and does not execute
-the unit tests, which can complete in less than 10 minutes.
-
-[source,bash]
--------------------------------
-mvn clean install -Pfastinstall
--------------------------------
-
-== A normal build without running tests but auto formatting and checkstyle verification enabled
-
-[source,bash]
--------------------------------------------
-mvn clean install -Pfastinstall,format,sourcecheck
--------------------------------------------
-
-== Building with checkstyle
-
-To enable source style checking with checkstyle, build Camel with the
-`-Psourcecheck` parameter
-
-[source,bash]
--------------------------------
-mvn clean install -Psourcecheck 
--------------------------------
-
-== Building source jars
-
-If you want to build jar files with the source code, that for instance
-Eclipse can important, so you can debug the Camel code as well. Then you
-can run this command from the camel root folder:
-
-[source,bash]
-------------------------------------------
-mvn clean source:jar install -Pfastinstall
-------------------------------------------
+This content was moved to the link:/camel-core/contributing[Getting Started].