NET-636 examples should be in org.apache.commons.net subpackage

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/net/trunk@1792230 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/pom.xml b/pom.xml
index 8865897..7e76799 100644
--- a/pom.xml
+++ b/pom.xml
@@ -232,7 +232,7 @@
                 <artifactId>maven-jar-plugin</artifactId>
                 <configuration>
                     <excludes>
-                        <exclude>examples/**</exclude>
+                        <exclude>**/examples/**</exclude>
                     </excludes>
                 </configuration>
             </plugin>
@@ -243,7 +243,7 @@
                 <artifactId>maven-source-plugin</artifactId>
                 <configuration>
                     <excludes>
-                        <exclude>examples/**</exclude>
+                        <exclude>**/examples/**</exclude>
                     </excludes>
                 </configuration>
             </plugin>
@@ -309,11 +309,11 @@
                                         <attribute name="X-Compile-Source-JDK" value="${maven.compiler.source}" />
                                         <attribute name="X-Compile-Target-JDK" value="${maven.compiler.target}" />
                                         <!-- Helper application -->
-                                        <attribute name="Main-Class" value="examples/Main" />
+                                        <attribute name="Main-Class" value="org/apache/commons/net/examples/Main" />
                                         <!-- Allow java -jar examples.jar to work -->
                                         <attribute name="Class-Path" value="commons-net-${project.version}.jar" />
                                     </manifest>
-                                    <fileset dir="target/classes" includes="examples/**" />
+                                    <fileset dir="target/classes" includes="**/examples/**" />
                                 </jar>
                             </target>
                         </configuration>
@@ -358,7 +358,7 @@
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-javadoc-plugin</artifactId>
                 <configuration>
-                    <excludePackageNames>examples.*</excludePackageNames>
+                    <excludePackageNames>*.examples.*</excludePackageNames>
                 </configuration>
             </plugin>
 
@@ -376,7 +376,7 @@
                     <outputDirectory>${basedir}/target/site/examples</outputDirectory>
                     <resources>
                       <resource>
-                        <directory>src/main/java/examples</directory>
+                        <directory>src/main/java/org/apache/commons/net/examples</directory>
                         <excludes>
                           <exclude>**/Main.java</exclude>
                         </excludes>
@@ -403,7 +403,7 @@
               <artifactId>clirr-maven-plugin</artifactId>
               <configuration>
                   <excludes>
-                    <exclude>examples/**</exclude>
+                    <exclude>**/examples/**</exclude>
                   </excludes>
               </configuration>
           </plugin>
@@ -426,7 +426,7 @@
           </execution>
         </executions>
         <configuration>
-          <mainClass>examples.Main</mainClass>
+          <mainClass>org.apache.commons.net.examples.Main</mainClass>
         </configuration>
       </plugin>
 
@@ -464,7 +464,7 @@
                 <artifactId>clirr-maven-plugin</artifactId>
                 <configuration>
                     <excludes>
-                      <exclude>examples/**</exclude>
+                      <exclude>**/examples/**</exclude>
                     </excludes>
                 </configuration>
             </plugin>
@@ -473,7 +473,7 @@
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-javadoc-plugin</artifactId>
                 <configuration>
-                    <excludePackageNames>examples.*</excludePackageNames>
+                    <excludePackageNames>*.examples.*</excludePackageNames>
                 </configuration>
             </plugin>
 
diff --git a/src/assembly/bin.xml b/src/assembly/bin.xml
index a804909..2576fe1 100644
--- a/src/assembly/bin.xml
+++ b/src/assembly/bin.xml
@@ -65,8 +65,8 @@
         </fileSet>
         <!-- Include example sources for developers -->
         <fileSet>
-            <directory>src/main/java/examples</directory>
-            <outputDirectory>examples</outputDirectory>
+            <directory>src/main/java/org/apache/commons/net/examples</directory>
+            <outputDirectory>org/apache/commons/net/examples</outputDirectory>
             <includes>
                 <include>**/*</include>
             </includes>
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 3fb6fcf..54e7c0a 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -70,7 +70,13 @@
  This release is binary compatible with previous releases.
  However it is not source compatible with releases before 3.4, as some methods were added to the interface NtpV3Packet in 3.4
 
+ Note that the examples packages were moved under org/apache/commons/net/examples.
+ The examples are not part of the public API, so this does not affect compatibility.
+
 ">
+            <action issue="NET-636" type="fix" dev="sebb">
+            examples should be in org.apache.commons.net subpackage
+            </action>
             <action issue="NET-634" type="add" dev="sebb" due-to="Mauro Molinari">
             Add SIZE command support
             </action>
