@@ -12,21 +12,57 @@ PythonEmbed embeds a real CPython interpreter in your JVM application via a subp
1212
1313## Quick Start
1414
15- Add the Gradle plugin to ` build.gradle ` :
16-
17- ``` groovy
18- plugins {
19- id 'io.github.howtis.python-embed' version '1.0.2'
20- }
21-
22- pythonEmbed {
23- packages = ['numpy']
24- }
25-
26- dependencies {
27- implementation 'io.github.howtis:python-embed-runtime:1.0.2'
28- }
29- ```
15+ === "Gradle"
16+
17+ Add the Gradle plugin to `build.gradle`:
18+
19+ ```groovy
20+ plugins {
21+ id 'io.github.howtis.python-embed' version '1.0.2'
22+ }
23+
24+ pythonEmbed {
25+ packages = ['numpy']
26+ }
27+
28+ dependencies {
29+ implementation 'io.github.howtis:python-embed-runtime:1.0.2'
30+ }
31+ ```
32+
33+ === "Maven"
34+
35+ Add the Maven plugin to `pom.xml`:
36+
37+ ```xml
38+ <dependencies>
39+ <dependency>
40+ <groupId>io.github.howtis</groupId>
41+ <artifactId>python-embed-runtime</artifactId>
42+ <version>1.0.2</version>
43+ </dependency>
44+ </dependencies>
45+
46+ <build>
47+ <plugins>
48+ <plugin>
49+ <groupId>io.github.howtis</groupId>
50+ <artifactId>python-embed-maven-plugin</artifactId>
51+ <version>1.0.2</version>
52+ <executions>
53+ <execution>
54+ <goals><goal>setup</goal></goals>
55+ </execution>
56+ </executions>
57+ <configuration>
58+ <packages>
59+ <package>numpy</package>
60+ </packages>
61+ </configuration>
62+ </plugin>
63+ </plugins>
64+ </build>
65+ ```
3066
3167Then use it in your Java code:
3268
@@ -38,7 +74,7 @@ try (PythonEmbed py = PythonEmbed.create()) {
3874}
3975```
4076
41- The Gradle plugin handles Python installation, venv creation, and package installation at build time.
77+ The build plugin handles Python installation, venv creation, and package installation at build time.
4278
4379## Key Features
4480
@@ -58,6 +94,7 @@ The Gradle plugin handles Python installation, venv creation, and package instal
5894## Modules
5995
6096- ** [ python-embed-gradle-plugin] ( python-embed-gradle-plugin/ ) ** — venv creation, package installation, Python auto-download
97+ - ** [ python-embed-maven-plugin] ( python-embed-maven-plugin/ ) ** — Maven equivalent of the Gradle plugin
6198- ** [ python-embed-runtime] ( python-embed-runtime/ ) ** — process communication, pool management, type conversion
6299- ** [ python-embed-spring-boot-starter] ( python-embed-spring-boot-starter/ ) ** — Spring Boot 3.x auto-configuration (SINGLE/POOL modes)
63100- ** [ python-embed-examples] ( python-embed-examples/ ) ** — 13 real-world examples
0 commit comments