|
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 |
| - Since Polyglot version 24.1, native isolate versions of languages for specific platforms are supported. |
| 47 | + Starting from GraalVM Polyglot API version 24.1.0, native isolate versions of languages for specific platforms are supported. |
48 | 48 | Refer to the `isolate` profiles for instructions on how to activate them.
|
49 | 49 |
|
50 | 50 | Any dependency in the org.graalvm.polyglot group is intended for use by polyglot embeddings.
|
|
108 | 108 | <configuration>
|
109 | 109 | <executable>${java.home}/bin/java</executable>
|
110 | 110 | <arguments>
|
111 |
| - <!-- We recommend running from the module-path by default. |
112 |
| - 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 | + --> |
113 | 115 | <argument>--module-path</argument>
|
114 | 116 | <modulepath/>
|
115 | 117 | <argument>-m</argument>
|
|
121 | 123 | <configuration>
|
122 | 124 | <executable>${java.home}/bin/java</executable>
|
123 | 125 | <arguments>
|
124 |
| - <!-- We recommend running from the module-path by default. |
125 |
| - 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 | + --> |
126 | 130 | <argument>--module-path</argument>
|
127 | 131 | <modulepath/>
|
128 | 132 | <argument>-m</argument>
|
|
225 | 229 | <executions>
|
226 | 230 | <!--
|
227 | 231 | Copies compiler dependencies to the target/compiler folder. In order to run with an
|
228 |
| - 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. |
229 | 233 | -->
|
230 | 234 | <execution>
|
231 | 235 | <id>copy-dependencies</id>
|
|
411 | 415 | -->
|
412 | 416 | <!-- Linux AMD64 -->
|
413 | 417 | <profile>
|
414 |
| - <id>isolate-linux-amd64</id> |
| 418 | + <id>isolated-linux-amd64</id> |
415 | 419 | <activation>
|
416 | 420 | <os>
|
417 | 421 | <family>unix</family>
|
|
420 | 424 | </os>
|
421 | 425 | </activation>
|
422 | 426 | <properties>
|
423 |
| - <isolate.platform>linux-amd64</isolate.platform> |
| 427 | + <isolate.platform.suffix>-linux-amd64</isolate.platform.suffix> |
424 | 428 | </properties>
|
425 | 429 | </profile>
|
426 | 430 | <!-- Linux AARCH64 -->
|
427 | 431 | <profile>
|
428 |
| - <id>isolate-linux-aarch64</id> |
| 432 | + <id>isolated-linux-aarch64</id> |
429 | 433 | <activation>
|
430 | 434 | <os>
|
431 | 435 | <family>unix</family>
|
|
434 | 438 | </os>
|
435 | 439 | </activation>
|
436 | 440 | <properties>
|
437 |
| - <isolate.platform>linux-aarch64</isolate.platform> |
| 441 | + <isolate.platform.suffix>-linux-aarch64</isolate.platform.suffix> |
438 | 442 | </properties>
|
439 | 443 | </profile>
|
440 | 444 | <!-- macOS AMD64 -->
|
441 | 445 | <profile>
|
442 |
| - <id>isolate-darwin-amd64</id> |
| 446 | + <id>isolated-darwin-amd64</id> |
443 | 447 | <activation>
|
444 | 448 | <os>
|
445 | 449 | <family>mac</family>
|
446 | 450 | <arch>x86_64</arch>
|
447 | 451 | </os>
|
448 | 452 | </activation>
|
449 | 453 | <properties>
|
450 |
| - <isolate.platform>darwin-amd64</isolate.platform> |
| 454 | + <isolate.platform.suffix>-darwin-amd64</isolate.platform.suffix> |
451 | 455 | </properties>
|
452 | 456 | </profile>
|
453 | 457 | <!-- macOS AARCH64 -->
|
454 | 458 | <profile>
|
455 |
| - <id>isolate-darwin-aarch64</id> |
| 459 | + <id>isolated-darwin-aarch64</id> |
456 | 460 | <activation>
|
457 | 461 | <os>
|
458 | 462 | <family>mac</family>
|
459 | 463 | <arch>aarch64</arch>
|
460 | 464 | </os>
|
461 | 465 | </activation>
|
462 | 466 | <properties>
|
463 |
| - <isolate.platform>darwin-aarch64</isolate.platform> |
| 467 | + <isolate.platform.suffix>-darwin-aarch64</isolate.platform.suffix> |
464 | 468 | </properties>
|
465 | 469 | </profile>
|
466 | 470 | <!-- Windows AMD64 -->
|
467 | 471 | <profile>
|
468 |
| - <id>isolate-windows-amd64</id> |
| 472 | + <id>isolated-windows-amd64</id> |
469 | 473 | <activation>
|
470 | 474 | <os>
|
471 | 475 | <family>windows</family>
|
472 | 476 | <arch>x86_64</arch>
|
473 | 477 | </os>
|
474 | 478 | </activation>
|
475 | 479 | <properties>
|
476 |
| - <isolate.platform>windows-amd64</isolate.platform> |
| 480 | + <isolate.platform.suffix>-windows-amd64</isolate.platform.suffix> |
477 | 481 | </properties>
|
478 | 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 | + --> |
479 | 502 | <profile>
|
480 | 503 | <id>isolated</id>
|
| 504 | + <properties> |
| 505 | + <isolated.language.id>js</isolated.language.id> |
| 506 | + </properties> |
481 | 507 | <dependencies>
|
482 | 508 | <dependency>
|
483 | 509 | <groupId>org.graalvm.polyglot</groupId>
|
484 |
| - <artifactId>js-isolate-${isolate.platform}</artifactId> |
| 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> |
485 | 521 | <version>${graalvm.version}</version>
|
486 | 522 | <type>pom</type>
|
| 523 | + <scope>provided</scope> |
487 | 524 | </dependency>
|
488 | 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> |
489 | 590 | </profile>
|
490 | 591 | </profiles>
|
491 |
| - |
492 | 592 | </project>
|
0 commit comments