Any chance of having jars depend on source code?

Let me explain a little:
Since a couple of weeks I am working as a freelancer in a big (BIG) company -
all in all many thousands of developers.
Development process is rigid, actual coding and project standards very simple,
but followed through consistently.
There's not a chance in the world I or anybody else can get technical improvements
accepted in the short or event mid-term.
For example Visual Source Safe is mandated, but a committe has been formed
that will evaluate other solutions, and probably a change to the company standard
will occur in 2008 or maybe 2009.

So. My current sub-division is frequently doing projects in CRM area.
They have their code subdivided into "modules" that are reused with slight
adaptions and enhancements in each project.

When I tried using Idea in stealth mode, in the hope that I can maybe soften
the policy of using Eclipse at least on an unofficial, project group level, I had
serious problems setting up the project and working on it.

First VSS integration is sub-par to the CVS and SVN counterparts in Idea
(I filed issues for most problems).

But much more importantly the way those moduls are enhanced makes all
sources in Idea turn bright red:
Every module is included into the project as a jar file.
Whenever a change is needed that cannot be implemented by subclassing,
a single source file from that module is included into the project, removed
from the jar and changed accordingly.
You see? You end up having this jar and probably other jars depend on this
changed source - which is not supported in Idea at all.

I elaborated this much, because I'll be the first to agree that this shouldn't be
done and Idea is right to complain about it.
However that will get you nowhere in actually selling Idea.

The main focus of 6.0 was enterprise development, right? As part of that I think
you unfortunately have to give up a little Idea's insistence on the best way of
doing things.

Comment actions Permalink

Hello Stephen,

SF> Let me explain a little:
SF> But much more importantly the way those moduls are enhanced makes
SF> all sources in Idea turn bright red:
SF> Every module is included into the project as a jar file.

Have you tried the 6.0.2 EAP build 6083? If I understand correctly, it supports
such dependencies.

Dmitry Jemerov
Software Developer
JetBrains, Inc.
"Develop with Pleasure!"

Comment actions Permalink

I am stumped. I went to such length to explain the problem, because I remembered this very decisive statement from Eugene Vigdorchik from not so long ago:
Most of the problems of this kind relate to projects where libraries depend on sources. IDEA does not (and will not) support this configuration.

Then when I really do need that feature you have just implemented it.
Just curious: What made you change your mind?

Usually I always use the latest EAP build, so that's another strange coincidence that exactly when I depart from that habit you have made some change I desperately need (without me noticing any jira item for that change).

Comment actions Permalink

Stephen Friedrich wrote:
> Just curious: What made you change your mind?

It was just like that. There are many projects (we've got some feedback)
people just can't change.

Comment actions Permalink

Can you give some more details, or a reference explaining how can i use this feature.


Comment actions Permalink

@Maxim Fabulous! Thanks for listening to feedback again and again. Let's hope that I can sell people to Idea here over time.

It's not a feature at all, more a workaround to deal with ugly project setup.
Here's a simplified example of the troubles I have.
order.jar contains classes to process orders. So it contains an Order class and for example a method OrderChain.initiateShipment(Order order).
Now in a project you need to add a field to the Order class, let's call it "channel" (because somewhere in the project it is relevant if orders came in via web site or from a distributor).
Ok. So just remove the file Order.class from the jar and copy the source file to the project and add the field there (this is the part you should NOT do).

Finally if in your code you create an Order (class from source code) and try to pass it to initiateShipment (method in jar), then Idea used to complain that the argument does not match the parameter and your code got a red error.
Idea was not able to see that the Order class referenced in the jar is meant to be the same Order class that you have in your source.

Comment actions Permalink

Boaz Nahum wrote:

Can you give some more details, or a reference explaining how can i use this feature.


Please sign in to leave a comment.