I searched for a while, but I couldn’t figure out how to solve my problem :
I have a Java project which is a library I ship to customers.
For testing purposes, I have a “Test” project in which the library should be included.
I used to options :
- Export the library as a Jar, and import it in my test project when I make a change
This method takes too long when I fix bugs, and if someone else makes a change to the library, I might not know and forget to do it again.
- Link the “src” folder of my library to the test project
I had different behaviors using this method : some issues did not appear with the linked source which did with the Jar file… don’t know why.
When I program in Objective-C (in XCode), I have a reference to a “target” of the library project, which auto-compiles when I compile the test project, I’d like to have the same structure using Eclipse.
Any of you know how to do this ?
Thank you !
Julien
With
Link the "src" folder of my librarydo you mean you add the sources of the other project to the test project? In eclipse you can define a project dependency as part of the Java build path properties, that might do what you need.Another option is to add an ant build.xml to produce the .jar file, but I don’t think you can get eclipse to run the ant build file just before you run your test project automatically the way you can with a Makefile in the C world.