How to add the dependency of the Apache Commons IO library in the pom.xml file in a Java project? My Project is using the maven for dependency management and compilation of the code.
The Apache Commons IO library is a set of package library which is used to provide the various IO functionality in a Java based application. This library is developed and maintained by the Apache foundation a name of the library indicated. Following functionality is provided by the library:
Utility Library for common functionality - The Utility library of the Apache commons provides the static method for performing the common IO tasks in a Java program.
Classes for reading from Input stream.
Classes for writing to the Output stream
Various types of filters implementation classes
Many implementation of the java.util.Comparator for easing the programming tasks
There various implementations of java.util.Comparator for files
There is also a File Monitor components for handling the events of the file systems in java program
So there many uses of the Apache Commons IO library.
You can use the following code to included the library in maven based project:
<dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-io</artifactId> <version>1.3.2</version> </dependency>
Following code is for using it in Ivy:
<dependency org="org.apache.commons" name="commons-io" rev="1.3.2"/>
@Grapes( @Grab(group='org.apache.commons', module='commons-io', version='1.3.2') )
libraryDependencies += "org.apache.commons" % "commons-io" % "1.3.2"
Learn maven at RoseIndia.net Maven Tutorial.