Skip to content
This repository was archived by the owner on Jul 31, 2022. It is now read-only.

Commit b564272

Browse files
authored
Merge pull request #98 from Ktt-Development/modular@a5c6648
Convert simplehttpserver to modular project
2 parents a5c6648 + 9890334 commit b564272

29 files changed

+48
-45
lines changed

pom.xml

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,48 +6,40 @@
66

77
<properties>
88
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
9-
10-
<github.organization>Ktt-Development</github.organization>
11-
12-
<github.repository>simplehttpserver</github.repository>
13-
<github.repository.license>GPL-2</github.repository.license>
14-
<github.repository.head>main</github.repository.head>
15-
16-
<github.username>Katsute</github.username>
179
</properties>
1810

1911
<groupId>com.kttdevelopment</groupId>
2012
<artifactId>simplehttpserver</artifactId>
21-
<version>03.06.05</version>
13+
<version>4.0.0</version>
2214

2315
<name>simplehttpserver</name>
2416
<description>📕 SimpleHttpServer :: Simplified implementation of the sun http server :: Simplified handlers to execute complex operations</description>
25-
<url>https://github.com/${github.organization}/${github.repository}</url>
17+
<url>https://github.com/Ktt-Development/simplehttpserver</url>
2618

2719
<licenses>
2820
<license>
29-
<name>${github.repository.license}</name>
21+
<name>GPL-2</name>
3022
<distribution>repo</distribution>
31-
<url>https://github.com/${github.organization}/${github.repository}/blob/${github.repository.head}/LICENSE</url>
23+
<url>https://github.com/Ktt-Development/simplehttpserver/blob/main/LICENSE</url>
3224
</license>
3325
</licenses>
3426

3527
<developers>
3628
<developer>
37-
<name>${github.username}</name>
29+
<name>Katsute</name>
3830
<roles>
3931
<role>developer</role>
4032
</roles>
41-
<url>https://github.com/${github.username}</url>
42-
<organization>${github.organization}</organization>
43-
<organizationUrl>https://github.com/${github.organization}</organizationUrl>
33+
<url>https://github.com/Katsute</url>
34+
<organization>Ktt-Development</organization>
35+
<organizationUrl>https://github.com/Ktt-Development</organizationUrl>
4436
</developer>
4537
</developers>
4638

4739
<scm>
48-
<url>https://github.com/${github.organization}/${github.repository}.git</url>
49-
<connection>scm:git:[email protected]:${github.organization}/${github.repository}.git</connection>
50-
<developerConnection>scm:git:[email protected]:${github.organization}/${github.repository}.git</developerConnection>
40+
<url>https://github.com/Ktt-Development/simplehttpserver.git</url>
41+
<connection>scm:git:[email protected]:Ktt-Development/simplehttpserver.git</connection>
42+
<developerConnection>scm:git:[email protected]:Ktt-Development/simplehttpserver.git</developerConnection>
5143
<tag>HEAD</tag>
5244
</scm>
5345

src/main/java/module-info.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module simplehttpserver {
2+
3+
requires jdk.httpserver;
4+
requires java.net.http; // test requirement
5+
exports com.kttdevelopment.simplehttpserver.handler;
6+
exports com.kttdevelopment.simplehttpserver.var;
7+
exports com.kttdevelopment.simplehttpserver;
8+
9+
}

src/test/java/ContextUtilTests.java renamed to src/test/java/com/kttdevelopment/simplehttpserver/ContextUtilTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
package com.kttdevelopment.simplehttpserver;
2+
13
import com.kttdevelopment.simplehttpserver.ContextUtil;
24
import org.junit.Assert;
35
import org.junit.Test;

src/test/java/handlers/PredicateHandlerTests.java renamed to src/test/java/com/kttdevelopment/simplehttpserver/handlers/PredicateHandlerTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package handlers;
1+
package com.kttdevelopment.simplehttpserver.handlers;
22

33
import com.kttdevelopment.simplehttpserver.SimpleHttpHandler;
44
import com.kttdevelopment.simplehttpserver.SimpleHttpServer;

src/test/java/handlers/RedirectHandlerTests.java renamed to src/test/java/com/kttdevelopment/simplehttpserver/handlers/RedirectHandlerTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package handlers;
1+
package com.kttdevelopment.simplehttpserver.handlers;
22

33
import com.kttdevelopment.simplehttpserver.*;
44
import com.kttdevelopment.simplehttpserver.handler.RedirectHandler;

src/test/java/handlers/SSEHandlerTests.java renamed to src/test/java/com/kttdevelopment/simplehttpserver/handlers/SSEHandlerTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package handlers;
1+
package com.kttdevelopment.simplehttpserver.handlers;
22

33
import com.kttdevelopment.simplehttpserver.SimpleHttpServer;
44
import com.kttdevelopment.simplehttpserver.handler.SSEHandler;

src/test/java/handlers/file/FileHandlerAddDirTest.java renamed to src/test/java/com/kttdevelopment/simplehttpserver/handlers/file/FileHandlerAddDirTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package handlers.file;
1+
package com.kttdevelopment.simplehttpserver.handlers.file;
22

