Skip to content

Commit 7fabd00

Browse files
committed
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
1 parent efedd6d commit 7fabd00

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+135
-106
lines changed

pom.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ Supported protocols include: Echo, Finger, FTP, NNTP, NTP, POP3(S), SMTP(S), Tel
232232
<artifactId>maven-jar-plugin</artifactId>
233233
<configuration>
234234
<excludes>
235-
<exclude>examples/**</exclude>
235+
<exclude>**/examples/**</exclude>
236236
</excludes>
237237
</configuration>
238238
</plugin>
@@ -243,7 +243,7 @@ Supported protocols include: Echo, Finger, FTP, NNTP, NTP, POP3(S), SMTP(S), Tel
243243
<artifactId>maven-source-plugin</artifactId>
244244
<configuration>
245245
<excludes>
246-
<exclude>examples/**</exclude>
246+
<exclude>**/examples/**</exclude>
247247
</excludes>
248248
</configuration>
249249
</plugin>
@@ -309,11 +309,11 @@ Supported protocols include: Echo, Finger, FTP, NNTP, NTP, POP3(S), SMTP(S), Tel
309309
<attribute name="X-Compile-Source-JDK" value="${maven.compiler.source}" />
310310
<attribute name="X-Compile-Target-JDK" value="${maven.compiler.target}" />
311311
<!-- Helper application -->
312-
<attribute name="Main-Class" value="examples/Main" />
312+
<attribute name="Main-Class" value="org/apache/commons/net/examples/Main" />
313313
<!-- Allow java -jar examples.jar to work -->
314314
<attribute name="Class-Path" value="commons-net-${project.version}.jar" />
315315
</manifest>
316-
<fileset dir="target/classes" includes="examples/**" />
316+
<fileset dir="target/classes" includes="**/examples/**" />
317317
</jar>
318318
</target>
319319
</configuration>
@@ -358,7 +358,7 @@ Supported protocols include: Echo, Finger, FTP, NNTP, NTP, POP3(S), SMTP(S), Tel
358358
<groupId>org.apache.maven.plugins</groupId>
359359
<artifactId>maven-javadoc-plugin</artifactId>
360360
<configuration>
361-
<excludePackageNames>examples.*</excludePackageNames>
361+
<excludePackageNames>*.examples.*</excludePackageNames>
362362
</configuration>
363363
</plugin>
364364

@@ -376,7 +376,7 @@ Supported protocols include: Echo, Finger, FTP, NNTP, NTP, POP3(S), SMTP(S), Tel
376376
<outputDirectory>${basedir}/target/site/examples</outputDirectory>
377377
<resources>
378378
<resource>
379-
<directory>src/main/java/examples</directory>
379+
<directory>src/main/java/org/apache/commons/net/examples</directory>
380380
<excludes>
381381
<exclude>**/Main.java</exclude>
382382
</excludes>
@@ -403,7 +403,7 @@ Supported protocols include: Echo, Finger, FTP, NNTP, NTP, POP3(S), SMTP(S), Tel
403403
<artifactId>clirr-maven-plugin</artifactId>
404404
<configuration>
405405
<excludes>
406-
<exclude>examples/**</exclude>
406+
<exclude>**/examples/**</exclude>
407407
</excludes>
408408
</configuration>
409409
</plugin>
@@ -426,7 +426,7 @@ Supported protocols include: Echo, Finger, FTP, NNTP, NTP, POP3(S), SMTP(S), Tel
426426
</execution>
427427
</executions>
428428
<configuration>
429-
<mainClass>examples.Main</mainClass>
429+
<mainClass>org.apache.commons.net.examples.Main</mainClass>
430430
</configuration>
431431
</plugin>
432432

@@ -464,7 +464,7 @@ Supported protocols include: Echo, Finger, FTP, NNTP, NTP, POP3(S), SMTP(S), Tel
464464
<artifactId>clirr-maven-plugin</artifactId>
465465
<configuration>
466466
<excludes>
467-
<exclude>examples/**</exclude>
467+
<exclude>**/examples/**</exclude>
468468
</excludes>
469469
</configuration>
470470
</plugin>
@@ -473,7 +473,7 @@ Supported protocols include: Echo, Finger, FTP, NNTP, NTP, POP3(S), SMTP(S), Tel
473473
<groupId>org.apache.maven.plugins</groupId>
474474
<artifactId>maven-javadoc-plugin</artifactId>
475475
<configuration>
476-
<excludePackageNames>examples.*</excludePackageNames>
476+
<excludePackageNames>*.examples.*</excludePackageNames>
477477
</configuration>
478478
</plugin>
479479

src/assembly/bin.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ Licensed to the Apache Software Foundation (ASF) under one or more
6565
</fileSet>
6666
<!-- Include example sources for developers -->
6767
<fileSet>
68-
<directory>src/main/java/examples</directory>
69-
<outputDirectory>examples</outputDirectory>
68+
<directory>src/main/java/org/apache/commons/net/examples</directory>
69+
<outputDirectory>org/apache/commons/net/examples</outputDirectory>
7070
<includes>
7171
<include>**/*</include>
7272
</includes>

