could you please help me with adjusting my project in IDEA 7.0.3. I have some problems with sources and don't know how to solve them.
I have two modules, for server and for client, in one project, without any special facets (like ejb or web), only plain java sources.
My client is a standalone desktop application. It uses several jars, including two jars with classes from server.
My modules are not dependent in IDEA at the moment. In order to launch client, I just copy two jars, from server folder to client lib folder, and launch client from IDEA, because these jars are in client module's classpath.
The problem is with debugging client, because debugger doesn't see sources for this jars.
I do the following:
1. I attach sources to these jars, pointing to the src folder of the server module. But this entails a lot of problems: when I step into such server class, all imports in source are red, all other server classes are underlined with red. And to resolve imports IDEA suggest adding.. jars from client lib folder! This two jars from server side! If I add them, my server module gets this jars (from client module) to it's classpath! Something terrible. I think this sources are overlapped with the same sources in the server module..
2. However, the above problem can be solved if server sources are copied to some unknown for IDEA dir, and I attach them to these jars in client module. It seems that in this case there are no conflicts with server sources. But it is not an elegant solution. I have to copy sources regularly..
Please, give me advise how to configure my project. I think my situation is so common, that there should be a standard solution. Maybe I should adjust modules dependencies?
Thanks for your attention.