diff --git a/src/main/java/examples/Main.java b/src/main/java/org/apache/commons/net/examples/Main.java
similarity index 98%
rename from src/main/java/examples/Main.java
rename to src/main/java/org/apache/commons/net/examples/Main.java
index b327b85..dd2fb84 100644
--- a/src/main/java/examples/Main.java
+++ b/src/main/java/org/apache/commons/net/examples/Main.java
@@ -16,7 +16,7 @@
  *
  */
 
-package examples;
+package org.apache.commons.net.examples;
 
 import java.io.InputStream;
 import java.lang.reflect.InvocationTargetException;
diff --git a/src/main/java/examples/cidr/SubnetUtilsExample.java b/src/main/java/org/apache/commons/net/examples/cidr/SubnetUtilsExample.java
similarity index 98%
rename from src/main/java/examples/cidr/SubnetUtilsExample.java
rename to src/main/java/org/apache/commons/net/examples/cidr/SubnetUtilsExample.java
index 4c322cb..c12b649 100644
--- a/src/main/java/examples/cidr/SubnetUtilsExample.java
+++ b/src/main/java/org/apache/commons/net/examples/cidr/SubnetUtilsExample.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package examples.cidr;
+package org.apache.commons.net.examples.cidr;
 
 import java.util.Arrays;
 import java.util.Scanner;
diff --git a/src/main/java/examples/ftp/FTPClientExample.java b/src/main/java/org/apache/commons/net/examples/ftp/FTPClientExample.java
similarity index 99%
rename from src/main/java/examples/ftp/FTPClientExample.java
rename to src/main/java/org/apache/commons/net/examples/ftp/FTPClientExample.java
index 60ef851..0bfd7e7 100644
--- a/src/main/java/examples/ftp/FTPClientExample.java
+++ b/src/main/java/org/apache/commons/net/examples/ftp/FTPClientExample.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package examples.ftp;
+package org.apache.commons.net.examples.ftp;
 
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
diff --git a/src/main/java/examples/ftp/ServerToServerFTP.java b/src/main/java/org/apache/commons/net/examples/ftp/ServerToServerFTP.java
similarity index 99%
rename from src/main/java/examples/ftp/ServerToServerFTP.java
rename to src/main/java/org/apache/commons/net/examples/ftp/ServerToServerFTP.java
index 1d8ca1a..7258b67 100644
--- a/src/main/java/examples/ftp/ServerToServerFTP.java
+++ b/src/main/java/org/apache/commons/net/examples/ftp/ServerToServerFTP.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package examples.ftp;
+package org.apache.commons.net.examples.ftp;
 
 import java.io.IOException;
 import java.io.PrintWriter;
diff --git a/src/main/java/examples/ftp/TFTPExample.java b/src/main/java/org/apache/commons/net/examples/ftp/TFTPExample.java
similarity index 99%
rename from src/main/java/examples/ftp/TFTPExample.java
rename to src/main/java/org/apache/commons/net/examples/ftp/TFTPExample.java
index b4b4782..a69b59f 100644
--- a/src/main/java/examples/ftp/TFTPExample.java
+++ b/src/main/java/org/apache/commons/net/examples/ftp/TFTPExample.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package examples.ftp;
+package org.apache.commons.net.examples.ftp;
 
 import java.io.Closeable;
 import java.io.File;
diff --git a/src/main/java/examples/mail/IMAPExportMbox.java b/src/main/java/org/apache/commons/net/examples/mail/IMAPExportMbox.java
similarity index 99%
rename from src/main/java/examples/mail/IMAPExportMbox.java
rename to src/main/java/org/apache/commons/net/examples/mail/IMAPExportMbox.java
index a35a354..74067ad 100644
--- a/src/main/java/examples/mail/IMAPExportMbox.java
+++ b/src/main/java/org/apache/commons/net/examples/mail/IMAPExportMbox.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package examples.mail;
+package org.apache.commons.net.examples.mail;
 
 import java.io.BufferedWriter;
 import java.io.File;
diff --git a/src/main/java/examples/mail/IMAPImportMbox.java b/src/main/java/org/apache/commons/net/examples/mail/IMAPImportMbox.java
similarity index 99%
rename from src/main/java/examples/mail/IMAPImportMbox.java
rename to src/main/java/org/apache/commons/net/examples/mail/IMAPImportMbox.java
index 3dca79b..6c689da 100644
--- a/src/main/java/examples/mail/IMAPImportMbox.java
+++ b/src/main/java/org/apache/commons/net/examples/mail/IMAPImportMbox.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package examples.mail;
+package org.apache.commons.net.examples.mail;
 
 import java.io.BufferedReader;
 import java.io.File;
