开发者

Eclipse showing package name including directory structure

I have my source in the hierarchy:

folder: src/main/java package: com.test.serviceImpl

Now eclipse is showing this as src.main.java.com.test.serviceImpl

How can I make it display only com.test.serviceImpl 开发者_StackOverflowunder the directory structure : src/main/java

Note: This is a maven project module imported to eclise. All other modules display properly


If you use m2eclipse and your pom is configured properly, just right-click the project and select Maven > Update Project Configuration.

If that doesn't work, study the Eclipse Maven Console (in the Console view) for errors.


Set src/main/java as a source root directory.

Here's the standard Maven directory structure - like it or not:

http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html


I had a problem which may be related.

Eclipse started showing folder names as a concatenation of the folder name with other elements. A folder named "x" was being replaced with "xorg.eclipse.jdt.core.javabuilderorg.eclipse.m2e.core.maven2builder"

After exploring various possible explanations and/or solutions, I realized this behavior appeared after my having deleted a project folder without checking the box "Delete project contents on disk (cannot be redone)". When I subsequently re-checked out the code from an SVN repository, a folder named "x" was still on my disk, and so I suspect Eclipse created a longer version of a folder to contain "x" using other elements from the buildSpec.

I fixed the problem by closing Eclipse, deleting both folders ("x" and "xorg.eclipse..."), reopening Eclipse and checking out the project again.


I had the same problem on my Maven project and I solved it just updating my project Maven>Update Project

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