Eclipse从构建路径中删除测试文件夹
我有两个文件夹,src和test(对于junit)。当我导出时,测试文件夹被打包到带有JUnit的jar中,这是我不想要的。我去了项目的构建路径,尝试在'导出顺序'中取消选择'test'文件夹,但它不允许我取消选择它。
I have two folders, src and test (for junit). When I export, the test folder gets packaged into the jar with JUnit which I don't want. I went to Build Path for the project an tried to deselect the 'test' folder in 'order of export' but it does not allow me to deselect it.
然后我尝试使用*(所有内容)排除'soruces'选项卡中的文件夹,但是当我尝试导出时出现错误。
I then tried exclude the folder in the 'soruces' tab using * (everything), but then I got an error when I tried to export.
如何排除我的测试文件夹从出口?
How do I exclude my test folder from the export?
我刚刚做了它,它对我来说很好。这就是我做的。
I have just did it and it worked fine for me. Here is what I did.
- 右键点击我的项目;选择导出
- 选择Java / JAR文件,然后选择。
- 显示工作区中的项目列表。现在展开有趣项目的子树,只选择src文件夹。不应选择测试文件夹。
- 继续创建jar文件并查看结果。
- right click on my project; choose Export
- Choose Java/JAR file, Next.
- List of projects in the workspace appears. Now expand the sub-tree of interesting project and select src folder only. The test folder should not be selected.
- continue creating jar file and see the result.