Setting up modules

So I have a project, now I want to set up another project as a subproject.

I've added the module, but the main project is now giving errors. because it can't see anything in the sub project.

I thought that by adding the module, then the libraries that were included in the module, would be visible to the main project. Is that not the case?

12 comments

No, it's not the case. Libraries are properties of the module they attached to. The module may also use classes from modules it
depends on. If you want the module to use some library, you should explicitly add attach this library to the module.

--

Best regards,
Eugene Zhuravlev
JetBrains, Inc, http://www.intellij.com
"Develop with pleasure!"

"Rayz" <no_mail@jetbrains.com> wrote in message news:5375238.1070093589230.JavaMail.javamailuser@localhost...

So I have a project, now I want to set up another project as a subproject.

>

I've added the module, but the main project is now giving errors. because it can't see anything in the sub project.

>

I thought that by adding the module, then the libraries that were included in the module, would be visible to the main project. Is

that not the case?
>


0

Mmm ...

OK. Let's see if I can get this.

I create a project.

I have a GUI bit, and a database bit. So I create two modules. One for the GUI and one for the database.

How should I go about creating a setup so that I can work on both in the same in the same project (and compile them).

0

Riighhhttt ....

Okay. I think I understand it a bit better now.

I may have been expecting a little too much from the project/module thing.

I was thinking that it was also a way to help with classpaths; it just does dependencies.

0

Are we going to be able to open and close modules?

0

On 11/30/03 7:00 AM, in article
12669526.1070164834659.JavaMail.javamailuser@localhost, "Andre Mermegas"
<no_mail@jetbrains.com> wrote:

Are we going to be able to open and close modules?


What do you mean? What functionality would you expect here?

--
Maxim Shafirov
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"


0

You should take a look at Eclipse for a working example of how closing modules might work.

Eclipse "projects" == IDEA "modules" (mostly)

I know I've been bugging the IDEA developers a lot on this issue but IDEA should get rid of project and global level libraries and just use moduldes. The only thing missing is the ability to export (make available) libraries from a module to other modules.

It would be much cleaner this way.

0

I want to caution against any implementation that is best described as "exporting" modules. That implies that once a module is exported (and therefore imported in one or more other projects) that any changes to the module after the export will not be reflected in any of the other projects that had imported the module. This would obviously have the very negative side effect of the same module (from the users -- our -- point of view) behaving differently in different projects.

0

I meant to say that modules should be able to make their libraries available to other modules (ie. "export") just as they do their *.class files. Doing this removes the need for project-level libraries (and probably global-level libraries. This is what Eclipse does and it works great.

0

Yes, I agree. I asked about this a little while back. I think it would make more sense then the current approach.

0


Tim wrote:

You should take a look at Eclipse for a working example of how closing modules might work.

Eclipse "projects" == IDEA "modules" (mostly)

I know I've been bugging the IDEA developers a lot on this issue but IDEA should get rid of project and global level libraries and just use moduldes. The only thing missing is the ability to export (make available) libraries from a module to other modules.

It would be much cleaner this way.


I have been playing with eclipse the last week or so, and I must agree.
Their concept of projects and workspace is very very nice. I was able to
fire up eclipse and create a hierarchical set of projects that mirror
our ant build in short order. (This was especially easy because each
eclipse projects allows for setting what jars -- and classes for that
matter -- should be exported).

I tried this with 977 and found myself groaning in frustration. In the
end I gave up and stayed with our one huge project for all code in our
multi-server/multi-client system. Leaving any concept of modules and
dependencies to the ant scripts.

I find eclipse very similar to VC++, which also excellent hierachical
project support.

0

Please sign in to leave a comment.