To use Commons Net in a Maven 2 project, add the following
dependency to your project's pom.xml
:
Example 10.3. Adding a Dependency on Commons Net
<dependency> <groupId>commons-net</groupId> <artifactId>commons-net</artifactId> <version>2.0</version> </dependency>
If you are not sure what this means, I'd suggest reading Maven: The Definitive
Guide. When you depend on a library in Maven 2, all you need to
do is add the dependency groupId
,
artifactId
, and version
to your
project's dependencies. Once you do this, Maven 2 will download the
dependency and make it available on your project's classpath.
Commons Net contains some simple clients for commonly used network
protocols, such as FTP, TFTP, Telnet, NNTP, POP3, and SMTP. Protocols
are supported by collections of classes in packages dedicated to these
protocols. For example, FTP is supported by a set of classes in the
org.apache.commons.net.ftp
package,
including FTPClient
and FTPFile
; and SMTP is supported by classes in
the org.apache.commons.net.smtp
package, including SMTPClient
.
For more information about Commons Net, see the Commons Net project page at http://commons.apache.org/net.