Compile Jigsaw project with Intellij IDEA supported structure

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Compile Jigsaw project with Intellij IDEA supported structure

Alexandru Jecan
Hello,

 

In order to make my Jigsaw project be supported by Intellij IDEA 2017.2, I need a structure like this, according to IDEA Video:  https://www.youtube.com/watch?v=WL48zkLvK3I (00:10):

 

com.myModule.m1

                            /src

                                  /module-info.java

                                 /com.myModule.m2

                                                                  /Main.java

 

com.myModule.m2

                            /src

                                  /module-info.java

                                 /com.myModule.m2

                                                                  /Main.java

 

 

How do I perform multi-module compilation in this case using the --module-source-path option?

 

As far as I know, to perform multi-module compilation, the source code directory should have the same name like the name of the module.

In this case, I have the “src” folder there which does not comply to this rule.

 

 

Best regards

 

Alexandru Jecan

Reply | Threaded
Open this post in threaded view
|

Re: Compile Jigsaw project with Intellij IDEA supported structure

Trisha Gee
Hi Alexandru,

The structure in IntelliJ IDEA isn't as strict as that, it doesn't require
you to have a "src" folder.  For example you could have:

com.myModule.m1
    /module-info.java
    /com.myModule.m2
        /Main.java

com.myModule.m2
    /module-info.java
    /com.myModule.m2
        /Main.java

You just need to mark com.myModule.m1 and com.myModule.m2 as your sources
root instead of having a src folder as the sources root.

https://www.jetbrains.com/help/idea/configuring-content-roots.html#d85322e277

Trisha

---------- Forwarded message ---------
Date: Tue, 26 Sep 2017 15:37:18 +0200
From: "Alexandru Jecan" <[hidden email]>
To: <[hidden email]>
Subject: Compile Jigsaw project with Intellij IDEA supported structure
Message-ID: <000e01d336cc$93a52ba0$baef82e0$@yahoo.com>
Content-Type: text/plain;       charset="utf-8"

Hello,



In order to make my Jigsaw project be supported by Intellij IDEA 2017.2, I
need a structure like this, according to IDEA Video:
https://www.youtube.com/watch?v=WL48zkLvK3I (00:10):



com.myModule.m1

                            /src

                                  /module-info.java

                                 /com.myModule.m2

                                                                  /Main.java



com.myModule.m2

                            /src

                                  /module-info.java

                                 /com.myModule.m2

                                                                  /Main.java





How do I perform multi-module compilation in this case using the
--module-source-path option?



As far as I know, to perform multi-module compilation, the source code
directory should have the same name like the name of the module.

In this case, I have the ?src? folder there which does not comply to this
rule.





Best regards



Alexandru Jecan
Reply | Threaded
Open this post in threaded view
|

Re: Compile Jigsaw project with Intellij IDEA supported structure

Remi Forax
And you can use the same trick with Eclipse too that said the Eclipse compiler does not support the multi-module layout (only one module by project).

Rémi


On September 27, 2017 2:09:06 PM GMT+02:00, Trisha Gee <[hidden email]> wrote:

>Hi Alexandru,
>
>The structure in IntelliJ IDEA isn't as strict as that, it doesn't
>require
>you to have a "src" folder.  For example you could have:
>
>com.myModule.m1
>    /module-info.java
>    /com.myModule.m2
>        /Main.java
>
>com.myModule.m2
>    /module-info.java
>    /com.myModule.m2
>        /Main.java
>
>You just need to mark com.myModule.m1 and com.myModule.m2 as your
>sources
>root instead of having a src folder as the sources root.
>
>https://www.jetbrains.com/help/idea/configuring-content-roots.html#d85322e277
>
>Trisha
>
>---------- Forwarded message ---------
>Date: Tue, 26 Sep 2017 15:37:18 +0200
>From: "Alexandru Jecan" <[hidden email]>
>To: <[hidden email]>
>Subject: Compile Jigsaw project with Intellij IDEA supported structure
>Message-ID: <000e01d336cc$93a52ba0$baef82e0$@yahoo.com>
>Content-Type: text/plain;       charset="utf-8"
>
>Hello,
>
>
>
>In order to make my Jigsaw project be supported by Intellij IDEA
>2017.2, I
>need a structure like this, according to IDEA Video:
>https://www.youtube.com/watch?v=WL48zkLvK3I (00:10):
>
>
>
>com.myModule.m1
>
>                            /src
>
>                                  /module-info.java
>
>                                 /com.myModule.m2
>
>                                                             /Main.java
>
>
>
>com.myModule.m2
>
>                            /src
>
>                                  /module-info.java
>
>                                 /com.myModule.m2
>
>                                                             /Main.java
>
>
>
>
>
>How do I perform multi-module compilation in this case using the
>--module-source-path option?
>
>
>
>As far as I know, to perform multi-module compilation, the source code
>directory should have the same name like the name of the module.
>
>In this case, I have the ?src? folder there which does not comply to
>this
>rule.
>
>
>
>
>
>Best regards
>
>
>
>Alexandru Jecan

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.