aspose 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
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: 16250
    
  21

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.
 
 
subject: Uninstalling with ANT's RPM target