diff --git a/src/main/java/examples/mail/IMAPMail.java b/src/main/java/org/apache/commons/net/examples/mail/IMAPMail.java
similarity index 97%
rename from src/main/java/examples/mail/IMAPMail.java
rename to src/main/java/org/apache/commons/net/examples/mail/IMAPMail.java
index 986c612..d1f3995 100644
--- a/src/main/java/examples/mail/IMAPMail.java
+++ b/src/main/java/org/apache/commons/net/examples/mail/IMAPMail.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package examples.mail;
+package org.apache.commons.net.examples.mail;
 
 import java.io.IOException;
 import java.net.URI;
diff --git a/src/main/java/examples/mail/IMAPUtils.java b/src/main/java/org/apache/commons/net/examples/mail/IMAPUtils.java
similarity index 98%
rename from src/main/java/examples/mail/IMAPUtils.java
rename to src/main/java/org/apache/commons/net/examples/mail/IMAPUtils.java
index 49740c8..8c06dff 100644
--- a/src/main/java/examples/mail/IMAPUtils.java
+++ b/src/main/java/org/apache/commons/net/examples/mail/IMAPUtils.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package examples.mail;
+package org.apache.commons.net.examples.mail;
 
 import java.io.IOException;
 import java.net.URI;
diff --git a/src/main/java/examples/mail/POP3ExportMbox.java b/src/main/java/org/apache/commons/net/examples/mail/POP3ExportMbox.java
similarity index 98%
rename from src/main/java/examples/mail/POP3ExportMbox.java
rename to src/main/java/org/apache/commons/net/examples/mail/POP3ExportMbox.java
index 5d493d1..577b062 100644
--- a/src/main/java/examples/mail/POP3ExportMbox.java
+++ b/src/main/java/org/apache/commons/net/examples/mail/POP3ExportMbox.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package examples.mail;
+package org.apache.commons.net.examples.mail;
 
 import java.io.BufferedReader;
 import java.io.File;
diff --git a/src/main/java/examples/mail/POP3Mail.java b/src/main/java/org/apache/commons/net/examples/mail/POP3Mail.java
similarity index 98%
rename from src/main/java/examples/mail/POP3Mail.java
rename to src/main/java/org/apache/commons/net/examples/mail/POP3Mail.java
index 413c598..27f8448 100644
--- a/src/main/java/examples/mail/POP3Mail.java
+++ b/src/main/java/org/apache/commons/net/examples/mail/POP3Mail.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package examples.mail;
+package org.apache.commons.net.examples.mail;
 
 import java.io.BufferedReader;
 import java.io.IOException;
diff --git a/src/main/java/examples/mail/SMTPMail.java b/src/main/java/org/apache/commons/net/examples/mail/SMTPMail.java
similarity index 98%
rename from src/main/java/examples/mail/SMTPMail.java
rename to src/main/java/org/apache/commons/net/examples/mail/SMTPMail.java
index 7c01607..eb9702a 100644
--- a/src/main/java/examples/mail/SMTPMail.java
+++ b/src/main/java/org/apache/commons/net/examples/mail/SMTPMail.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package examples.mail;
+package org.apache.commons.net.examples.mail;
 
 import java.io.BufferedReader;
 import java.io.FileNotFoundException;
diff --git a/src/main/java/examples/mail/Utils.java b/src/main/java/org/apache/commons/net/examples/mail/Utils.java
similarity index 97%
rename from src/main/java/examples/mail/Utils.java
rename to src/main/java/org/apache/commons/net/examples/mail/Utils.java
index 500eb58..d4c6bca 100644
--- a/src/main/java/examples/mail/Utils.java
+++ b/src/main/java/org/apache/commons/net/examples/mail/Utils.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package examples.mail;
+package org.apache.commons.net.examples.mail;
 
 import java.io.BufferedReader;
 import java.io.Console;
diff --git a/src/main/java/examples/nntp/ArticleReader.java b/src/main/java/org/apache/commons/net/examples/nntp/ArticleReader.java
similarity index 98%
rename from src/main/java/examples/nntp/ArticleReader.java
rename to src/main/java/org/apache/commons/net/examples/nntp/ArticleReader.java
index ba53e2a..7145877 100644
--- a/src/main/java/examples/nntp/ArticleReader.java
+++ b/src/main/java/org/apache/commons/net/examples/nntp/ArticleReader.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package examples.nntp;
+package org.apache.commons.net.examples.nntp;
 
 import java.io.BufferedReader;
 import java.io.IOException;