src/changes/changes.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,13 @@ This is mainly a bug-fix release. See further details below.
7070
This release is binary compatible with previous releases.
7171
However it is not source compatible with releases before 3.4, as some methods were added to the interface NtpV3Packet in 3.4
7272
73+
Note that the examples packages were moved under org/apache/commons/net/examples.
74+
The examples are not part of the public API, so this does not affect compatibility.
75+
7376
">
77+
<action issue="NET-636" type="fix" dev="sebb">
78+
examples should be in org.apache.commons.net subpackage
79+
</action>
7480
<action issue="NET-634" type="add" dev="sebb" due-to="Mauro Molinari">
7581
Add SIZE command support
7682
</action>

src/main/java/examples/Main.java renamed to src/main/java/org/apache/commons/net/examples/Main.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
*/
1818

19-
package examples;
19+
package org.apache.commons.net.examples;
2020

2121
import java.io.InputStream;
2222
import java.lang.reflect.InvocationTargetException;

src/main/java/examples/cidr/SubnetUtilsExample.java renamed to src/main/java/org/apache/commons/net/examples/cidr/SubnetUtilsExample.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package examples.cidr;
17+
package org.apache.commons.net.examples.cidr;
1818

1919
import java.util.Arrays;
2020
import java.util.Scanner;

src/main/java/examples/ftp/FTPClientExample.java renamed to src/main/java/org/apache/commons/net/examples/ftp/FTPClientExample.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
package examples.ftp;
18+
package org.apache.commons.net.examples.ftp;
1919

2020
import java.io.FileInputStream;
2121
import java.io.FileOutputStream;

src/main/java/examples/ftp/ServerToServerFTP.java renamed to src/main/java/org/apache/commons/net/examples/ftp/ServerToServerFTP.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
package examples.ftp;
18+
package org.apache.commons.net.examples.ftp;
1919

2020
import java.io.IOException;
2121
import java.io.PrintWriter;

src/main/java/examples/ftp/TFTPExample.java renamed to src/main/java/org/apache/commons/net/examples/ftp/TFTPExample.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
package examples.ftp;
18+
package org.apache.commons.net.examples.ftp;
1919

2020
import java.io.Closeable;
2121
import java.io.File;

src/main/java/examples/mail/IMAPExportMbox.java renamed to src/main/java/org/apache/commons/net/examples/mail/IMAPExportMbox.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
package examples.mail;
18+
package org.apache.commons.net.examples.mail;
1919

2020
import java.io.BufferedWriter;
2121
import java.io.File;

src/main/java/examples/mail/IMAPImportMbox.java renamed to src/main/java/org/apache/commons/net/examples/mail/IMAPImportMbox.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
package examples.mail;
18+
package org.apache.commons.net.examples.mail;
1919

2020
import java.io.BufferedReader;
2121
import java.io.File;

src/main/java/examples/mail/IMAPMail.java renamed to src/main/java/org/apache/commons/net/examples/mail/IMAPMail.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
package examples.mail;
18+
package org.apache.commons.net.examples.mail;
1919

2020
import java.io.IOException;
2121
import java.net.URI;

src/main/java/examples/mail/IMAPUtils.java renamed to src/main/java/org/apache/commons/net/examples/mail/IMAPUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
package examples.mail;
18+
package org.apache.commons.net.examples.mail;
1919

2020
import java.io.IOException;
2121
import java.net.URI;

src/main/java/examples/mail/POP3ExportMbox.java renamed to src/main/java/org/apache/commons/net/examples/mail/POP3ExportMbox.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
package examples.mail;
18+
package org.apache.commons.net.examples.mail;
1919

2020
import java.io.BufferedReader;
2121
import java.io.File;

src/main/java/examples/mail/POP3Mail.java renamed to src/main/java/org/apache/commons/net/examples/mail/POP3Mail.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
package examples.mail;
18+
package org.apache.commons.net.examples.mail;
1919

2020
import java.io.BufferedReader;
2121
import java.io.IOException;

src/main/java/examples/mail/SMTPMail.java renamed to src/main/java/org/apache/commons/net/examples/mail/SMTPMail.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
package examples.mail;
18+
package org.apache.commons.net.examples.mail;
1919

2020
import java.io.BufferedReader;
2121
import java.io.FileNotFoundException;

src/main/java/examples/mail/Utils.java renamed to src/main/java/org/apache/commons/net/examples/mail/Utils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
package examples.mail;
18+
package org.apache.commons.net.examples.mail;
1919

2020
import java.io.BufferedReader;
2121
import java.io.Console;

src/main/java/examples/nntp/ArticleReader.java renamed to src/main/java/org/apache/commons/net/examples/nntp/ArticleReader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
package examples.nntp;
18+
package org.apache.commons.net.examples.nntp;
1919

2020
import java.io.BufferedReader;
2121
import java.io.IOException;

