Need some help in setting up a project... Follow
I have been using IDEA for quite some time but running into some issues while trying to setup the latest project. The source dir structure is quite different than what I am used to. This is what source dir structure looks like:
c:/mycompany/module1/src/com/mycompany/...
c:/mycompany/module2/src/com/mycompany/...
c:/mycompany/module3/src/com/mycompany/...
The builds are done using ANT and go into dir structure:
c:/mycompany/module1/build/com/mycompany/...
This makes it almost impossible to use the editor. What am I doing wrong?
c:/mycompany/module2/build/com/mycompany/...
c:/mycompany/module3/build/com/mycompany/...
I added module1, module2, module3 as 3 contents. I also added
c:/mycompany/module#/build/ to the libraries and associated c:/mycompany/module#/src/ as source with it. But my editor is not recognizing the import statements.
It gives me the error com.mycompany is not found.
Any help?
Please sign in to leave a comment.
First, if you want several output paths, you should configure several modules (an output path can be configured per-module).
Also, you should add C:/mycompany/module#/build/ to the module's output path, not libraries (even if you compile with Ant).
So the structure for each module should be:
content: c:/mycompany/module#/
output: c:/mycompany/module#/build
The c:/mycompany/module#/src should be marked as "Source" (not attached as source to a library) - this is the reason why you get
"not found" errors.
Note: the output path should not be added as a library, it is redundant.
--
Best regards,
Eugene Zhuravlev
JetBrains, Inc, http://www.intellij.com
"Develop with pleasure!"
"Vinay Moharil" <vmohar98@yahoo.com> wrote in message news:19907500.1067632454290.JavaMail.javamailuser@localhost...
structure is quite different than what I am used to. This is what source dir structure looks like:
>
>
>
>
recognizing the import statements.
>
>
Hi Eugene,
I am not sure I understood. When I open the project properties, all I can see is main module. So, I am wondering how do I configure multiple modules? Is configuring a module same as adding Content?
Even if I add more than one content and mark ths source folder for each content, I can just specify one output path and all the classes are going there (as expected). I cannot specify output path per content.
So I am not sure I understood hoe to "configure multiple modules" so as to have "multiple class paths"
thanks
You don't need 1 module with three contents. You need 3 modules with 1 content each. The way to do this is under "Tools/Edit Modules..." not the "Project Settings/Main Module" (where you can only deal with a single module). The UI is in flux, but it's actually fairly easy to set things up as you indicate, as your directory structure fits the optimal module structure pretty well.