Reputation: 514
I want to create a cross-project library that allows me to have a common code on a project and replicate it on other projects where I want to use that cross-project library code.
I'm programming a software plugin, that I need to export as a "JAR File" with that cross-project library packages inside, but NOT the rest of the dependencies.
Is there any better way? How can I do it?
Upvotes: 0
Views: 375
Reputation: 1555
Do you need versioning of that code? Meaning, one project uses an older stable version of the package while you develop a newer one. If you need versioning of the code in that package you should use something like Maven modules: a module representing your common package other modules representing your projects that use that code that would reference the first one.
Upvotes: 1
Reputation: 8163
Right-click -> Build Path -> Link Source
The better way is to just make the other project a dependency and put it on the classpath.
Upvotes: 2