views:

43

answers:

3

I need to automate packing of Java EE projects into EAR archive in Eclipse. The most easy way, I think, is using Ant script. But writing of Ant from start is routine and long task. Is there a way to generate Ant script based on my actions in eclipse (like macros in MS Office)? Or, maybe, exists easier way to do this?

Thanks!

A: 

But writing of Ant from start is routine and long task.

Ridiculous. It's not a long task. And yes, it is routine. Do it once and forget it.

Laziness is a good trait for a programmer, but this is going too far.

duffymo
+1  A: 

There is nothing I know of that will generate an Ant build file for you. I don't think it is that difficult or long to create an Ant build file. If you have never done it before there is obviously a learning curve to it.

What I think you might be asking is can you have a build file that uses the same build configuration as your Eclipse project so that you don't have to setup your classpaths yourself then the answer is yes. I have never done this myself but I see this link seems to be offering that:

ant4eclipse

Ross
+1  A: 

Just another thought... You can use Maven instead of Ant. using Maven you can specify packaging type and you don't need to write ant script. This will also lead to simplified build management of your app application.

VinAy