Berlin Brown
Berlin Brown

Reputation: 11744

Eclipse (with J2EE plugins) will not build class files to output directory

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.

Upvotes: 10

Views: 18411

Answers (3)

Vlad
Vlad

Reputation: 41

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.

Upvotes: 4

Ratna Dinakar
Ratna Dinakar

Reputation: 1573

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

Upvotes: 8

smallfire
smallfire

Reputation: 59

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>

Upvotes: 0

Related Questions