Ben
Ben

Reputation: 147

Synchronizing two java projects still in development in Eclipse Kepler

I'm currently working on two "independent" java projects using Eclipse Kepler.

I quoted independent because it's not really the case, in one of them I have to implement some methods already written in the other. So i would really like to use objects and methods created in that project instead of re-writing everything.

A simple answer would be to create a .jar of that project and put it in the first one.

The problem is that the two projects are still in development, and a lot of modifications are made in those two. I would need to manually update the jar at every modification of the package.

So my question is:

Is there a way to synchronize projects (or packages from different projects) so that when the original is modified, the copy in the second project is automatically updated?

I don't want to modify anything in the copy, I only need to use the methods present in that project.

It would be like some kind of symlink from the second project's library pointing towards the packages I need from the first big project.

Is that even possible? I can't seem to find anything regarding this anywhere.

Upvotes: 2

Views: 436

Answers (2)

Chriki
Chriki

Reputation: 16338

Marko Topolnik has already given the correct answer in his comment to your question: you should set up a build dependency between the two projects.

Therefore right click the project which depends on the other and select “Build Path” → “Configure Build Path…”. In the “Projects” tab “Add…” the dependee project. That should make your dependee project available like a library – with any changes in the dependee project directly affecting the dependent project.

Upvotes: 2

You can use version control system.

The concept is about that you store the source code in a repository. Where developer commit their changes and synchronize it.

You have one place where source code is stored and you work on external copy when you finish you transfer the code to repository. Then other can synchronize to have it up to date.

Form more Reversion control

Upvotes: 0

Related Questions