简体   繁体   English

如何在构建过程中使Eclipse只编译和复制.java文件?

[英]How do I get eclipse to compile and copy only .java files during build?

I have a dynamic web project in eclipse (although I'm not using it as a web project. I would like to convert it to a java project if possible) and there are java files all over the place. 我在eclipse中有一个动态的Web项目(尽管我没有将其用作Web项目。如果可能的话,我想将其转换为Java项目),并且到处都是Java文件。 There are also a lot of other files like images etc (which I don't want to remove because the project is linked to my SVN repo so if i do an update then everything will come back). 还有很多其他文件,例如图像等(我不想删除,因为该项目链接到我的SVN存储库,所以如果我进行更新,那么一切都会回来)。

Now when i build my project eclipse copies all the files instead of compiling and copying the .java files only and this takes a lot of time because there are some 2GB worth of files. 现在,当我构建项目时,eclipse会复制所有文件,而不是仅编译和复制.java文件,这会花费很多时间,因为其中有一些2GB的文件。

I tried to include only .java files in the source by going to properties of my project -> Java Build Path -> source tab -> includes -> I added "*.java" to the textbox. 我尝试通过转到项目的属性-> Java构建路径->源选项卡->包含->在源中仅包含.java文件,在文本框中添加了“ * .java”。 However, no file got copied to my output folder after that. 但是,此后没有文件复制到我的输出文件夹。

how do i go about this? 我该怎么办? Deleting the images etc from my project is not a solution here. 从我的项目中删除图像等不是这里的解决方案。

在包含文件中添加**/*.java/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Eclipse中仅编译经过修改的Java文件 - How to compile only modified java files in Eclipse 如何将JSON复制并粘贴到Eclipse中并创建一个.java文件? - How do I copy and paste JSON into Eclipse and get a .java created? 我是否需要在Eclipse中编译.java文件才能运行应用程序? - Do i need to compile .java files in Eclipse to run application? 我如何在 Eclipse 上从 src 文件夹编译和运行简单的 java 文件? - how do i compile and run simple java files on eclipse from a src folder? 如何获取Eclipse来编译WEB-INF / classes中的Java文件 - How can I get eclipse to compile java files in WEB-INF/classes How do I build a Java Github Project in Eclipse with no maven & gradle files and no.jar files in the repo - How do I build a Java Github Project in Eclipse with no maven & gradle files and no .jar files in the repo 如何修复 Eclipse 中的“构建期间发生错误”? - How do I fix the “Error has occured during build” in Eclipse? 如何将旧文件从Java Eclipse工作区复制到新工作区中? - How do I copy over my old files from my Java Eclipse workspace into my new workspace? 如何使用Eclipse将仅包含.java源文件的jar文件编译为包含.class文件的.jar文件 - How to compile jar file containing only .java source files into .jar files containing .class files with Eclipse 如何为Java文件构建编译图? - How can I build a compile graph for Java files?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM