Reputation: 11
I have two netbeans project and i need to merge the 2 output jars in only one "big" jar. The problem is that these 2 project share a lot of classes and this is obviously a problem. I'm already using ANT with the zipgroupfileset attribute but it copy all the classes. Is there a way i can choose all the classes from project 1 THEN the missing class from project 2? thank you very much for ur help
Edit: i'm forced to have 2 project (sometimes i don't even have the second project but just the jar) so i kinda have to make an ANT script i think. Is strange that there is no attribute like don't copy the already existing class
Upvotes: 1
Views: 212
Reputation: 5858
Duplicate code is error prone. There are a few ways to resolve this duplication.
Upvotes: 1
Reputation: 627
Eclipse make it for you.
You can create one new project in eclipse, import yours jars inside project and export him.
When you select Export / Java / Runnable Jar, check the option "Extract required libraries into generated jar". Just one copy of each jar are copied.
Upvotes: 0