<div dir="ltr"><div>maven-compiler-plugin version <i><b>3.8.1</b></i> is kind of old.   Maybe try version <i><b>3.10.1 </b></i>?<i><b><br></b></i></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 5 Aug 2022 at 04:02, Lutz Horn <<a href="mailto:code@lhorn.de">code@lhorn.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
Am 04.08.22 um 02:33 schrieb <a href="mailto:eric@kolotyluk.net" target="_blank">eric@kolotyluk.net</a>:<br>
> Has anyone had any success using Structured Concurrency from JDK 19?<br>
<br>
Using 19.ea.33-open from SDKMAN, this makes `mvn compile` work:<br>
<br>
```<br>
<plugin><br>
   <groupId>org.apache.maven.plugins</groupId><br>
   <artifactId>maven-compiler-plugin</artifactId><br>
   <version>3.8.1</version><br>
   <configuration><br>
     <release>19</release><br>
     <compilerArgs><br>
       <arg>--enable-preview</arg><br>
       <arg>--add-modules</arg><br>
       <arg>jdk.incubator.concurrent</arg><br>
     </compilerArgs><br>
   </configuration><br>
</plugin><br>
```<br>
<br>
Note that `--add-modules jdk.incubator.concurrent` ist split on *two* <br>
`arg`s.<br>
<br>
<br>
Strangely, I fail to run `mvn test` using the following configuration of <br>
the `maven-surefire-plugin` which worked with the old Loom preview build <br>
19.ea.5.lm-open.<br>
<br>
```<br>
<configuration><br>
   <argLine>--enable-preview --add-modules <br>
jdk.incubator.concurrent</argLine><br>
</configuration><br>
```<br>
<br>
`mvn test-compile` works but `mvn test` fails like this:<br>
<br>
```<br>
java.lang.NoSuchMethodError: 'void <br>
jdk.incubator.concurrent.StructuredTaskScope$ShutdownOnFailure.join()'<br>
```<br>
<br>
Both `main` and `test` can be compiled but running the tests fails.<br>
<br>
Lutz<br>
</blockquote></div>