33
import com.kttdevelopment.core.tests.TestUtil;
44
import com.kttdevelopment.simplehttpserver.SimpleHttpServer;

src/test/java/handlers/file/FileHandlerAddFilesTest.java renamed to src/test/java/com/kttdevelopment/simplehttpserver/handlers/file/FileHandlerAddFilesTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package handlers.file;
1+
package com.kttdevelopment.simplehttpserver.handlers.file;
22

33
import com.kttdevelopment.core.tests.TestUtil;
44
import com.kttdevelopment.simplehttpserver.SimpleHttpServer;

src/test/java/handlers/file/FileHandlerAddTest.java renamed to src/test/java/com/kttdevelopment/simplehttpserver/handlers/file/FileHandlerAddTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package handlers.file;
1+
package com.kttdevelopment.simplehttpserver.handlers.file;
22

33
import com.kttdevelopment.core.tests.TestUtil;
44
import com.kttdevelopment.simplehttpserver.SimpleHttpServer;

src/test/java/handlers/file/FileHandlerNoWalkTest.java renamed to src/test/java/com/kttdevelopment/simplehttpserver/handlers/file/FileHandlerNoWalkTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package handlers.file;
1+
package com.kttdevelopment.simplehttpserver.handlers.file;
22

33
import com.kttdevelopment.core.tests.TestUtil;
44
import com.kttdevelopment.simplehttpserver.SimpleHttpServer;

src/test/java/handlers/file/FileHandlerWalkTest.java renamed to src/test/java/com/kttdevelopment/simplehttpserver/handlers/file/FileHandlerWalkTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package handlers.file;
1+
package com.kttdevelopment.simplehttpserver.handlers.file;
22

33
import com.kttdevelopment.core.tests.TestUtil;
44
import com.kttdevelopment.simplehttpserver.SimpleHttpServer;

src/test/java/handlers/predicate/RootHandlerTest.java renamed to src/test/java/com/kttdevelopment/simplehttpserver/handlers/predicate/RootHandlerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package handlers.predicate;
1+
package com.kttdevelopment.simplehttpserver.handlers.predicate;
22

33
import com.kttdevelopment.simplehttpserver.SimpleHttpHandler;
44
import com.kttdevelopment.simplehttpserver.SimpleHttpServer;

src/test/java/handlers/temporary/TemporaryFirstTest.java renamed to src/test/java/com/kttdevelopment/simplehttpserver/handlers/temporary/TemporaryFirstTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package handlers.temporary;
1+
package com.kttdevelopment.simplehttpserver.handlers.temporary;
22

33
import com.kttdevelopment.simplehttpserver.*;
44
import com.kttdevelopment.simplehttpserver.handler.TemporaryHandler;

src/test/java/handlers/temporary/TemporaryTimeTest.java renamed to src/test/java/com/kttdevelopment/simplehttpserver/handlers/temporary/TemporaryTimeTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package handlers.temporary;
1+
package com.kttdevelopment.simplehttpserver.handlers.temporary;
22

33
import com.kttdevelopment.simplehttpserver.*;
44
import com.kttdevelopment.simplehttpserver.handler.TemporaryHandler;

src/test/java/handlers/throttler/ExchangeThrottlerTest.java renamed to src/test/java/com/kttdevelopment/simplehttpserver/handlers/throttler/ExchangeThrottlerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package handlers.throttler;
1+
package com.kttdevelopment.simplehttpserver.handlers.throttler;
22

33
import com.kttdevelopment.simplehttpserver.SimpleHttpHandler;
44
import com.kttdevelopment.simplehttpserver.SimpleHttpServer;

src/test/java/handlers/throttler/ServerExchangeThrottlerTest.java renamed to src/test/java/com/kttdevelopment/simplehttpserver/handlers/throttler/ServerExchangeThrottlerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package handlers.throttler;
1+
package com.kttdevelopment.simplehttpserver.handlers.throttler;
22

33
import com.kttdevelopment.simplehttpserver.*;
44
import com.kttdevelopment.simplehttpserver.handler.*;

src/test/java/handlers/throttler/ServerSessionThrottlerTest.java renamed to src/test/java/com/kttdevelopment/simplehttpserver/handlers/throttler/ServerSessionThrottlerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package handlers.throttler;
1+
package com.kttdevelopment.simplehttpserver.handlers.throttler;
22

33
import com.kttdevelopment.simplehttpserver.*;
44
import com.kttdevelopment.simplehttpserver.handler.ServerSessionThrottler;

src/test/java/handlers/throttler/SessionThrottlerTest.java renamed to src/test/java/com/kttdevelopment/simplehttpserver/handlers/throttler/SessionThrottlerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package handlers.throttler;
1+
package com.kttdevelopment.simplehttpserver.handlers.throttler;
22

33
import com.kttdevelopment.simplehttpserver.*;
44
import com.kttdevelopment.simplehttpserver.handler.SessionThrottler;

