Directory based project and module library

Is there a bug in 9.0.3 when dealing with a Module Library and when using a directory-based project format?

I have a Module Library configured with the contents of the lib/ directory as a jar directory. IntelliJ does not see the classes in these jars and I have no idea why.

This is the first time I have ever tried a directory based project previously I have always been perfectly happy with the .ipr, .iml, and .iws files. Figured I would give the new directory based format a go.

I have always configured my module library to have the contents of the lib directory in the classpath and it works fine with the file-based project format. The only difference is I started a new project with the directory based format and it won't see the jars. If I add each jar individually it will see them. However, having everything in directory being on the classpath is much more convenient.

Here is a project with a file-based format, and as you can see it sees these as jars on the classpath (puts the arrow beside it so you can see the contents):

Screen shot 2010-09-16 at 4.55.24 PM.png

Here is a different project that uses the directory-based format

Screen shot 2010-09-16 at 4.56.20 PM.png

It claims it is the "(library home)" but it does not offer me the chance to see the contents and can't see any of the classes in the jars when coding.

Both projects have the lib directory configured as the jar directory for a Module Library.

Any insight? Bug?

2 comments

Hi.

Just created a simple directory based project with the single module and a jar directory as a module library. For me it works, see no bug. My project structure is:
. project-dir/.idea
. project-dir/single-module.iml
. project-dir/lib/(several jars) // lib directory
. project-dir/src

In general, .ipr/.idea base should not affect this case. Does your new project have some more specific - in structure, dependencies, etc?

One more possibility: does "Invalidate Caches" help?

Regards,
Alexander.

0

It is working now. Of course the problem is I broke the cardinal rule of troubleshooting and did a few things at once so I am unsure what fixed it.

I think it was invalidating the caches (thanks for reminding about trying that) and then recreating the library that did the trick.

0

Please sign in to leave a comment.