File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes Uninstalling with ANT's RPM target Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Uninstalling with ANT Watch "Uninstalling with ANT New topic
Author

Uninstalling with ANT's RPM target

Fawad Ali
Ranch Hand

Joined: Dec 28, 2009
Posts: 112
Hi All,
Can we uninstall a package from an ant's script. If yes, how?


Regards, Fawad Ali.
Software Engineer, Stafona Inc. - My Blog
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

http://ant.apache.org/manual/Tasks/rpm.html lists the capabilities.


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Fawad Ali
Ranch Hand

Joined: Dec 28, 2009
Posts: 112
Hi Verburg,
Thanks. Actually I have seen that page earlier. There is a task named "command". That seems helpful to me. But the thing is that we need to include the spec file in each step as it is mandatory. That is kind of a problem. Because I want to have two tasks in ant file
1)ant install from spec file
2)Ant uninstall by simply running the Linux's rpm -e foobar command.
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

You can use Ant's exec task to execute commands on the command line
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15639
    
  15

Don't confuse the "rpm" command with the "rpmbuild" command. Unless at long last they finally laid it to rest, the official RPM docs say that the command to build RPMs is "rpm -ba" and that hasn't been the case for years.

To create an RPM, use Ant's rpmbuild task. To install, update, validate or remove an RPM, use the OS "rpm" command via Ant's exec task.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Uninstalling with ANT's RPM target
 
Similar Threads
Ant Manual
the system cannot find the path specified
Do not want to print all the message on console
[ant] copy, creating directories as needed
Ant script execution fails