You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ms...@apache.org on 2020/06/15 05:21:13 UTC

[pdfbox-docs] branch master updated: PDFBOX-4848: add documentation about maven based build

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

msahyoun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pdfbox-docs.git


The following commit(s) were added to refs/heads/master by this push:
     new 53df44a  PDFBOX-4848: add documentation about maven based build
53df44a is described below

commit 53df44acfee4bc6601b45914a2b037b700f83f65
Author: Maruan Sahyoun <sa...@fileaffairs.de>
AuthorDate: Mon Jun 15 07:20:19 2020 +0200

    PDFBOX-4848: add documentation about maven based build
---
 content/siteupdate.md | 45 +++++++++++++++++++++++++++++++++++++++++++++
 pom.xml               |  1 +
 2 files changed, 46 insertions(+)

diff --git a/content/siteupdate.md b/content/siteupdate.md
index a246d9d..e0e3d48 100644
--- a/content/siteupdate.md
+++ b/content/siteupdate.md
@@ -108,3 +108,48 @@ from the `<SVN_ROOT>/../pdfbox` directory.
 It uses the same `pdfbox-site` settings from above to connect to the repository.
 
 <p class="alert alert-info">As <code>mvn clean</code> will delete the javadoc files download from the Apache CMS it's advised to configure <code>${svn.scmJavadocCheckoutDirectory}</code> to a local directory not below <code>./target</code>.</p>
+
+## Build with Maven
+
+The project provides a simple way to build the website sources locally using the build tool [Maven](https://maven.apache.org/).
+
+The Maven build automatically downloads the tool binaries such as `node` and `yarn` for you. You do not need to install
+those tools on your host then. The binaries are added to the local project sources only and generate the website content.
+
+As the Maven build uses pinned versions of `node` and `yarn` that are tested to build the website you most likely avoid
+build errors due to incompatible versions of `Node.js` tooling installed on your machine.
+
+### Preparing Maven
+
+Make sure that you have Maven installed.
+
+    $ mvn --version
+
+If this command fails with an error, you do not have Maven installed.
+
+Please install Maven using your favorite package manager (like [Homebrew](https://brew.sh/)) or from
+official [Maven binaries](https://maven.apache.org/install.html)
+
+### Building from scratch
+
+When building everything from scratch the build executes following steps:
+
+- Download `Node.js` and `npm` binaries to the local project
+- Load required libraries to the local project using `npm`
+- Build the website content using Eleventy
+
+You can do all of this with one single command:
+
+    $ mvn package
+
+The whole process takes up to five minutes (time to grab some coffee!)
+
+When the build is finished you should see the generated website in the `public` directory.
+
+### Clean build
+
+When rebuilding the website the process uses some cached content.
+If you want to start from scratch for some reason you can simply add the `clean` operation to the build which removes
+all generated sources in the project first.
+
+    $ mvn clean package
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index cb7cbfb..5b464f6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,6 +23,7 @@
         <groupId>org.apache.pdfbox</groupId>
         <artifactId>pdfbox-site</artifactId>
         <version>2.0.0</version>
+        <packaging>pom</packaging>
 
         <name>Apache PDFBox Website</name>
         <description>