I have an ant script which produces a custom version of tomcat for use on my servers. This ant script does the following:
- unzip a pristine copy of a tomcat .zip file
- delete a bunch of files that are not used
- Add a bunch of jars to the tomcat\lib folder like database drivers and others
- zip it all back up into a zip file
I noticed that there is an ant run plugin for maven at http://maven.apache.org/plugins/maven-antrun-plugin/ but the documentation indicates that this ant run plugin should be used sparingly.
What maven plugins are available for doing basic file io operations such as copy, unzip, delete, rename, move, zip, ... etc?
For unzipping a file the best solution is to use the maven-dependency-plugin furthermore for packaging an archive like zip you can use the maven-assembly-plugin
There are some plugins as others have mentioned, but the whole point of maven is that you shouldn't need those basic file operations. Maven operates on a higher level of abstraction, and stuff like having jars in the lib folder etc should be handled through module dependencies, and not with explicit copy tasks.
If you want to stick to lower level "basic file operations", ant is better bet than maven. Maven is designed to get rid of those operations as much as possible by rethinking your approach.
If you already have an ant script that works, don't waste your time rewriting it. Just use the antrun plugin. Like eis says, Maven operates at a higher level, so usually you shouldn't need to muck about with files.