too many modules considered harmful...

I have been trying to setup my idea 4.5 module structure to mirror our
ant module structure, which contains about 70 modules. (In idea 4.0, we
used only a few modules so did not get the full benefit of dependency
checking.)

However, when attempting to compile I get the error below during the
compilation of a higly dependent module (it depends on most other
modules). I have submitted
http://www.intellij.net/tracker/idea/viewSCR?publicId=37232 about two
weeks ago, but have gotten no response from jetbrains. I have since
built the exact same module (well project) setup in eclipse and it all
works and compiles great.

Has anybody else encountered this problem?

Does anybody else have over 70 modules defined?

Does the fact that idea spawns off the compiler in a seperate process
limit the number of modules, maybe becuase of command-line lenght limits?


-



Information: 1 error
Information: 0 warnings
Error: Process not started:
CreateProcess: C:\j2sdk1.4.2_04\bin\javaw.exe -Xmx1024m
-classpath
C:\j2sdk1.4.2_04\lib\tools.jar;C:\IntelliJ-IDEA-4.5\lib\idea_rt.jar
com.intellij.rt.compiler.JavacRunner "java version "1.4.2_04""
com.sun.tools.javac.Main -source 1.3 -verbose -classpath
C:\cvs.local\its.dev\deployment\appserver\dev\conf\properties;C:\cvs.local\its.dev\system.test\resources;C:\cvs.local\its.dev\trading\resource\mappings;C:\cvs.local\its.dev\trading\test\ft\test\ftestdata;C:\cvs.local\its.dev\deployment\common\conf\properties;C:\cvs.local\its.dev\deployment\common\conf\log4j;C:\j2sdk1.4.2_04\jre\lib\charsets.jar;C:\j2sdk1.4.2_04\jre\lib\jce.jar;C:\j2sdk1.4.2_04\jre\lib\jsse.jar;C:\j2sdk1.4.2_04\jre\lib\plugin.jar;C:\j2sdk1.4.2_04\jre\lib\rt.jar;C:\j2sdk1.4.2_04\jre\lib\sunrsasign.jar;C:\j2sdk1.4.2_04\jre\lib\ext\dnsns.jar;C:\j2sdk1.4.2_04\jre\lib\ext\ldapsec.jar;C:\j2sdk1.4.2_04\jre\lib\ext\localedata.jar;C:\j2sdk1.4.2_04\jre\lib\ext\sunjce_provider.jar;C:\cvs.local\its.dev\.build\idea45\infra.remotecache;C:\cvs.local\its.dev\?
Information: Compilation completed with 1 errors and 0 warnings


--
Barry Kaplan
bkaplan@integratedtrading.com

8 comments
Comment actions Permalink

Hmm, we have "only" 41 modules (simple Java modules, no web-app) and
have no problems. Very strange.

Tom

0
Comment actions Permalink

Well, I just combined a bunch of infrastructure and lower-level modules
into one module. Now we have only 36 modules and the compile completes.
But I still have a few more to create.

So watch out Thomas, you are heading for the wall ;)


Thomas Singer (MoTJ) wrote:

Hmm, we have "only" 41 modules (simple Java modules, no web-app) and
have no problems. Very strange.

Tom


--
Barry Kaplan
bkaplan@integratedtrading.com

0
Comment actions Permalink

Well, I just combined a bunch of infrastructure and
lower-level modules
into one module. Now we have only 36 modules and the
compile completes.


Hmm. How do people use modules? Do folks treat a module as a seprate deliverble, yet dependent on something else? (sort of like a shared library), or is it more like a package in java, and modules are used to enforce package dependencies?

Mike

0
Comment actions Permalink

I use them in much the same way as an eclipse plugin - an independently
deployable component.


Michael Kirby wrote:

>>Well, I just combined a bunch of infrastructure and
>>lower-level modules
>>into one module. Now we have only 36 modules and the
>>compile completes.


Hmm. How do people use modules? Do folks treat a module as a seprate deliverble, yet dependent on something else? (sort of like a shared library), or is it more like a package in java, and modules are used to enforce package dependencies?

Mike


--
Barry Kaplan
bkaplan@integratedtrading.com

0
Comment actions Permalink

... or is it more like a package in java, and modules are used to enforce package dependencies?


That's our reason for using modules. Better structuring the project and
keep the right dependencies.

Tom

0
Comment actions Permalink

In article <21443236.1093362387859.JavaMail.itn@is.intellij.net>,
Michael Kirby <kirby@ess.mc.xerox.com> wrote:

Well, I just combined a bunch of infrastructure and
lower-level modules
into one module. Now we have only 36 modules and the
compile completes.


Hmm. How do people use modules? Do folks treat a module as a seprate
deliverble, yet dependent on something else? (sort of like a shared
library), or is it more like a package in java, and modules are used to
enforce package dependencies?


We define modules along functional understanding.

For example, the metagraph_utility_debug module compiles
metagraph_utility_debug.jar, and you should not open it for modification
unless you understand java.util.logging and log4j.

