What is build automation software (for example, Ant)?

后端 未结 12 1915
情歌与酒
情歌与酒 2021-01-31 10:19

I see reference of ant a lot but I don\'t get exactly what its meant to do? from what i\'ve heard its supposed to compile your projects but can\'t i just do that by clicking Run

12条回答
  •  滥情空心
    2021-01-31 10:34

    I already know that ant is a 'build automation software', my question is, what exactly is build automation? I thought that you're supposed to test your app, and when it is running you click the 'build' button in eclipse or through command-line java, and it makes a .jar file out of it? So why do you need to 'automate' this process?

    Not all the Java development is done through eclipse and not all the jars may be built from the command line ( or should be built from the command line ) .

    You may need additionally run test cases, unit tests, and many, many other process.

    What ant does, is provide a mechanism to automate all this work ( so you don't have to do it every time ) and perhaps you may invoke this ant script each day at 6 p.m.

    For instance, in some projects, a daily build is needed, the following are the task that may be automated with ant, so they can run without human intervention.

    • Connect to subversion server.
    • Download/update with the latest version
    • Compile the application
    • Run the test cases
    • Pack the application ( in jar, war, ear, or whatever )
    • Commit this build binaries to subversion.
    • Install the application in a remote server
    • Restart the server
    • Send an email with the summary of the job.

    Of course for other projects this is overkill, but for some others is very helpful.

提交回复
热议问题