converting from project to module structure.

I used to have six projects, one for each level of the JDK 1.1 .. 1.6.
An employee at IntelliJ suggested combining these into one project
with six modules so that the latest version of the code would be
universally visible.

I have tried this and fooled around for hours, but I can't get even
the most basic things to work.

1. the out directory does not show in IntelliJ, though it does appear
to the file explorer.

2. It says all files are up to date, yet there are no *.class files in
the out directory, or anywhere else.

3. Ctrl-B does not seem to be able to see into other modules.

I tried invalidating caches, rebuild, synch, trying all possible
combinations of options, to no avail.

Here are my iml files:

Here is the one for JDK 1.1 stuff.  It is not supposed to see any
other module



etc. up to 1.6.
--
Roedy Green Canadian Mind Products
http://mindprod.com

Imagine an architect who would never admit to making sketches, blueprints or erecting scaffolds. In his view, the finished building speaks for itself. How could a young architect learn from such a man? Mathematicians traditionally refuse ever to disclose the intuitions that lead them to a conjecture, or the empirical tests to see if it were likely true, or the initial proofs. They are like chefs who refuse to disclose their recipes, ingredients or techniques.

2 comments
Comment actions Permalink

Hello Roedy,

First of all, the "out" directory is intentionally excluded from showing
and indexing by IntelliJ. It contains compiled classes, and there's no use
in seeing them in IntelliJ.

Second, instead of adding the output directory of another module as a library
to your module, you should add a module dependency instead.

Third, you absolutely do not need to add the output directory of a module
to that module itself (as you did in the 'j1' module). You should simply
remove this library.

I used to have six projects, one for each level of the JDK 1.1 .. 1.6.
An employee at IntelliJ suggested combining these into one project
with six modules so that the latest version of the code would be
universally visible.

I have tried this and fooled around for hours, but I can't get even
the most basic things to work.

1. the out directory does not show in IntelliJ, though it does appear
to the file explorer.

2. It says all files are up to date, yet there are no *.class files in
the out directory, or anywhere else.

3. Ctrl-B does not seem to be able to see into other modules.

I tried invalidating caches, rebuild, synch, trying all possible
combinations of options, to no avail.

Here are my iml files:

Here is the one for JDK 1.1 stuff.  It is not supposed to see any
other module

<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_3"
inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/../out/production/j1" />
<output-test url="file://$MODULE_DIR$/../out/test/j1" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false"
/>
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library" exported="">
<library>
<CLASSES>
<root url="file://$MODULE_DIR$/../out/production/j1" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
</component>
</module>
Here is the modules for JDK 1.2 which is supposed to see 1.1 class
files too.

<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_3"
inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/../out/production/j2" />
<output-test url="file://$MODULE_DIR$/../out/test/j2" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false"
/>
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library" exported="">
<library name="l1">
<CLASSES>
<root url="file://$MODULE_DIR$/../out/production/j1" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="file://$MODULE_DIR$/../j1/src" />
</SOURCES>
</library>
</orderEntry>
</component>
</module>
Here is the one for JDK 1.3 which is supposed to see 1.1 and 1.2

<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_3"
inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/../out/production/j3" />
<output-test url="file://$MODULE_DIR$/../out/test/j3" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false"
/>
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library" exported="">
<library name="l12">
<CLASSES>
<root url="file://$MODULE_DIR$/../out/production/j1" />
<root url="file://$MODULE_DIR$/../out/production/j2" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="file://$MODULE_DIR$/../j1/src" />
<root url="file://$MODULE_DIR$/../j2/src" />
</SOURCES>
</library>
</orderEntry>
</component>
</module>
etc. up to 1.6.

Imagine an architect who would never admit to making sketches,
blueprints or erecting scaffolds. In his view, the finished building
speaks for itself. How could a young architect learn from such a man?
Mathematicians traditionally refuse ever to disclose the intuitions
that lead them to a conjecture, or the empirical tests to see if it
were likely true, or the initial proofs. They are like chefs who
refuse to disclose their recipes, ingredients or techniques.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

On Tue, 23 Feb 2010 13:10:26 +0000 (UTC), Dmitry Jemerov
<yole@jetbrains.com> wrote, quoted or indirectly quoted someone who
said :

>
>First of all, the "out" directory is intentionally excluded from showing
>and indexing by IntelliJ. It contains compiled classes, and there's no use
>in seeing them in IntelliJ.
>
>Second, instead of adding the output directory of another module as a library
>to your module, you should add a module dependency instead.
>
>Third, you absolutely do not need to add the output directory of a module
>to that module itself (as you did in the 'j1' module). You should simply
>remove this library.

A thousand thank yous.  I thought those instructions were one of the
many possibilities I had tried, but apparently not, or perhaps I did
and did not get it quite right and missed the success.  All works
perfectly now.

--
Roedy Green Canadian Mind Products
http://mindprod.com

Imagine an architect who would never admit to making sketches, blueprints or erecting scaffolds. In his view, the finished building speaks for itself. How could a young architect learn from such a man? Mathematicians traditionally refuse ever to disclose the intuitions that lead them to a conjecture, or the empirical tests to see if it were likely true, or the initial proofs. They are like chefs who refuse to disclose their recipes, ingredients or techniques.

0

Please sign in to leave a comment.