I have some test code that I would like to keep close to the code it’s supposed to test. It’s only used for debugging, and I don’t want it in the final release jar, but I do want Eclipse to compile it. I know I could just put it in a separate project, but I’d prefer keeping it in the same one for organizational purposes, as it has no other use within the code base.
So, is it possible to tell Eclipse to exclude a particular package/file from the final JAR, but not the compilation process?
Thanks!
Ideal way of doing it is to keep source and test in different source-folders as below:
Then export the src folder and test folder in to separate jars.