Exclude Certain Packages From Export (Java) [message #631575] |
Fri, 08 October 2010 00:41  |
Eclipse User |
|
|
|
Hello, world!
I just started using Eclipse with Java yesterday, and everything in going nicely so far.
I'd like to export my project to an executable .jar, but I don't want to include my jUnit tests. How can I exclude them from the export? I tried to go Project > Properties > Build Path > Export tab, but I can't check/un-check the packages I want/don't want.
Thanks in advance!
|
|
|
|
|
Re: Exclude Certain Packages From Export (Java) [message #631771 is a reply to message #631762] |
Fri, 08 October 2010 12:32   |
Eclipse User |
|
|
|
On 2010.10.08 9:56, Jonah Bron wrote:
> Thanks for the reply. What I was trying to say was, I can't uncheck any
> source folders. They're already unchecked. Here's a screenshot to show
> you what I mean.
>
> http://s1046.photobucket.com/albums/b465/jonahbron/?action=v iew¤t=screenshot.png
>
>
> Thanks
Jonah,
You don't want to "uncheck" anything in Build Path (per your illustration).
To create a JAR, you right-click on the project and choose Export... (as
you started to do). But, when you reach the JAR Export dialog, you
uncheck what is probably your test subdirectory.*
If you like, peruse this discussion here:
http://www.javahotchocolate.com/tutorials/jars.html
* Now, if you didn't put your JUnit tests under a separate Source
Folder, parallel to src, then you should do that (it's a "best
practice") and that might be why you find it impossible to exclude them.
Come back if this isn't helpful,
Russ Bateman
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.14697 seconds