Programming Tips - How I can use Apache Ant to restart a service?

Date: 2014dec22 Product: ant Language: Java, xml OS: Linux Distro: RedHat/Fedora/CentOS Q. How I can use Apache Ant to restart a service? A. Use exec like this:
<exec executable="systemctl"> <arg value="restart"/> <arg value="myservice"/> <!-- replace with the service you want to restart --> </exec>