On the other hand, metagraph_persist and metagraph_persist_jdbc were
split that way so our jdbc coders would have an interface to write to,
but would not be able to modify the core interface that
metagraph_persist_xml was working in.

Most modules contain 2-3 packages, and all compile to seperate jars.
Having lived with the structure for three years, I would probably
combine about half a dozen jars, but even so, that would drop the count
of projects for our archive from about a hundred to something in the
nineties.

Scott

0
Comment actions Permalink

Scott Ellsworth wrote:

In article <21443236.1093362387859.JavaMail.itn@is.intellij.net>,
Michael Kirby <kirby@ess.mc.xerox.com> wrote:

>>>Well, I just combined a bunch of infrastructure and
>>>lower-level modules
>>>into one module. Now we have only 36 modules and the
>>>compile completes.
>>
>>Hmm. How do people use modules? Do folks treat a module as a seprate
>>deliverble, yet dependent on something else? (sort of like a shared
>>library), or is it more like a package in java, and modules are used to
>>enforce package dependencies?


We define modules along functional understanding.

For example, the metagraph_utility_debug module compiles
metagraph_utility_debug.jar, and you should not open it for modification
unless you understand java.util.logging and log4j.

On the other hand, metagraph_persist and metagraph_persist_jdbc were
split that way so our jdbc coders would have an interface to write to,
but would not be able to modify the core interface that
metagraph_persist_xml was working in.

Most modules contain 2-3 packages, and all compile to seperate jars.
Having lived with the structure for three years, I would probably
combine about half a dozen jars, but even so, that would drop the count
of projects for our archive from about a hundred to something in the
nineties.

Scott


IMO, this functional usage makes the most sense for Java modules, and
modules by deployable unit for GUI/J2EE/Web Applications.

For modules by functional usage, wouldn't groups that do not have write
privileges to a given module include the module as a project library by
referencing a pre-built jar file? They wouldn't actually have all of
the modules fully defined within IDEA would they? If they did, they
would have to build those modules as well as their own whenever the
source for another module was changed. Wouldn't it make more sense for
each group to only build the modules that they are modifying and treat
the rest as libraries that are retrieved, pre-built, from your vcs?

Tim

0
Comment actions Permalink

Barry Kaplan wrote:

I have been trying to setup my idea 4.5 module structure to mirror our
ant module structure, which contains about 70 modules. (In idea 4.0, we
used only a few modules so did not get the full benefit of dependency
checking.)

However, when attempting to compile I get the error below during the
compilation of a higly dependent module (it depends on most other
modules). I have submitted
http://www.intellij.net/tracker/idea/viewSCR?publicId=37232 about two
weeks ago, but have gotten no response from jetbrains. I have since
built the exact same module (well project) setup in eclipse and it all
works and compiles great.

Has anybody else encountered this problem?

Does anybody else have over 70 modules defined?

Does the fact that idea spawns off the compiler in a seperate process
limit the number of modules, maybe becuase of command-line lenght limits?


----

Information: 1 error
Information: 0 warnings
Error: Process not started:
CreateProcess: C:\j2sdk1.4.2_04\bin\javaw.exe -Xmx1024m
-classpath
C:\j2sdk1.4.2_04\lib\tools.jar;C:\IntelliJ-IDEA-4.5\lib\idea_rt.jar
com.intellij.rt.compiler.JavacRunner "java version "1.4.2_04""
com.sun.tools.javac.Main -source 1.3 -verbose -classpath
C:\cvs.local\its.dev\deployment\appserver\dev\conf\properties;C:\cvs.local\its.dev\system.test\resources;C:\cvs.local\its.dev\trading\resource\mappings;C:\cvs.local\its.dev\trading\test\ft\test\ftestdata;C:\cvs.local\its.dev\deployment\common\conf\properties;C:\cvs.local\its.dev\deployment\common\conf\log4j;C:\j2sdk1.4.2_04\jre\lib\charsets.jar;C:\j2sdk1.4.2_04\jre\lib\jce.jar;C:\j2sdk1.4.2_04\jre\lib\jsse.jar;C:\j2sdk1.4.2_04\jre\lib\plugin.jar;C:\j2sdk1.4.2_04\jre\lib\rt.jar;C:\j2sdk1.4.2_04\jre\lib\sunrsasign.jar;C:\j2sdk1.4.2_04\jre\lib\ext\dnsns.jar;C:\j2sdk1.4.2_04\jre\lib\ext\ldapsec.jar;C:\j2sdk1.4.2_04\jre\lib\ext\localedata.jar;C:\j2sdk1.4.2_04\jre\lib\ext\sunjce_provider.jar;C:\cvs.local\its.dev\.build\idea45\infra.remotecache;C:\cvs.local\its.dev\?

Information: Compilation completed with 1 errors and 0 warnings


Looks like command line for javaw is a way too long (from the OS point
view). The easiest solution I see is to have a shorter alias for
c:\cvs.local\its.dev

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

0

Please sign in to leave a comment.