diff --git a/src/main/java/examples/nntp/ExtendedNNTPOps.java b/src/main/java/org/apache/commons/net/examples/nntp/ExtendedNNTPOps.java
similarity index 98%
rename from src/main/java/examples/nntp/ExtendedNNTPOps.java
rename to src/main/java/org/apache/commons/net/examples/nntp/ExtendedNNTPOps.java
index 9ba51bf..0835f83 100644
--- a/src/main/java/examples/nntp/ExtendedNNTPOps.java
+++ b/src/main/java/org/apache/commons/net/examples/nntp/ExtendedNNTPOps.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package examples.nntp;
+package org.apache.commons.net.examples.nntp;
 
 import java.io.IOException;
 import java.io.PrintWriter;
diff --git a/src/main/java/examples/nntp/ListNewsgroups.java b/src/main/java/org/apache/commons/net/examples/nntp/ListNewsgroups.java
similarity index 97%
rename from src/main/java/examples/nntp/ListNewsgroups.java
rename to src/main/java/org/apache/commons/net/examples/nntp/ListNewsgroups.java
index bc133bb..2c0cc22 100644
--- a/src/main/java/examples/nntp/ListNewsgroups.java
+++ b/src/main/java/org/apache/commons/net/examples/nntp/ListNewsgroups.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package examples.nntp;
+package org.apache.commons.net.examples.nntp;
 
 import java.io.IOException;
 import org.apache.commons.net.nntp.NNTPClient;
diff --git a/src/main/java/examples/nntp/MessageThreading.java b/src/main/java/org/apache/commons/net/examples/nntp/MessageThreading.java
similarity index 98%
rename from src/main/java/examples/nntp/MessageThreading.java
rename to src/main/java/org/apache/commons/net/examples/nntp/MessageThreading.java
index f1414a0..e8aae1f 100644
--- a/src/main/java/examples/nntp/MessageThreading.java
+++ b/src/main/java/org/apache/commons/net/examples/nntp/MessageThreading.java
@@ -16,7 +16,7 @@
  */
 
 
-package examples.nntp;
+package org.apache.commons.net.examples.nntp;
 
 import java.io.IOException;
 import java.io.PrintWriter;
diff --git a/src/main/java/examples/nntp/NNTPUtils.java b/src/main/java/org/apache/commons/net/examples/nntp/NNTPUtils.java
similarity index 97%
rename from src/main/java/examples/nntp/NNTPUtils.java
rename to src/main/java/org/apache/commons/net/examples/nntp/NNTPUtils.java
index 07053ff..a1f8afb 100644
--- a/src/main/java/examples/nntp/NNTPUtils.java
+++ b/src/main/java/org/apache/commons/net/examples/nntp/NNTPUtils.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package examples.nntp;
+package org.apache.commons.net.examples.nntp;
 
 import java.io.IOException;
 import java.util.ArrayList;
diff --git a/src/main/java/examples/nntp/PostMessage.java b/src/main/java/org/apache/commons/net/examples/nntp/PostMessage.java
similarity index 98%
rename from src/main/java/examples/nntp/PostMessage.java
rename to src/main/java/org/apache/commons/net/examples/nntp/PostMessage.java
index c9583c5..7a23ce1 100644
--- a/src/main/java/examples/nntp/PostMessage.java
+++ b/src/main/java/org/apache/commons/net/examples/nntp/PostMessage.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package examples.nntp;
+package org.apache.commons.net.examples.nntp;
 
 import java.io.BufferedReader;
 import java.io.FileNotFoundException;
diff --git a/src/main/java/examples/ntp/NTPClient.java b/src/main/java/org/apache/commons/net/examples/ntp/NTPClient.java
similarity index 99%
rename from src/main/java/examples/ntp/NTPClient.java
rename to src/main/java/org/apache/commons/net/examples/ntp/NTPClient.java
index f8b699d..4ff4a38 100644
--- a/src/main/java/examples/ntp/NTPClient.java
+++ b/src/main/java/org/apache/commons/net/examples/ntp/NTPClient.java
@@ -1,4 +1,4 @@
-package examples.ntp;
+package org.apache.commons.net.examples.ntp;
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
diff --git a/src/main/java/examples/ntp/SimpleNTPServer.java b/src/main/java/org/apache/commons/net/examples/ntp/SimpleNTPServer.java
similarity index 99%
rename from src/main/java/examples/ntp/SimpleNTPServer.java
rename to src/main/java/org/apache/commons/net/examples/ntp/SimpleNTPServer.java
index bf04df4..561b212 100644
--- a/src/main/java/examples/ntp/SimpleNTPServer.java
+++ b/src/main/java/org/apache/commons/net/examples/ntp/SimpleNTPServer.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package examples.ntp;
+package org.apache.commons.net.examples.ntp;
 
 import org.apache.commons.net.ntp.NtpUtils;
 import org.apache.commons.net.ntp.NtpV3Impl;
