Building Loom from Maven

eric at kolotyluk.net eric at kolotyluk.net
Thu Aug 4 00:33:25 UTC 2022


Has anyone had any success using Structured Concurrency from JDK 19?

 

I have the following pom.xml

 

<plugin>
    <artifactId>maven-compiler-plugin</artifactId>
    <configuration>
        <compilerArgs>--source 19</compilerArgs>
        <compilerArgs>--enable-preview</compilerArgs>
        <compilerArgs>--add-modules jdk.incubator.concurrent</compilerArgs>
    </configuration>
</plugin>

 

But when I try to compile the project, I get

 

[ERROR]
/C:/Users/ERIC/Documents/git/loom-lab/laboratory/src/main/java/net/kolotyluk
/loom/Structures.java:[3,21] package jdk.incubator.concurrent is not visible

[ERROR]   (package jdk.incubator.concurrent is declared in module
jdk.incubator.concurrent, which is not in the module graph)

 

And I have been trying for over an hour to fix this but cannot find any
solutions that work as they all indicate "--add-modules
jdk.incubator.concurrent" should work.

 

Cheers, Eric

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20220803/93fa98fd/attachment-0001.htm>


More information about the loom-dev mailing list