prolink007
prolink007

Reputation: 34594

projects in workspace not showing up under project -> clean

Sometimes when launching eclipse my projects in my workspace do not show up in project -> clean. How can i fix this problem?

Things i have tried:

  1. Closing projects and re-opening
  2. deleting projects and re-importing
  3. closing and re-launching eclipse
  4. restarting computer
  5. refreshing workspace and repeating any of those steps

Sometimes number 2 will work and sometimes it will not. This is a really annoying problem any assistance is greatly appreciated!


I have defined custom ant builds for all the projects. I unselected all the other builders besides my custom builder. Some projects are are showing up and some are not.

Upvotes: 5

Views: 8235

Answers (4)

James-Jesse Drinkard
James-Jesse Drinkard

Reputation: 15723

You must have the core builder in your .project file and the I believe the project nature setup or Eclipse will not show the project in the list of projects for the clean option from the file menu. That is the Project - clean that opens the clean dialog.

The project natures are used by Eclipse so that it knows what kind of project it is dealing with. I ran into the concept of project natures when I was trying to get a simple PERL project to run in Eclipse.

Here is an example that I used for Eclipse LUNA.

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
    <name>my-war</name>
    <comment></comment>
    <projects>
    </projects>
    <buildSpec>
        <buildCommand>
            <name>org.eclipse.wst.common.project.facet.core.builder</name>
            <arguments>
            </arguments>
        </buildCommand>
    </buildSpec>
    <natures>
        <nature>org.eclipse.wst.common.project.facet.core</nature>
        <nature>org.eclipse.wst.common.moduleCore.ModuleCoreNature</nature>
    </natures>
</projectDescription>

I also found that for an angularjs project we were using Maven with, all that was needed was this under the buildSpec and natures for eclipse to see it as a project that could be cleaned:

<buildSpec>
        <buildCommand>
            <name>org.eclipse.m2e.core.maven2Builder</name>
            <arguments>
            </arguments>
        </buildCommand>
    </buildSpec>
    <natures>
        <nature>org.eclipse.m2e.core.maven2Nature</nature>
    </natures>

Upvotes: 0

shyam
shyam

Reputation: 11

Added the below lines between in <buildSpec> tag
in .project file of the project and showed up in the clean. I am using eclipse Juno.

<buildCommand>
        <name>org.eclipse.jdt.core.javabuilder</name>
        <arguments>
        </arguments>
</buildCommand>
<buildCommand>
        <name>org.eclipse.wst.common.project.facet.core.builder</name>
        <arguments>
        </arguments>
</buildCommand>

Upvotes: 1

prolink007
prolink007

Reputation: 34594

Closing eclipse and re-opening eclipse a few times solves the problem. It also seems that turning build automatically on and then closing eclipse and re-opening seems to help.

Eclipse... =)

Upvotes: 4

Zolt&#225;n Ujhelyi
Zolt&#225;n Ujhelyi

Reputation: 13858

A project only shows up in the Clean dialog, if it has some kind of builder registered. You can check this by opening the project properties, and look for the Builders tab. If there are no builders, then it should not be visible.

If that is the problem, then you should try to identify at what point does your .project file in the project folder changed; that might give a hint about the culprit.

Upvotes: 4

Related Questions