Using Eclipse for Intellij Idea projects

eclipse, intellij-idea, project-structure

Solution

There are definitely come constraints in an Eclipse workspace but it is quite flexible (with linked folder and include/exclude support). There are some detailed examples in the project configuration tutorial.

If I understand the layout correctly I think you do not have to change this structure (at least for the sources). You can create a bunch of java projects and/or dynamic web projects (latter for web "modules"), one per module (you should treat an Idea project as an Eclipse workspace and a module as an Eclipse project). You can set webcontent as the content directory, main/java and main/resources as java source folders and you can add the jars from libs to the build path (or simply put them in the webcontent/WEB-INF/lib directory).

The most complicated stuff is the profiles and the compile/test/normal libraries. I would put the normal and compile libs to the build path of the project and add the test libs explicitly to the classpath of a test run configuration. For the profile I do not know a simple method - maybe a fourth linked folder which always map the one actually used...

The Idea migration faq can also help to summarize some key differences between the two ide.

Problem

I like Eclipse and I want to use it, the problem is that I can't figure out a simple and fast way to configure projects once checked out from svn. All projects I work with have several modules and are configured with a top folder which contains four folders: the build output, libs, main and profiles. In detail: - libs contains compile libs, test libs and normal usage libs. - main contains three folders: java (for sources), resources (for things like ibatis xml) and webcontent (for jsps, css, js, imgs and the like) - profiles contains three folders: personal, test and production which are added to the build depending on the target environment. How can I achieve this using Eclipse? This is the only thing I dislike of this ide, I've always found difficult to configure a project the way I want (and not the way it wants :P) I was always told that Eclipse uses a very strict structure for its projects, but I can't believe there is no solution and I just have to stick with Idea. I want to work with something I like, I think this is fundamental. Also, do you think this is a good configuration for a project? What if I just change it to my needs with a script that rearranges the structure after svn checkout? Will I have problems when committing files to svn this way? I don't want to change everyone's structure on svn.

Original source