|
44 | 44 |
|
45 | 45 | Switch to community licenses by adding a `-community` suffix to the artefact id (e.g. `js-communtiy`).
|
46 | 46 | Switch to native isolate versions of languages by adding a `-isolate` suffix. (`js-isolate`).
|
| 47 | + Starting from GraalVM Polyglot API version 24.1.0, native isolate versions of languages for specific platforms are supported. |
| 48 | + Refer to the `isolate` profiles for instructions on how to activate them. |
47 | 49 |
|
48 | 50 | Any dependency in the org.graalvm.polyglot group is intended for use by polyglot embeddings.
|
49 | 51 | -->
|
|
106 | 108 | <configuration>
|
107 | 109 | <executable>${java.home}/bin/java</executable>
|
108 | 110 | <arguments>
|
109 |
| - <!-- We recommend running from the module-path by default. |
110 |
| - But you can also switch to the class-path here.--> |
| 111 | + <!-- |
| 112 | + We recommend running from the module path by default. |
| 113 | + You can also switch to the classpath here. |
| 114 | + --> |
111 | 115 | <argument>--module-path</argument>
|
112 | 116 | <modulepath/>
|
113 | 117 | <argument>-m</argument>
|
|
119 | 123 | <configuration>
|
120 | 124 | <executable>${java.home}/bin/java</executable>
|
121 | 125 | <arguments>
|
122 |
| - <!-- We recommend running from the module-path by default. |
123 |
| - But you can also switch to the class-path here.--> |
| 126 | + <!-- |
| 127 | + We recommend running from the module path by default. |
| 128 | + You can also switch to the classpath here. |
| 129 | + --> |
124 | 130 | <argument>--module-path</argument>
|
125 | 131 | <modulepath/>
|
126 | 132 | <argument>-m</argument>
|
|
223 | 229 | <executions>
|
224 | 230 | <!--
|
225 | 231 | Copies compiler dependencies to the target/compiler folder. In order to run with an
|
226 |
| - optimizing runtime on other JDKs than GraalVM we need to put the compiler on the upgrade-module-path. |
| 232 | + optimizing runtime on other JDKs than GraalVM we need to put the compiler on the upgrade module path. |
227 | 233 | -->
|
228 | 234 | <execution>
|
229 | 235 | <id>copy-dependencies</id>
|
|
401 | 407 | </plugins>
|
402 | 408 | </build>
|
403 | 409 | </profile>
|
| 410 | + <!-- |
| 411 | + Profiles for using a native isolate language version for a specific platform. |
| 412 | + Native isolate versions of languages for a specific platforms are supported since |
| 413 | + Polyglot version 24.1 for JavaScript (js) and Python (python). |
| 414 | + These profiles may be removed if you are not using native isolate versions of languages. |
| 415 | + --> |
| 416 | + <!-- Linux AMD64 --> |
| 417 | + <profile> |
| 418 | + <id>isolated-linux-amd64</id> |
| 419 | + <activation> |
| 420 | + <os> |
| 421 | + <family>unix</family> |
| 422 | + <name>linux</name> |
| 423 | + <arch>amd64</arch> |
| 424 | + </os> |
| 425 | + </activation> |
| 426 | + <properties> |
| 427 | + <isolate.platform.suffix>-linux-amd64</isolate.platform.suffix> |
| 428 | + </properties> |
| 429 | + </profile> |
| 430 | + <!-- Linux AARCH64 --> |
| 431 | + <profile> |
| 432 | + <id>isolated-linux-aarch64</id> |
| 433 | + <activation> |
| 434 | + <os> |
| 435 | + <family>unix</family> |
| 436 | + <name>linux</name> |
| 437 | + <arch>aarch64</arch> |
| 438 | + </os> |
| 439 | + </activation> |
| 440 | + <properties> |
| 441 | + <isolate.platform.suffix>-linux-aarch64</isolate.platform.suffix> |
| 442 | + </properties> |
| 443 | + </profile> |
| 444 | + <!-- macOS AMD64 --> |
| 445 | + <profile> |
| 446 | + <id>isolated-darwin-amd64</id> |
| 447 | + <activation> |
| 448 | + <os> |
| 449 | + <family>mac</family> |
| 450 | + <arch>x86_64</arch> |
| 451 | + </os> |
| 452 | + </activation> |
| 453 | + <properties> |
| 454 | + <isolate.platform.suffix>-darwin-amd64</isolate.platform.suffix> |
| 455 | + </properties> |
| 456 | + </profile> |
| 457 | + <!-- macOS AARCH64 --> |
| 458 | + <profile> |
| 459 | + <id>isolated-darwin-aarch64</id> |
| 460 | + <activation> |
| 461 | + <os> |
| 462 | + <family>mac</family> |
| 463 | + <arch>aarch64</arch> |
| 464 | + </os> |
| 465 | + </activation> |
| 466 | + <properties> |
| 467 | + <isolate.platform.suffix>-darwin-aarch64</isolate.platform.suffix> |
| 468 | + </properties> |
| 469 | + </profile> |
| 470 | + <!-- Windows AMD64 --> |
| 471 | + <profile> |
| 472 | + <id>isolated-windows-amd64</id> |
| 473 | + <activation> |
| 474 | + <os> |
| 475 | + <family>windows</family> |
| 476 | + <arch>x86_64</arch> |
| 477 | + </os> |
| 478 | + </activation> |
| 479 | + <properties> |
| 480 | + <isolate.platform.suffix>-windows-amd64</isolate.platform.suffix> |
| 481 | + </properties> |
| 482 | + </profile> |
| 483 | + <!-- |
| 484 | + Profile to package polyglot isolate libraries for all supported platforms. |
| 485 | + The profile is activated using `mvn -Pisolated -Disolated.all.platforms` |
| 486 | + --> |
| 487 | + <profile> |
| 488 | + <id>isolated-all-platforms</id> |
| 489 | + <activation> |
| 490 | + <property> |
| 491 | + <name>isolated.all.platforms</name> |
| 492 | + </property> |
| 493 | + </activation> |
| 494 | + <properties> |
| 495 | + <isolate.platform.suffix></isolate.platform.suffix> |
| 496 | + </properties> |
| 497 | + </profile> |
| 498 | + <!-- |
| 499 | + Profile for using isolated version of a guest language. |
| 500 | + The profile is activated by `mvn -Pisolated`. |
| 501 | + --> |
| 502 | + <profile> |
| 503 | + <id>isolated</id> |
| 504 | + <properties> |
| 505 | + <isolated.language.id>js</isolated.language.id> |
| 506 | + </properties> |
| 507 | + <dependencies> |
| 508 | + <dependency> |
| 509 | + <groupId>org.graalvm.polyglot</groupId> |
| 510 | + <artifactId>js-isolate${isolate.platform.suffix}</artifactId> |
| 511 | + <version>${graalvm.version}</version> |
| 512 | + <type>pom</type> |
| 513 | + </dependency> |
| 514 | + <!-- |
| 515 | + Including the non-isolated language as a provided dependency ensures that the non-isolated language |
| 516 | + included in the project dependencies is excluded from the Java module path. |
| 517 | + --> |
| 518 | + <dependency> |
| 519 | + <groupId>org.graalvm.polyglot</groupId> |
| 520 | + <artifactId>js</artifactId> |
| 521 | + <version>${graalvm.version}</version> |
| 522 | + <type>pom</type> |
| 523 | + <scope>provided</scope> |
| 524 | + </dependency> |
| 525 | + </dependencies> |
| 526 | + <build> |
| 527 | + <plugins> |
| 528 | + <plugin> |
| 529 | + <groupId>org.apache.maven.plugins</groupId> |
| 530 | + <artifactId>maven-surefire-plugin</artifactId> |
| 531 | + <version>3.1.2</version> |
| 532 | + <configuration> |
| 533 | + <systemPropertyVariables> |
| 534 | + <!-- |
| 535 | + The Maven Surefire plugin sets the `polyglot.engine.SpawnIsolate=<language>` |
| 536 | + system property to utilize the isolated version of the language during unit tests. |
| 537 | + --> |
| 538 | + <polyglot.engine.SpawnIsolate>${isolated.language.id}</polyglot.engine.SpawnIsolate> |
| 539 | + </systemPropertyVariables> |
| 540 | + </configuration> |
| 541 | + </plugin> |
| 542 | + <plugin> |
| 543 | + <groupId>org.codehaus.mojo</groupId> |
| 544 | + <artifactId>exec-maven-plugin</artifactId> |
| 545 | + <version>3.1.0</version> |
| 546 | + <executions> |
| 547 | + <execution> |
| 548 | + <goals> |
| 549 | + <goal>exec</goal> |
| 550 | + </goals> |
| 551 | + </execution> |
| 552 | + <execution> |
| 553 | + <id>no-runtime-compilation</id> |
| 554 | + <goals> |
| 555 | + <goal>exec</goal> |
| 556 | + </goals> |
| 557 | + <configuration> |
| 558 | + <executable>${java.home}/bin/java</executable> |
| 559 | + <arguments> |
| 560 | + <argument>-Dpolyglot.engine.SpawnIsolate=${isolated.language.id}</argument> |
| 561 | + <!-- |
| 562 | + We recommend running from the module path by default. |
| 563 | + You can also switch to the classpath here. |
| 564 | + --> |
| 565 | + <argument>--module-path</argument> |
| 566 | + <modulepath/> |
| 567 | + <argument>-m</argument> |
| 568 | + <argument>embedding/org.example.embedding.Main</argument> |
| 569 | + </arguments> |
| 570 | + </configuration> |
| 571 | + </execution> |
| 572 | + </executions> |
| 573 | + <configuration> |
| 574 | + <executable>${java.home}/bin/java</executable> |
| 575 | + <arguments> |
| 576 | + <argument>-Dpolyglot.engine.SpawnIsolate=${isolated.language.id}</argument> |
| 577 | + <!-- |
| 578 | + We recommend running from the module path by default. |
| 579 | + You can also switch to the classpath here. |
| 580 | + --> |
| 581 | + <argument>--module-path</argument> |
| 582 | + <modulepath/> |
| 583 | + <argument>-m</argument> |
| 584 | + <argument>embedding/org.example.embedding.Main</argument> |
| 585 | + </arguments> |
| 586 | + </configuration> |
| 587 | + </plugin> |
| 588 | + </plugins> |
| 589 | + </build> |
| 590 | + </profile> |
404 | 591 | </profiles>
|
405 |
| - |
406 | 592 | </project>
|
407 |
| - |
408 |
| - |
|
0 commit comments