Skip to content

Commit 16e395e

Browse files
committed
Add docs on excluding pip and setuptools from produced Jars
1 parent 32e0745 commit 16e395e

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

docs/user/Embedding-Build-Tools.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,22 @@ Remember to use the appropriate `GraalPyResources` API to create the Context. Th
161161
...
162162
</configuration>
163163
```
164-
164+
165+
- If you want to remove packages that are only needed during venv creation but not at runtime, such as setuptools or pip, you can use e.g. the `maven-jar-plugin`:
166+
```xml
167+
<plugin>
168+
<groupId>org.apache.maven.plugins</groupId>
169+
<artifactId>maven-jar-plugin</artifactId>
170+
<version>3.4.2</version>
171+
<configuration>
172+
<excludes>
173+
<exclude>**/site-packages/pip*/**</exclude>
174+
<exclude>**/site-packages/setuptools*/**</exclude>
175+
</excludes>
176+
</configuration>
177+
</plugin>
178+
```
179+
165180
### Locking Python Packages
166181
To lock the dependency tree of the specified Python packages, execute the GraalPy plugin goal `org.graalvm.python:graalpy-maven-plugin:lock-packages`.
167182
```bash

0 commit comments

Comments
 (0)