This provides flexibility, but at the cost of every build file being entirely different. First, there are few enforced standards in an Ant script. Of course, Ant isn’t without its own problems. While setting up a build script takes some time up front, hopefully you can see the benefit of using one over passing commands manually to Java. properties files referenced by the build file that may contain configurable filepaths, environments, etc. If not, you may have to make tweaks for your specific computer. If you are lucky and are working on a well-maintained project, the build file should “just work”. A typical build might move around files, assemble documentation, run tests, publish build artifacts, etc. Ant has dozens of built-in tasks, and it’s possible to define custom tasks too. Of course, the build file you’re likely to encounter in a real project is going to be much more complex than this example. With these targets defined, you may run ant clean, ant compile, ant jar, ant run to compile, build, and run the application we built.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |