Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Eclipse for Intellij Idea projects

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.

like image 824
Alberto Zaccagni Avatar asked Jul 02 '09 16:07

Alberto Zaccagni


People also ask

Can you run an IntelliJ project in Eclipse?

From the main menu, select File | Export | Project to Eclipse…. The Export to Eclipse dialog displays the list of modules that have not been converted and switched to use the Eclipse format yet (the modules that have the IntelliJ IDEA module format . iml). Select the modules you want to export.

Which is easier to use Eclipse or IntelliJ?

7. Usability. IntelliJ is much easier to use as compared to Eclipse. The learning curve is far faster in IntelliJ, which makes developing easier and more natural.


1 Answers

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.

like image 63
Csaba_H Avatar answered Oct 07 '22 14:10

Csaba_H