In my small team we write applications that run as a Jenkins job and using the SOAP API of our Bug Tracker, our ALM software. They are accessed with Java however I think developers using other languages are facing the same problem like me as I regard it as pretty common.
Let's say I have a java class BugTrackerAccessMethodsImpl.java of which the methods are used in several Java projects that end up beeing a Jenkins job, so some projects need the same code base.
However if I improved BugTrackerAccessMethodsImpl.java in Project A, I have to manually update it in Project B and Project C because they also need that file. A process that is tedious, susceptible to errors and definitely neither clean or smart.
What I want to do?
I want to provide BugTrackerAccessMethodsImpl.java as a library to which all projects just need to refer (I think that is possible in Eclipse). If the library gets updated, the projects whhich use said library automatically get the updated library. (By the way: Currently I am the only one that does the updates on BugTrackerAccessMethodsImpl.java if that is important).
- How can I provide these libraries internally, so that they get linked? I think a shared drive can be an option but we have also SVN at our disposal. With SVN I could include the library as an external in other projects but I could not find out how this is done.
- If you work on libraries which several Java projects need, is it a good practice to keep a "Library Project" in which you work on the libraries themself? (***) If so, is it wise to create a project for each library you work on? The advantage would be that you can keep the testing environment for the library also small.
(***) The opposite of a "Library Project" would be that you have a Java project with a dedicated purpose (e.g. a BugTracker_Attachment_Extractor project) from which you exract the library that also other projects use - in my opinion, this is rather a confusing approach because then you have the code base for the libraries all over the place instead on just one place.