Building Loom from Maven

Alan Bateman Alan.Bateman at oracle.com
Thu Aug 4 06:19:43 UTC 2022



On 04/08/2022 01:33, eric at kolotyluk.net wrote:
>
> 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.
>
>
This works for me:

           <compilerArgs>
<arg>--add-modules=jdk.incubator.concurrent</arg>
             <arg>--enable-preview</arg>
           </compilerArgs>

-Alan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20220804/2be9842b/attachment.htm>


More information about the loom-dev mailing list