DubyaDubyaDubyaDot
DubyaDubyaDubyaDot

Reputation: 1274

In Eclipse folders appear as packages

I'm getting an issue where non-src folders are looking like packages, they look completely fine in my natural folder directory.

image

The assets folder should be a hierarchy, but isn't.

Thought it was because I was in package explorer but not project explorer, same issue with project explorer.

Upvotes: 17

Views: 14706

Answers (4)

Abhishek Singh
Abhishek Singh

Reputation: 1517

If your simple folder is turning into package format. Be clear that it is not source folder, it is just simple directory like "docs" you want to keep in your Project but eclipse is turning it into Package format. then do below step:

right click on your package -> Build Path -> exclude

enter image description here

Upvotes: 0

Ismail Yavuz
Ismail Yavuz

Reputation: 7045

Maven Update fixed my problem easily.

Right click on project,

maven->Update Project

I suspect that the cause was I run maven commands from command prompt (cmd) directly.

Upvotes: 1

David Tonhofer
David Tonhofer

Reputation: 15326

For me the following worked (in RAD actually): Go to "Project Properties" / "Java Build Path" and mark the Resource Folder as "Source folders on the build path".

Project Window 1

The Resource Folder (here, src/main/resources) appears as filled with classless packages:

Classless packages appear

Enter the exlcusion pattern "**" to exclude any source path:

Project Window 2

This solves the problem.

Just folders now

Upvotes: 12

sbegaudeau
sbegaudeau

Reputation: 1544

I believe, you right click on your project and choose "Build Path" and "Use as source folder". If it is the case, you can revert the problem by right clicking on your project and selecting "Build Path" and then "Remove from build path".

Upvotes: 30

Related Questions