Eclipse(带有 J2EE 插件)不会将类文件构建到输出目录

发布于 2024-10-09 00:54:35 字数 365 浏览 0 评论 0原文

我在使用多个版本的 Eclipse 时都遇到过这个问题。在某些场景下,Eclipse不会将字节码类文件输出到输出目录。我将进行构建和清理。我正在使用 Tomcat 服务器。我停止了服务器,但 Eclipse 仍然不会进行构建。

我的输出目录:project/WebContent/WEB-INF/classes

有时,在进行了如此多的构建和/或重新启动计算机后,我可以再次构建到该目录。有谁知道问题是什么?

另外,为此问题创建错误报告的最佳方法是什么。

版本信息:伽利略 面向 Web 开发人员的 Eclipse Java EE IDE。 Build id: 20100218-1602

另外,安装了 mvn m2eclipse 插件。

I have had this issue with several versions of Eclipse. In some scenarios, Eclipse will not output bytecode class files to the output directory. I will do a build and a clean. I am working with Tomcat server. I stop the server and still Eclipse will not do a build.

My output directory: project/WebContent/WEB-INF/classes

Sometimes after doing so many builds and/or restarting my machine, I am able to build again to that directory. Does any know what the problem is?

Also, what is the best way to create a bug report for this problem.

Version Info: Galileo
Eclipse Java EE IDE for Web Developers.
Build id: 20100218-1602

Also, mvn m2eclipse plugin installed.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

回忆躺在深渊里 2024-10-16 00:54:35

如果项目构建路径缺少某些必需的库,通常会发生这种情况。还要确保自动构建已选中 [ 项目 >自动构建]。如果您仍然遇到问题,请发帖

This usually happens if, project build path is missing some required libraries. Also ensure, build automatically is checked [ Project > Build Automatically ]. Please post if you still face problem

执笔绘流年 2024-10-16 00:54:35

我也有同样的问题。我检查了“自动构建”,并期望在我的项目/bin 目录中包含类文件,但它是空的。对我有用的是取消选中“项目”菜单中的“自动构建”,“项目 ->”清理然后做Project ->构建全部。现在所有 .java 文件都已编译,我再次选中“自动构建”。

I had the same problem. I had "Build Automatically" checked, and was expecting class file in my project/bin directory but it was empty. What worked for me was unchecking "Build Automatically" in Project menu, Project -> Clean and then do Project -> Build All. Now all .java files were compiled and I checked "Build Automatically" again.

寻梦旅人 2024-10-16 00:54:35

我还有一个简单的问题,但我不知道如何直接评论该问题而不添加答案。

您是否在 Windows 上运行 Eclipse/m2eclipse?如果是这样,您可能会遇到“干净”生命周期阶段发生错误的问题。如果将以下内容添加到>元素在 ~/.m2/settings.xml 中,您应该能够避免这种类型的构建中断:
<代码>

<profile>
        <id>windows-nocleanerrors</id>
        <activation>
            <os>
                <family>Windows</family>
            </os>
        </activation>
        <properties>
            <maven.clean.failOnError>false</maven.clean.failOnError>
        </properties>
</profile>

I have another simple question, but I don't know how to comment on the question directly without adding an answer.

Are you running Eclipse/m2eclipse on Windows? If so, you may be having issues with errors occurring during the "clean" lifecycle stage. If you add the following to the <profiles /> element in your ~/.m2/settings.xml, you should be able to avoid this type of build interruption:

<profile>
        <id>windows-nocleanerrors</id>
        <activation>
            <os>
                <family>Windows</family>
            </os>
        </activation>
        <properties>
            <maven.clean.failOnError>false</maven.clean.failOnError>
        </properties>
</profile>

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文