src/main/java/examples/nntp/ExtendedNNTPOps.java renamed to src/main/java/org/apache/commons/net/examples/nntp/ExtendedNNTPOps.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
package examples.nntp;
18+
package org.apache.commons.net.examples.nntp;
1919

2020
import java.io.IOException;
2121
import java.io.PrintWriter;

src/main/java/examples/nntp/ListNewsgroups.java renamed to src/main/java/org/apache/commons/net/examples/nntp/ListNewsgroups.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
package examples.nntp;
18+
package org.apache.commons.net.examples.nntp;
1919

2020
import java.io.IOException;
2121
import org.apache.commons.net.nntp.NNTPClient;

src/main/java/examples/nntp/MessageThreading.java renamed to src/main/java/org/apache/commons/net/examples/nntp/MessageThreading.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717

1818

19-
package examples.nntp;
19+
package org.apache.commons.net.examples.nntp;
2020

2121
import java.io.IOException;
2222
import java.io.PrintWriter;

src/main/java/examples/nntp/NNTPUtils.java renamed to src/main/java/org/apache/commons/net/examples/nntp/NNTPUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package examples.nntp;
17+
package org.apache.commons.net.examples.nntp;
1818

1919
import java.io.IOException;
2020
import java.util.ArrayList;

src/main/java/examples/nntp/PostMessage.java renamed to src/main/java/org/apache/commons/net/examples/nntp/PostMessage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
package examples.nntp;
18+
package org.apache.commons.net.examples.nntp;
1919

2020
import java.io.BufferedReader;
2121
import java.io.FileNotFoundException;

src/main/java/examples/ntp/NTPClient.java renamed to src/main/java/org/apache/commons/net/examples/ntp/NTPClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package examples.ntp;
1+
package org.apache.commons.net.examples.ntp;
22
/*
33
* Licensed to the Apache Software Foundation (ASF) under one or more
44
* contributor license agreements. See the NOTICE file distributed with

src/main/java/examples/ntp/SimpleNTPServer.java renamed to src/main/java/org/apache/commons/net/examples/ntp/SimpleNTPServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package examples.ntp;
17+
package org.apache.commons.net.examples.ntp;
1818

1919
import org.apache.commons.net.ntp.NtpUtils;
2020
import org.apache.commons.net.ntp.NtpV3Impl;

src/main/java/examples/ntp/TimeClient.java renamed to src/main/java/org/apache/commons/net/examples/ntp/TimeClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package examples.ntp;
1+
package org.apache.commons.net.examples.ntp;
22

33
/*
44
* Licensed to the Apache Software Foundation (ASF) under one or more
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
/**
19+
* Example classes.
20+
* <p>
21+
* <b>These do not form part of the public API and may change without notice.</b>
22+
*/
23+
package org.apache.commons.net.examples;

src/main/java/examples/telnet/TelnetClientExample.java renamed to src/main/java/org/apache/commons/net/examples/telnet/TelnetClientExample.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
package examples.telnet;
18+
package org.apache.commons.net.examples.telnet;
1919

2020
import java.io.IOException;
2121
import java.io.InputStream;

src/main/java/examples/telnet/WeatherTelnet.java renamed to src/main/java/org/apache/commons/net/examples/telnet/WeatherTelnet.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
* limitations under the License.
1616
*/
1717

18-
package examples.telnet;
18+
package org.apache.commons.net.examples.telnet;
1919

2020
import java.io.IOException;
2121
import org.apache.commons.net.telnet.TelnetClient;
2222

23-
import examples.util.IOUtil;
23+
import org.apache.commons.net.examples.util.IOUtil;
2424

2525
/***
2626
* This is an example of a trivial use of the TelnetClient class.

src/main/java/examples/unix/chargen.java renamed to src/main/java/org/apache/commons/net/examples/unix/chargen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
package examples.unix;
18+
package org.apache.commons.net.examples.unix;
1919

2020
import java.io.BufferedReader;
2121
import java.io.IOException;

src/main/java/examples/unix/daytime.java renamed to src/main/java/org/apache/commons/net/examples/unix/daytime.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
package examples.unix;
18+
package org.apache.commons.net.examples.unix;
1919

2020
import java.io.IOException;
2121
import java.net.InetAddress;

src/main/java/examples/unix/echo.java renamed to src/main/java/org/apache/commons/net/examples/unix/echo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
package examples.unix;
18+
package org.apache.commons.net.examples.unix;
1919

2020
import java.io.BufferedReader;
2121
import java.io.IOException;

src/main/java/examples/unix/finger.java renamed to src/main/java/org/apache/commons/net/examples/unix/finger.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
package examples.unix;
18+
package org.apache.commons.net.examples.unix;
1919

2020
import java.io.IOException;
2121
import java.net.InetAddress;

src/main/java/examples/unix/fwhois.java renamed to src/main/java/org/apache/commons/net/examples/unix/fwhois.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
package examples.unix;
18+
package org.apache.commons.net.examples.unix;
1919

2020
import java.io.IOException;
2121
import java.net.InetAddress;

0 commit comments

Comments
 (0)