Building Loom from Maven

eric at kolotyluk.net eric at kolotyluk.net
Thu Aug 4 14:09:08 UTC 2022


Thanks, Alan, but even with your settings I still get

 

package jdk.incubator.concurrent is not visible

 

from Maven. More completely…

 

[INFO] -------------------------------------------------------------

[ERROR] COMPILATION ERROR :

[INFO] -------------------------------------------------------------

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

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

 

What is strange, is that IntelliJ can build and run the code just fine. Usually, I observe that IntelliJ is less stable than Maven.

 

I guess I will keep slogging through Maven Hell a little longer…

 

Cheers, Eric

 

 

 

From: Alan Bateman <Alan.Bateman at oracle.com> 
Sent: August 3, 2022 11:20 PM
To: eric at kolotyluk.net; loom-dev at openjdk.java.net
Subject: Re: Building Loom from Maven

 

 

On 04/08/2022 01:33, eric at kolotyluk.net <mailto: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/462bbce3/attachment.htm>


More information about the loom-dev mailing list