Nov 13, 2007

Creating Eclipse & IntelliJ Project Files From Ant

If you're not using Maven2, the least you can do is provide a push-button IDE setup, right? Ant-Eclipse - Eclipse project generator does this for Eclipse. But what about poor old IDEA? Does anyone know of a tool that does this already?

6 comments:

Matt said...

Personally, I've never wanted projects auto-generated. When people have requested this, it's because the build/setup process was too complicated or time-consuming, when it shouldn't have been.

I'd be interested to hear about why auto-generated projects are wanted ;)

Merlyn Albery-Speyer said...

You're right. If it's complicated to set up a project in an IDE the team should really set about identifying the root cause and fixing that.

Assuming it is complex then it helps a lot to be able to automatically set it up.

Even if it's not complex, you still want the freedom to easily switch out versions of jars, add in new ones, remove old ones. All of this without incurring too much discomfort for the rest of the team.

I also like to be able to set up a dev environment for a new team member with a single command.

Matt said...

I've setup Ivy at home, and they were using at work before, to change out Jars and the like. So I'm not sure I'd use it for that.

But I guess that's somewhat different than Maven. Although it also handles dependencies.

Merlyn Albery-Speyer said...

The caveat for this whole post was that you're not using Maven2 (nor, implicitly, anything else that'll also manage your dependencies for you). I didn't spell that out very well.

Can Ivy go away and create your IDEA or Eclipse classpath's for you? It's pretty handy to be able to do that I find, especially if you have a project broken down into a number of modules.

cleve said...

I think I'm with Matt on this one. Creating project files for IDEs from Ant will never give me what I really want. I always like to setup and fine tune my projects within my IDE, and then share this out to the team.

IDEA to my mind beats Eclipse hands down in this area.

Never had a need to use Ivy.

Merlyn Albery-Speyer said...

Cleve, I've held strong prejudice against checking in IDE files for a while. I should give it a shot. Thanks.