I have edited this to bring things up-to-date wrt the original posting.
I want to try the new Project Loom feature defined in: JEP 428: Structured Concurrency (Incubator)
I have in my pom.xml
<properties>
<maven.compiler.executable>${env.JAVA_HOME}/bin/javac</maven.compiler.executable>
<maven.compiler.source>19</maven.compiler.source>
<maven.compiler.target>19</maven.compiler.target>
</properties>
. . .
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<configuration>
<compilerArgs>
<arg>--add-modules=jdk.incubator.concurrent</arg>
<arg>--enable-preview</arg>
</compilerArgs>
</configuration>
</plugin>
where JAVA_HOME points to JDK 19, but when I try to build via mvn compile I get
[ERROR] C:\Users\ERIC\Documents\git\loom-lab\laboratory\src\main\java\net\kolotyluk\loom\Structured.java:3:20: error: package jdk.incubator.concurrent is not visible
[ERROR] C:\Users\ERIC\Documents\git\loom-lab\laboratory\src\main\java\net\kolotyluk\loom\Structures.java:3:20: error: package jdk.incubator.concurrent is not visible
. . .
Many people have helped me with this, and clearly they can make it work, but for some reason, I cannot get mvn compile to work.
However, I can get the code to compile and run under IntelliJ. Never before have I been unable to get Maven to compile when I can get IntelliJ to do so. Usually, it is the other way around.