From 5fe9e0ddd87c33508e26db1445bb4de36eaac63b Mon Sep 17 00:00:00 2001 From: Ihor Didyk Date: Tue, 25 Nov 2025 19:23:10 +0200 Subject: [PATCH 1/2] docs: requirements file support for maven plugin --- docs/user/Embedding-Build-Tools.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/user/Embedding-Build-Tools.md b/docs/user/Embedding-Build-Tools.md index e7d1acf12b..10b2f473e7 100644 --- a/docs/user/Embedding-Build-Tools.md +++ b/docs/user/Embedding-Build-Tools.md @@ -148,6 +148,19 @@ The Python packages and their versions are specified as if used with `pip`: ... ``` +- The **requirementsFile** element declares a path to a `pip`-compatible requirements file with third-party Python packages to be downloaded and installed by the plugin.
Each line in the file is interpreted the same way as by `pip install -r`: + + ```xml + + requirements.txt + ... + + ``` + + > **_NOTE:_** + > Exactly one of `packages` or `requirementsFile` must be configured. + > If both are present at the same time, the build will fail with a configuration error. + - The **resourceDirectory** element can specify the relative [Java resource path](#java-resource-path). Remember to use `VirtualFileSystem$Builder#resourceDirectory` when configuring the `VirtualFileSystem` in Java. From 35ef0dc88abc0b0b4c1e7ccbf42fa4b4a8ff38ee Mon Sep 17 00:00:00 2001 From: Ihor Didyk Date: Wed, 3 Dec 2025 18:12:22 +0200 Subject: [PATCH 2/2] docs: update requirements file description to indicate no lock-file and pip-managed freezing --- docs/user/Embedding-Build-Tools.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/user/Embedding-Build-Tools.md b/docs/user/Embedding-Build-Tools.md index 10b2f473e7..47813460bf 100644 --- a/docs/user/Embedding-Build-Tools.md +++ b/docs/user/Embedding-Build-Tools.md @@ -148,7 +148,8 @@ The Python packages and their versions are specified as if used with `pip`: ... ``` -- The **requirementsFile** element declares a path to a `pip`-compatible requirements file with third-party Python packages to be downloaded and installed by the plugin.
Each line in the file is interpreted the same way as by `pip install -r`: +- The **requirementsFile** element declares a path to a pip-compatible `requirements.txt` file. + The plugin forwards this file directly to pip (`pip install -r`), allowing full use of pip’s native dependency format. ```xml @@ -159,7 +160,10 @@ The Python packages and their versions are specified as if used with `pip`: > **_NOTE:_** > Exactly one of `packages` or `requirementsFile` must be configured. - > If both are present at the same time, the build will fail with a configuration error. + > When `requirementsFile` is used: + > - the GraalPy lock file is not created or used + > - the `lock-packages` goal is disabled + > - dependency locking must be handled by pip (e.g., `pip freeze`) - The **resourceDirectory** element can specify the relative [Java resource path](#java-resource-path).