Using Ant as a build tool, you can put your project in any way you want. However, leaving parts of your code from the distribution, it looks like it will be error prone; you may accidentally leave the necessary classes (presumably all your classes are necessary).
Regarding saving code in different projects, I have a free guide. Store code that changes together in one project and packs it into your own jar file. This works best when some of your codes can be broken down into utility libraries that change less frequently than your main application.
For example, you might have an application in which you created web service client classes from the WSDL web service (using something like the Axis library). The web service interface is likely to change infrequently, so you do not want the regeneration step to be constantly repeated in your main application assembly. Create a separate project for this part so that you only need to recreate the web service client classes when changing the WSDL. Create a separate jar and use it in your main application. This style also allows other projects to reuse these utility modules.
When doing this style, you must put the version number in the jar manifest so that you can keep track of which applications use which versions of your module. Depending on how much you want to do this, you can also save a text file in a bank that details the changes that have occurred for each revision (like an open source library).
source share