diff --git a/src/main/java/examples/ntp/TimeClient.java b/src/main/java/org/apache/commons/net/examples/ntp/TimeClient.java
similarity index 98%
rename from src/main/java/examples/ntp/TimeClient.java
rename to src/main/java/org/apache/commons/net/examples/ntp/TimeClient.java
index d355ca5..df079a9 100644
--- a/src/main/java/examples/ntp/TimeClient.java
+++ b/src/main/java/org/apache/commons/net/examples/ntp/TimeClient.java
@@ -1,4 +1,4 @@
-package examples.ntp;
+package org.apache.commons.net.examples.ntp;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
diff --git a/src/main/java/org/apache/commons/net/examples/package-info.java b/src/main/java/org/apache/commons/net/examples/package-info.java
new file mode 100644
index 0000000..520014c
--- /dev/null
+++ b/src/main/java/org/apache/commons/net/examples/package-info.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Example classes.
+ * <p>
+ * <b>These do not form part of the public API and may change without notice.</b>
+ */
+package org.apache.commons.net.examples;
\ No newline at end of file
diff --git a/src/main/java/examples/telnet/TelnetClientExample.java b/src/main/java/org/apache/commons/net/examples/telnet/TelnetClientExample.java
similarity index 99%
rename from src/main/java/examples/telnet/TelnetClientExample.java
rename to src/main/java/org/apache/commons/net/examples/telnet/TelnetClientExample.java
index 365dd01..420592c 100644
--- a/src/main/java/examples/telnet/TelnetClientExample.java
+++ b/src/main/java/org/apache/commons/net/examples/telnet/TelnetClientExample.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package examples.telnet;
+package org.apache.commons.net.examples.telnet;
 
 import java.io.IOException;
 import java.io.InputStream;
diff --git a/src/main/java/examples/telnet/WeatherTelnet.java b/src/main/java/org/apache/commons/net/examples/telnet/WeatherTelnet.java
similarity index 95%
rename from src/main/java/examples/telnet/WeatherTelnet.java
rename to src/main/java/org/apache/commons/net/examples/telnet/WeatherTelnet.java
index 3da7194..3e4c560 100644
--- a/src/main/java/examples/telnet/WeatherTelnet.java
+++ b/src/main/java/org/apache/commons/net/examples/telnet/WeatherTelnet.java
@@ -15,12 +15,12 @@
  * limitations under the License.
  */
 
-package examples.telnet;
+package org.apache.commons.net.examples.telnet;
 
 import java.io.IOException;
 import org.apache.commons.net.telnet.TelnetClient;
 
