Maven support / project navigation and handling issues

I've started using IDEA quite recently for Java development and I find it good ( I was used to Netbeans ) but there're some glitches which really bother me.

I usually create Maven projects, because I think it's valuable for my project to be independent from my IDE. Idea creates its own files as well, it's fine for me and autoimport seems to be working.

But packages/project handling is giving me a few issues. It seems not to be too aware of Maven layout:

1) If I create a new package, I need to specify in which directory I should put it ( it might be java, resources, groovy, depending on what I'm creating), but I should not need to specify that, idea could just create all relevant directories and leave them empty. So if I need to create a new package I might be forced to actually create a new package multiple times, for multiple resource types!

2) If I create a new file, even though i tell Idea which file type it is (e.g. Java class) if multiple directories are available for such package (e.g. java and resources) Idea asks ME where it should put the file; I'd really like to just specify the package and then Idea could just infer where the file should be placed - it might need to ask whether it should be placed in "main" or "test", but if I create a Java class it shouldn't be asking where to put it - there's just one proper place according to the standard layout.

3) Packages view in Project tab is nice and it's what I'd like to use most, but has an issue: it gives no access to non-package files. So you can't select your pom.xml (just an example) withouyt switching to another view. Packages view already offers a "Libraries" 'virtual folder' which lets the developer see the connected libraries; it would be nice to have an additional "other files" 'virtual folder' listening non-package data which may exist in a project.

If there's any way around the issues I've encountered I'd like to know; otherwise I might file an enhancement ticket, if you think it's something that could be changed in a future release.

Comment actions Permalink

I'm only talking for myself but i don't agree with any of the suggestions you're making

1/ I do not want empty directories to be created in each and any of my maven source/resources/test tree whenever I create a new package
2/ although you could argue it COULD be possible for IDEA to choose between between java and resources sourceroots, I wouldn't want it to choose between src/main/java and src/test/java. Also maven do not forbid you to have more source folders , src/generated/java for example (although that would probably be better in target/generated/java), or src/windows/java if that would make sense for a project. How would idea know ?

3/ I'm not using the packages view, so I won't argue on that one

Comment actions Permalink


1) well, that may be a matter of taste. Maybe it could be configurable, and it may just not matter if point 2 is solved and the IDE can just create the full path "on the fly" in the proper filesystem hierarchy when I'm adding a new file.

2) As I said, there may be need to ask whether it's "main" or "test", but NOT whether it's "java" or "resources". While there may be multiple sources directories the IDE should not ask the user when there's just *one* obvious choice - which is the case for many projects.


Please sign in to leave a comment.