tags:

views:

73

answers:

2

I got 2 eclipse project in diff workspaces.

First one use spring RmiServiceExporter. The second gwt project is in another eclipse workspace, this project should use shared stub classes from first project as rmi client.

I want to edit java stub classes in one project and they should automatically change in another. Of course i can copy past them, but i want to automate this process.

Pressing Link source in java build path of my eclipse project, i can link source folder, but package name are messing. Second project, from where i link source classes, can't compile linked classes, since eclipse consider this classes from root package.

How can i link source folder and keep packages name ?

Thank you

+1  A: 

To share projects between different workspaces, I would create a JAR with the sources/classes, and would share it using a Maven repository server (such as Nexus).

In your first project, when you make a modification, to theses files, you push it (Maven release) to Nexus. From your second project, you use this Nexus repository to update the dependency and get an updated JAR.

Benoit Courtine
Also note that you can just create snapshot releases of your dependent Spring project and have a snapshot dependency in your GWT project. The m2eclipse plugin can automatically link the source to all your depenencies too.
Jon Freedman
The original question is not related to Maven.
zvikico
A: 

IMHO, the right thing to do would be to build a JAR containing the stub classes and a JAR with sources of those classes. You can use any build tool for that (Ant is my favorite). In the second workspace, use this JAR in your build path and set the source JAR. That would work.

Another option: in your first workspace, move the stubs to a separate source folder (in the build path, just add another source folder) or a separate Java project. Then, you could add this source folder as a linked folder (and add it as source folder as well) to the project in the second workspace.

zvikico