Global modules
Is there any concept of modules existing independent of projects? I develop apis for the company I work for and the myriad apis seem perfect candidates for modules. However, being apis they are used by multiple projects. Unfortunately, I don't see any way to leverage modules for this purpose without painfully (albeit less so in 977) recreating all the modules for each project.
Please sign in to leave a comment.
Sure, you will be able to import an existing module (.iml file) into any
project.
Eugene
"Kirk Woll" <kirk@digimax.com> wrote in message
news:11338721.1068851228528.JavaMail.itn@is.intellij.net...
develop apis for the company I work for and the myriad apis seem perfect
candidates for modules. However, being apis they are used by multiple
projects. Unfortunately, I don't see any way to leverage modules for this
purpose without painfully (albeit less so in 977) recreating all the modules
for each project.
Is this a one-way street or two? I mean, will changes to the module get reflected in all projects that use the module?
reflected in all projects that use the module?
Of course. The only limitation is that IDEA does not allow to open 2
projects using the same module at the same time.
--
Valentin Kipiatkov
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"
"Kirk Woll" <kirk@digimax.com> wrote in message
news:33218369.1068854739475.JavaMail.itn@is.intellij.net...
reflected in all projects that use the module?
The current project UI does not allow you to add existing modules to the
project. We'll fix this in the next build.
--
Valentin Kipiatkov
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"
"Kirk Woll" <kirk@digimax.com> wrote in message
news:33218369.1068854739475.JavaMail.itn@is.intellij.net...
reflected in all projects that use the module?
....but (for the benefit of the original poster) you CAN do this already by
manually editing the project file. There was another post in this newsgroup
a few weeks ago about how to do it.
Vil.
Valentin Kipiatkov (JetBrains) wrote:
--
Vilya Harvey
vilya.harvey@digitalsteps.com / digital steps /
(W) +44 (0)1483 469 480
(M) +44 (0)7816 678 457 http://www.digitalsteps.com/
What? That seems like a massive limitation. As I said before, I would like to use modules for my apis. ALL of my projects will use the same APIs and I ALWAYS have more than one of them open at the same time. This will not be possible?
Thanks, this is a real limitation right now.
That sounds really strange. Any reusable module will
almost by definition be opened by more than one project
at a time.
Is this an arbitrary limitation or is there a technical
reason?
I personally am not looking for anything too complex here. All I need/want is to be able to define a project/module once, and let other projects/modules depend on it. More an extension to the notion of libraries than actual sub-projects. Sure, if Idea could have all 40 of my projects merge into one project with forty modules, each module in its own source control project, all without blowing out my ram and cpu, that'd be great.
In short: let me define each project once as a 'library', which I can then add as a dependency to other projects without having to create global libraries for each project. Each project should implicitly behave as a global library.
Michael Hoefer wrote:
So you're suggesting that each module you create should go into a list,
along the same lines as the global libraries, from which you can choose to
add them to your current project? I really like that idea. It encourages you
build projects out of reusable components, which is definitely a Good Thing.
There's a couple of things that need to change with modules before they're
really ready for this though:
Modules need to have the option to export their libraries to any other
which depends on them (i.e. if module A depends on module B, then any
libraries which B has marked for export should automatically be added to
module A's classpath).
Adding a module to a project should automatically add any modules that it
depends on, too.
Thinking about it, it may be better to have a setting for each module which
defines whether it's reusable or not. Otherwise the list of modules will
become cluttered with applications and glue-type modules which aren't
reusable. I definitely still like the idea though.
Vil.
--
Vilya Harvey
vilya.harvey@digitalsteps.com / digital steps /
(W) +44 (0)1483 469 480
(M) +44 (0)7816 678 457 http://www.digitalsteps.com/
It sounds like we are all coming to same (approximately) conclusion.
See this message thread:
http://www.intellij.net/forums/thread.jsp?forum=22&thread=54451&tstart=0&trange=15
Tim wrote:
Yes, I too agree with this post. Especially the aspect of merging
modules and allowing them to export jars, resources, etc. Without that
export capability from a module, we will contuinue to use just one large
module/project (ie, not use any of the new module features).
I agree this is a severe limitation.
I may have multiple client projects open at the same time.
The latests build were reloading a project automatically when its ipr/iml/iws files were changed.
Can't you do that?
Jacques