-import examples.util.IOUtil;
+import org.apache.commons.net.examples.util.IOUtil;
 
 /***
  * This is an example of a trivial use of the TelnetClient class.
diff --git a/src/main/java/examples/unix/chargen.java b/src/main/java/org/apache/commons/net/examples/unix/chargen.java
similarity index 98%
rename from src/main/java/examples/unix/chargen.java
rename to src/main/java/org/apache/commons/net/examples/unix/chargen.java
index 2d0076e..6d62479 100644
--- a/src/main/java/examples/unix/chargen.java
+++ b/src/main/java/org/apache/commons/net/examples/unix/chargen.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package examples.unix;
+package org.apache.commons.net.examples.unix;
 
 import java.io.BufferedReader;
 import java.io.IOException;
diff --git a/src/main/java/examples/unix/daytime.java b/src/main/java/org/apache/commons/net/examples/unix/daytime.java
similarity index 98%
rename from src/main/java/examples/unix/daytime.java
rename to src/main/java/org/apache/commons/net/examples/unix/daytime.java
index 2a72d15..6da7d7d 100644
--- a/src/main/java/examples/unix/daytime.java
+++ b/src/main/java/org/apache/commons/net/examples/unix/daytime.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package examples.unix;
+package org.apache.commons.net.examples.unix;
 
 import java.io.IOException;
 import java.net.InetAddress;
diff --git a/src/main/java/examples/unix/echo.java b/src/main/java/org/apache/commons/net/examples/unix/echo.java
similarity index 98%
rename from src/main/java/examples/unix/echo.java
rename to src/main/java/org/apache/commons/net/examples/unix/echo.java
index 8824c77..c514932 100644
--- a/src/main/java/examples/unix/echo.java
+++ b/src/main/java/org/apache/commons/net/examples/unix/echo.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package examples.unix;
+package org.apache.commons.net.examples.unix;
 
 import java.io.BufferedReader;
 import java.io.IOException;
diff --git a/src/main/java/examples/unix/finger.java b/src/main/java/org/apache/commons/net/examples/unix/finger.java
similarity index 98%
rename from src/main/java/examples/unix/finger.java
rename to src/main/java/org/apache/commons/net/examples/unix/finger.java
index dc85468..b7dc2c8 100644
--- a/src/main/java/examples/unix/finger.java
+++ b/src/main/java/org/apache/commons/net/examples/unix/finger.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package examples.unix;
+package org.apache.commons.net.examples.unix;
 
 import java.io.IOException;
 import java.net.InetAddress;
diff --git a/src/main/java/examples/unix/fwhois.java b/src/main/java/org/apache/commons/net/examples/unix/fwhois.java
similarity index 97%
rename from src/main/java/examples/unix/fwhois.java
rename to src/main/java/org/apache/commons/net/examples/unix/fwhois.java
index b1436fb..4b6d1e1 100644
--- a/src/main/java/examples/unix/fwhois.java
+++ b/src/main/java/org/apache/commons/net/examples/unix/fwhois.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package examples.unix;
+package org.apache.commons.net.examples.unix;
 
 import java.io.IOException;
 import java.net.InetAddress;
diff --git a/src/main/java/examples/unix/rdate.java b/src/main/java/org/apache/commons/net/examples/unix/rdate.java
similarity index 98%
rename from src/main/java/examples/unix/rdate.java
rename to src/main/java/org/apache/commons/net/examples/unix/rdate.java
index b8bc257..ab6e708 100644
--- a/src/main/java/examples/unix/rdate.java
+++ b/src/main/java/org/apache/commons/net/examples/unix/rdate.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package examples.unix;
+package org.apache.commons.net.examples.unix;
 
 import java.io.IOException;
 import java.net.InetAddress;
diff --git a/src/main/java/examples/unix/rexec.java b/src/main/java/org/apache/commons/net/examples/unix/rexec.java
similarity index 96%
rename from src/main/java/examples/unix/rexec.java
rename to src/main/java/org/apache/commons/net/examples/unix/rexec.java
index 56b583d..5b32465 100644
--- a/src/main/java/examples/unix/rexec.java
+++ b/src/main/java/org/apache/commons/net/examples/unix/rexec.java
@@ -15,12 +15,12 @@
  * limitations under the License.
  */
 
-package examples.unix;
+package org.apache.commons.net.examples.unix;
 
 import java.io.IOException;
 import org.apache.commons.net.bsd.RExecClient;
 
-import examples.util.IOUtil;
+import org.apache.commons.net.examples.util.IOUtil;
 
 /***
  * This is an example program demonstrating how to use the RExecClient class.
diff --git a/src/main/java/examples/unix/rlogin.java b/src/main/java/org/apache/commons/net/examples/unix/rlogin.java
similarity index 97%
rename from src/main/java/examples/unix/rlogin.java
rename to src/main/java/org/apache/commons/net/examples/unix/rlogin.java
index b6b8ea2..4247d4a 100644
--- a/src/main/java/examples/unix/rlogin.java
+++ b/src/main/java/org/apache/commons/net/examples/unix/rlogin.java
@@ -15,12 +15,12 @@
  * limitations under the License.
  */
 
-package examples.unix;
+package org.apache.commons.net.examples.unix;
 
 import java.io.IOException;
 import org.apache.commons.net.bsd.RLoginClient;
 
-import examples.util.IOUtil;
+import org.apache.commons.net.examples.util.IOUtil;
 
 /***
  * This is an example program demonstrating how to use the RLoginClient
diff --git a/src/main/java/examples/unix/rshell.java b/src/main/java/org/apache/commons/net/examples/unix/rshell.java
similarity index 96%
rename from src/main/java/examples/unix/rshell.java
rename to src/main/java/org/apache/commons/net/examples/unix/rshell.java
index 5a959b2..862a9ea 100644
--- a/src/main/java/examples/unix/rshell.java
+++ b/src/main/java/org/apache/commons/net/examples/unix/rshell.java
@@ -15,12 +15,12 @@
  * limitations under the License.
  */
 
