Workflow Automation: Makefile vs. Ant

Whenever I notice that something in my workflow is a recurring task , I try to automate it.

For example, the steps required to deploy something to a server. This is often an assembly, followed by scp, and finally several remote installation scripts:

  • mvn package
  • scp target / foobar.jar server:
  • ssh server install-foobar
  • ssh server ../ bin / foobar restart '

I try to write a small Makefile in such cases, which may look like

deploy: mvn package scp target/foobar.jar server: ssh server install-foobar ssh server './bin/foobar restart' 

How do you automate your workflows?
Is Ant a tool of choice? What are the advantages / disadvantages?

+4
source share
9 answers

For Java development, I would say that Ant is the default choice.

Pro:

  • good documentation
  • good IDE integration
  • Many third-party extensions and tools

Con:

  • Somewhat verbal (well, it's still anothr XML format)
  • Some things that should be simple are not (like any loop)

I have no experience using make files, so I canโ€™t say how they compare. Perhaps you should just use what your developers are more experienced.

+2
source

SCons are another good one. And Capistrano seems well-reviewed, although I have not tried it.

+1
source

I use shell and perl scripts

+1
source

consider GAnt ( http://gant.codehaus.org/ ). using the Groovy constructor, it is much less verbose than Ant build script

+1
source

For python, I try to use fabric for deployment steps and setuptools for any building that is needed (not usual for me :-)

The fabric understands how to copy files to servers, run commands on a remote server (both as a standard user and as root).

+1
source

One of the reasons most build systems are so complex is because people try and do a lot in them. sometimes complementing the build system with a script driver that takes care of tasks without compilation / linking is a good way. There is no single way. It is difficult to answer the question without seeing the structure of the source code of the project and all the tasks that must be completed. But you can take a look at Rake, as this will complement Make, Ant, and Maven.

+1
source

Rake is my choice.

0
source

I find Ant and its XML configuration syntax a bit cumbersome, and there are some things that should be trivial, but it is very difficult to get into Ant. I prefer such automation to SCons .

There is another tool specifically designed to deploy materials that I used a bit and was pretty cool, but I forgot his name, maybe someone else remembers him :).

0
source

I use scripts (shell, perl, python) or make files. I don't like Ant and SCons

0
source

All Articles