src/test/java/simplehttpexchange/SimpleHttpExchangeCookieSessionTests.java renamed to src/test/java/com/kttdevelopment/simplehttpserver/simplehttpexchange/SimpleHttpExchangeCookieSessionTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package simplehttpexchange;
1+
package com.kttdevelopment.simplehttpserver.simplehttpexchange;
22

33
import com.kttdevelopment.simplehttpserver.*;
44
import com.sun.net.httpserver.HttpContext;

src/test/java/simplehttpexchange/SimpleHttpExchangeReadTests.java renamed to src/test/java/com/kttdevelopment/simplehttpserver/simplehttpexchange/SimpleHttpExchangeReadTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package simplehttpexchange;
1+
package com.kttdevelopment.simplehttpserver.simplehttpexchange;
22

33
import com.kttdevelopment.simplehttpserver.*;
44
import com.kttdevelopment.simplehttpserver.var.HttpCode;

src/test/java/simplehttpexchange/io/SimpleHttpExchangeGetTest.java renamed to src/test/java/com/kttdevelopment/simplehttpserver/simplehttpexchange/io/SimpleHttpExchangeGetTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package simplehttpexchange.io;
1+
package com.kttdevelopment.simplehttpserver.simplehttpexchange.io;
22

33
import com.kttdevelopment.simplehttpserver.*;
44
import com.kttdevelopment.simplehttpserver.var.RequestMethod;

src/test/java/simplehttpexchange/io/SimpleHttpExchangeMultipartFormTest.java renamed to src/test/java/com/kttdevelopment/simplehttpserver/simplehttpexchange/io/SimpleHttpExchangeMultipartFormTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package simplehttpexchange.io;
1+
package com.kttdevelopment.simplehttpserver.simplehttpexchange.io;
22

33
import com.kttdevelopment.simplehttpserver.*;
44
import com.kttdevelopment.simplehttpserver.var.RequestMethod;

src/test/java/simplehttpexchange/io/SimpleHttpExchangePostTest.java renamed to src/test/java/com/kttdevelopment/simplehttpserver/simplehttpexchange/io/SimpleHttpExchangePostTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package simplehttpexchange.io;
1+
package com.kttdevelopment.simplehttpserver.simplehttpexchange.io;
22

33
import com.kttdevelopment.simplehttpserver.*;
44
import com.kttdevelopment.simplehttpserver.var.RequestMethod;

src/test/java/simplehttpserver/SimpleHttpServerContextTests.java renamed to src/test/java/com/kttdevelopment/simplehttpserver/simplehttpserver/SimpleHttpServerContextTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package simplehttpserver;
1+
package com.kttdevelopment.simplehttpserver.simplehttpserver;
22

33
import com.kttdevelopment.simplehttpserver.*;
44
import com.kttdevelopment.simplehttpserver.handler.RootHandler;

src/test/java/simplehttpserver/SimpleHttpServerGetTests.java renamed to src/test/java/com/kttdevelopment/simplehttpserver/simplehttpserver/SimpleHttpServerGetTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package simplehttpserver;
1+
package com.kttdevelopment.simplehttpserver.simplehttpserver;
22

33
import com.kttdevelopment.simplehttpserver.SimpleHttpServer;
44
import org.junit.Assert;

src/test/java/simplehttpserver/bind/SimpleHttpServerBindOccupiedTests.java renamed to src/test/java/com/kttdevelopment/simplehttpserver/simplehttpserver/bind/SimpleHttpServerBindOccupiedTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package simplehttpserver.bind;
1+
package com.kttdevelopment.simplehttpserver.simplehttpserver.bind;
22

33
import com.kttdevelopment.simplehttpserver.SimpleHttpServer;
44
import org.junit.*;

src/test/java/simplehttpserver/bind/SimpleHttpServerBindRangeTest.java renamed to src/test/java/com/kttdevelopment/simplehttpserver/simplehttpserver/bind/SimpleHttpServerBindRangeTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package simplehttpserver.bind;
1+
package com.kttdevelopment.simplehttpserver.simplehttpserver.bind;
22

33
import com.kttdevelopment.simplehttpserver.SimpleHttpServer;
44
import org.junit.Assert;

src/test/java/simplehttpserver/create/SimpleHttpServerCreateTest.java renamed to src/test/java/com/kttdevelopment/simplehttpserver/simplehttpserver/create/SimpleHttpServerCreateTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package simplehttpserver.create;
1+
package com.kttdevelopment.simplehttpserver.simplehttpserver.create;
22

33
import com.kttdevelopment.simplehttpserver.SimpleHttpServer;
44
import org.junit.Assert;

src/test/java/simplehttpserver/create/SimpleHttpsServerCreateTest.java renamed to src/test/java/com/kttdevelopment/simplehttpserver/simplehttpserver/create/SimpleHttpsServerCreateTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package simplehttpserver.create;
1+
package com.kttdevelopment.simplehttpserver.simplehttpserver.create;
22

33
import com.kttdevelopment.simplehttpserver.SimpleHttpsServer;
44
import org.junit.Assert;

0 commit comments

Comments
 (0)