-package examples.unix;
+package org.apache.commons.net.examples.unix;
 
 import java.io.IOException;
 import org.apache.commons.net.bsd.RCommandClient;
 
-import examples.util.IOUtil;
+import org.apache.commons.net.examples.util.IOUtil;
 
 /***
  * This is an example program demonstrating how to use the RCommandClient
diff --git a/src/main/java/examples/util/IOUtil.java b/src/main/java/org/apache/commons/net/examples/util/IOUtil.java
similarity index 98%
rename from src/main/java/examples/util/IOUtil.java
rename to src/main/java/org/apache/commons/net/examples/util/IOUtil.java
index cc3257c..cedbb95 100644
--- a/src/main/java/examples/util/IOUtil.java
+++ b/src/main/java/org/apache/commons/net/examples/util/IOUtil.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package examples.util;
+package org.apache.commons.net.examples.util;
 
 import java.io.IOException;
 import java.io.InputStream;
diff --git a/src/main/resources/examples/examples.properties b/src/main/resources/examples/examples.properties
deleted file mode 100644
index 2c7b7a5..0000000
--- a/src/main/resources/examples/examples.properties
+++ /dev/null
@@ -1,52 +0,0 @@
-################################################################################
-# Apache Commons Net Examples Property file
-################################################################################
-
-##   Licensed to the Apache Software Foundation (ASF) under one or more
-##   contributor license agreements.  See the NOTICE file distributed with
-##   this work for additional information regarding copyright ownership.
-##   The ASF licenses this file to You under the Apache License, Version 2.0
-##   (the "License"); you may not use this file except in compliance with
-##   the License.  You may obtain a copy of the License at
-## 
-##       http://www.apache.org/licenses/LICENSE-2.0
-## 
-##   Unless required by applicable law or agreed to in writing, software
-##   distributed under the License is distributed on an "AS IS" BASIS,
-##   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-##   See the License for the specific language governing permissions and
-##   limitations under the License.
-
-# List of aliases for example class names.
-# Note that the "/" separators are converted to "."
-
-#  alias                  full class name
-SubnetUtilsExample        examples/cidr/SubnetUtilsExample
-FTPClientExample          examples/ftp/FTPClientExample
-ServerToServerFTP         examples/ftp/ServerToServerFTP
-TFTPExample               examples/ftp/TFTPExample
-IMAPExportMbox            examples/mail/IMAPExportMbox
-IMAPImportMbox            examples/mail/IMAPImportMbox
-IMAPMail                  examples/mail/IMAPMail
-POP3ExportMbox            examples/mail/POP3ExportMbox
-POP3Mail                  examples/mail/POP3Mail
-SMTPMail                  examples/mail/SMTPMail
-ArticleReader             examples/nntp/ArticleReader
-ExtendedNNTPOps           examples/nntp/ExtendedNNTPOps
-ListNewsgroups            examples/nntp/ListNewsgroups
-MessageThreading          examples/nntp/MessageThreading
-PostMessage               examples/nntp/PostMessage
-NTPClient                 examples/ntp/NTPClient
-SimpleNTPServer           examples/ntp/SimpleNTPServer
-TimeClient                examples/ntp/TimeClient
-TelnetClientExample       examples/telnet/TelnetClientExample
-WeatherTelnet             examples/telnet/WeatherTelnet
-chargen                   examples/unix/chargen
-daytime                   examples/unix/daytime
-echo                      examples/unix/echo
-finger                    examples/unix/finger
-fwhois                    examples/unix/fwhois
-rdate                     examples/unix/rdate
-rexec                     examples/unix/rexec
-rlogin                    examples/unix/rlogin
-rshell                    examples/unix/rshell
diff --git a/src/main/resources/org/apache/commons/net/examples/examples.properties b/src/main/resources/org/apache/commons/net/examples/examples.properties
new file mode 100644
index 0000000..a77c827
--- /dev/null
+++ b/src/main/resources/org/apache/commons/net/examples/examples.properties
@@ -0,0 +1,52 @@
+################################################################################
+# Apache Commons Net Examples Property file
+################################################################################
+
+##   Licensed to the Apache Software Foundation (ASF) under one or more
+##   contributor license agreements.  See the NOTICE file distributed with
+##   this work for additional information regarding copyright ownership.
+##   The ASF licenses this file to You under the Apache License, Version 2.0
+##   (the "License"); you may not use this file except in compliance with
+##   the License.  You may obtain a copy of the License at
+## 
+##       http://www.apache.org/licenses/LICENSE-2.0
+## 
+##   Unless required by applicable law or agreed to in writing, software
+##   distributed under the License is distributed on an "AS IS" BASIS,
+##   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+##   See the License for the specific language governing permissions and
+##   limitations under the License.
+
+# List of aliases for example class names.
+# Note that the "/" separators are converted to "."
+
+#  alias                  full class name
+SubnetUtilsExample        org/apache/commons/net/examples/cidr/SubnetUtilsExample
+FTPClientExample          org/apache/commons/net/examples/ftp/FTPClientExample
+ServerToServerFTP         org/apache/commons/net/examples/ftp/ServerToServerFTP
+TFTPExample               org/apache/commons/net/examples/ftp/TFTPExample
+IMAPExportMbox            org/apache/commons/net/examples/mail/IMAPExportMbox
+IMAPImportMbox            org/apache/commons/net/examples/mail/IMAPImportMbox
+IMAPMail                  org/apache/commons/net/examples/mail/IMAPMail
+POP3ExportMbox            org/apache/commons/net/examples/mail/POP3ExportMbox
+POP3Mail                  org/apache/commons/net/examples/mail/POP3Mail
+SMTPMail                  org/apache/commons/net/examples/mail/SMTPMail
+ArticleReader             org/apache/commons/net/examples/nntp/ArticleReader
+ExtendedNNTPOps           org/apache/commons/net/examples/nntp/ExtendedNNTPOps
+ListNewsgroups            org/apache/commons/net/examples/nntp/ListNewsgroups
+MessageThreading          org/apache/commons/net/examples/nntp/MessageThreading
+PostMessage               org/apache/commons/net/examples/nntp/PostMessage
+NTPClient                 org/apache/commons/net/examples/ntp/NTPClient
+SimpleNTPServer           org/apache/commons/net/examples/ntp/SimpleNTPServer
+TimeClient                org/apache/commons/net/examples/ntp/TimeClient
+TelnetClientExample       org/apache/commons/net/examples/telnet/TelnetClientExample
+WeatherTelnet             org/apache/commons/net/examples/telnet/WeatherTelnet
+chargen                   org/apache/commons/net/examples/unix/chargen
+daytime                   org/apache/commons/net/examples/unix/daytime
+echo                      org/apache/commons/net/examples/unix/echo
+finger                    org/apache/commons/net/examples/unix/finger
+fwhois                    org/apache/commons/net/examples/unix/fwhois
+rdate                     org/apache/commons/net/examples/unix/rdate
+rexec                     org/apache/commons/net/examples/unix/rexec
+rlogin                    org/apache/commons/net/examples/unix/rlogin
+rshell                    org/apache/commons/net/examples/unix/rshell
diff --git a/src/test/java/examples/MainTest.java b/src/test/java/org/apache/commons/net/examples/MainTest.java
similarity index 93%
rename from src/test/java/examples/MainTest.java
rename to src/test/java/org/apache/commons/net/examples/MainTest.java
index 8e86eae..45c4904 100644
--- a/src/test/java/examples/MainTest.java
+++ b/src/test/java/org/apache/commons/net/examples/MainTest.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package examples;
+package org.apache.commons.net.examples;
 
 import static org.junit.Assert.fail;
 
@@ -66,7 +66,7 @@
             }
             jf.close();
         } else {
-            File examples = new File(sourceFile, "examples"); // must match top level examples package name
+            File examples = new File(sourceFile, "org/apache/commons/net/examples"); // must match top level examples package name
             if (examples.exists()) {
                 scanForClasses(sourceFile.length(), examples, p);
             } else {
@@ -89,7 +89,7 @@
     private static void processFileName(String name, Properties p) {
         if (!name.endsWith(".class")
                 || name.contains("$") // subclasses
-                || name.equals("examples/Main.class")  // the initial class, don't want to add that
+                || name.endsWith("examples/Main.class")  // the initial class, don't want to add that
                 || !hasMainMethod(name)
                 ) {
             return;
diff --git a/src/test/java/org/apache/commons/net/ntp/TestNtpClient.java b/src/test/java/org/apache/commons/net/ntp/TestNtpClient.java
index a3cfd41..3268392 100644
--- a/src/test/java/org/apache/commons/net/ntp/TestNtpClient.java
+++ b/src/test/java/org/apache/commons/net/ntp/TestNtpClient.java
@@ -21,7 +21,7 @@
 import org.junit.Assert;
 import org.junit.Test;
 
-import examples.ntp.SimpleNTPServer;
+import org.apache.commons.net.examples.ntp.SimpleNTPServer;
 
 import java.io.IOException;
 import java.net.InetAddress;