Apache Ant (or simply Ant) is an XML-based build scripting language used heavily by the Open Source community. Ant automates tasks such as compiling source code, building deployment packages and automatically checking dependencies of what items need to be updated in a build set.
Tag: ANT
Limited Time Offer!
For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!
Using Ant to build J2EE Applications
Apache Ant (Another Neat Tool) is a build tool, mainly for Java projects. A build tool can be used to automate certain repetitive tasks, e.g. compiling source code, running software tests, creating jar files, javadocs, etc.
A build process typically includes:
- the compilation of the Java source code into Java bytecode
- creation of the .jar file for the distribution of the code
- creation of the Javadoc documentation
Ant uses a xml file for its configuration. This file is usually called “build.xml”. Within this build file you specify the targets for ant. A target is a step which ant will perform. You also can specific dependencies. If target A depends on target B, ant will first do B and then A. Also you specify the main target. This target is the target ant will try to execute per default. If this target depends on other targets then ant will automatically perform these task first and so on and so on.
Useful links for Sonar with Ant
rajeshkumar created the topic: Useful links for Sonar with Ant
Sonar with Ant
sonar.codehaus.org/a-new-hudson-plugin-f…egration-with-sonar/
old.nabble.com/Ant-Integration-td20105950.html
old.nabble.com/JUNIT—ANT-Build-File-td21797773.html
docs.codehaus.org/display/SONAR/Analyzing+Java+Projects
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn
rajeshkumar replied the topic: Re: Useful links for Sonar with Ant
Sonar and Other Quality Tools
sonar.codehaus.org/what-makes-checkstyle…acker-complementary/
itspice.net/cms/tools/java-development/s…e-quality-management
ganeshrenganathan.wordpress.com/2009/07/29/sonar-hudson/
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn
Ant cpptask with ivy
rajeshkumar created the topic: ant cpptask with ivy
Questions:
A company I am working for, has some c binaries build with ant using cpptask. They use ivy to retrieve shared c libraries every time we start a build which wastes a significant amount of time comparing the revisions and downloading, when then only need to be download if the header files have changed. I have added a target which sets a var, which causes the build to skip over the ivy steps but I’d like a better solution. I see that cpptask creates a file history.xml and only rebuilds to binary if any of the sources have change. I’d like to know if there is way to independently test if the binary needs to build, and it does, I’d like it fire off the ivy targets. I’d also like for a variable to be set if the binary was rebuilt so that I can conditionally start an rpm generation task
Answer:
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn
Ant+Unable to create directory as a file already
rajeshkumar created the topic: Ant+Unable to create directory as a file already
Hi,
I have one file called djir.ear and I am trying to create a folder with the same name “jir.ear” same location using ant script.
but i get error message saying that
Unable to create directory as a file alr
eady exists with that name
Can you suggest me any solution for this? as i build is failing and mkdir do not support failonerror propertry 🙁
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn
Help in copy files from list using ant
scmuser created the topic: Help in copy files from list using ant
Help in copy files from list using ant
Hi,
I have one file called list.txt where i have mentioned all the files which need to be copied from specific directry.
can you please help me with the right copy task syntax which read the files name from list.txt and copy to destination directory???
tpatil replied the topic: Re:Help in copy files from list using ant
You can “for” loop in build to achieve this
Build.xml:-
Build.properties:-
copy.files=${src_dir1}/build/build.xml,\
${src_dir2}/build/build.xml
rajeshkumar replied the topic: Re:Help in copy files from list using ant
I would recommend following command for same…
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn
scmuser replied the topic: Re:Help in copy files from list using ant
amitanand123 replied the topic: Re:Help in copy files from list using ant
Ant Scripting Issue
ant-qa created the topic: Ant Scripting Issue
1) I have many ant build files ( .xml files / test scripts) in folder : bin/execute
2) I have another testsuit.xml file (ant build file) that works as a test suit. All the test cases in folder : bin/execute are executed in the order they appear in testsuit.xml
3) I want to write code maybe another ant test (.xml file) to make sure that all the test cases are added (executed) in the test suit.
4) Test cases in the testsuit.xml can be identified by :
Any thoughts will be extremely appreciated
Thanks
Condition with Task in Ant
scmuser created the topic: Condition with Task in Ant
Hi,
How can i use conditions in Ant Task execution?
Any idea?
tpatil replied the topic: Re: Condition with Task in Ant
[i]
rajeshkumar replied the topic: Re: Condition with Task in Ant
Hi,
I guess questions was based on applying condition for Aant TASK instead of Ant Target. Following ways i mean using
There is one external lib ant-contrib which can be used to put conditional Task such you can find more details in links below…..
ant-contrib.sourceforge.net/tasks/tasks/if.html
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn
ANT Build Integration with InstallAnywhere
installanywhereExpert created the topic: ANT Build Integration with InstallAnywhere
ANT Build Integration with InstallAnywhere
ANT is a powerful, Java based build tool developed by the Apache Foundation’s Jakarta Project. It can be used to control complex build tasks in Java and other development environments. ANT manages specific actions though “tasks” which can either be part of the core ANT distribution or available as extensions. InstallAnywhere comes with an ANT task to build installers from ANT. The InstallAnywhere ANT task is located in your InstallAnywhere application folder, inside “resource” and then inside “/build”.. Add “iaant.jar” to your classpath when executing ANT to get access to the InstallAnywhere ANT task. ANT uses an XML file to specify the order of tasks for your build process. More information on ANT can be found on the Apache Foundation’s Jakarta Project Web site.
Task Name and Class
The InstallAnywhere ANT task is specified as follows:
This task can be found inside the iaant.jar file, in your InstallAnywhere application
folder, inside “resource” and then inside “build”.
Parameters
After defining the task, specify any parameter necessary for the build settings:
Replace the IAlocation with the absolute path to your own InstallAnywhere
application folder. If InstallAnywhere cannot be found, ANT will search for it in one of
the default locations or look in the registry to find where InstallAnywhere was
installed to.
Specify the path and file name of the project to build in the IAProjectFile parameter.
All other properties are optional. The parameters closely match the properties found
in the Build Properties File described above. The following table shows the available
parameters.
ashok423 replied the topic: Re: ANT Build Integration with InstallAnywhere
Hi, The parameters table which you mentioned is missing from the post. Can you please post it again.
Top 10 DevOps Tools which is mostly used by DevOps Engineers | scmGalaxy
1. Chef
- Manage nodes from a single server
- Cross-platform management for Linux, Windows, Mac OS, and more
- Integrates with major cloud providers
- Premium features available
2. Jenkins
- Permanent links
- RSS/email/IM integration
- After-the-fact tagging
- JUnit/TestNG test reporting
- Distributed builds
- Automatically enforce consistency of environments
- Works across physical and virtual machines
- A common tool-chain
- Support key DevOps best practices, including continuous delivery
4. Ant
- Supplies a number of built-in tasks for compiling, assembling, testing, and running Java applications
- Builds non-Java applications, such as C or C++ applications
- Pilot any type of process which can be described in terms of targets and tasks
- Extremely flexible and does not impose coding conventions or directory layouts to the Java projects which adopt it as a build tool
5. Apache Maven
- Simple project setup follows best practices
- Easily work with multiple projects at one time
- Large repository of libraries and metadata that continue to grow
- Extensible, with the ability to write plugins in Java or scripting languages
For open source log processing, search, and analytics, Logstash is a popular tool among DevOps engineers. Because Logstash is licensed under Apache 2.0, you can use it in the way that best suits your needs.
- Collects, parses, and stores logs for later use
- Includes a web interface for searching and drilling into all of your logs
- Ship logs from any source, parse them, timestamp them correctly, index them, and search them
7. Docker
- Assemble multi-container apps and run on any infrastructure
- Compose an app using both proprietary containers and Docker Hub Official Repos
- Manage all containers of an app as a single group
- Cluster an app’s containers to optimize resources and provide high-availability
- Helps in the build, deployment, and maintenance of web software
- Application monitoring in one place
- Cross application and transaction tracing
- Database and availability and error monitoring
- Declarative builds and build-by-convention
- Language for dependency-based programming
- Structure your build
- Deep API
- Multi-project builds
- Ease of migration
- Working offline
- Fast to Work With
- Repositories Are Smaller
- Moving or Adding files
- Ignore Certain Files
- Branches
- Check the Status of Your Changes
- Stash Branches
- Cherry Pick Changes from Branches
- Find version that Introduced a bug using Binary Search