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

Commit

Permalink
02.01.00 jitpack (#14)
Browse files Browse the repository at this point in the history
* fixed imports

* Update pom.xml

Co-authored-by: Katsute <Katsute@users.noreply.github.com>
  • Loading branch information
Katsute and Katsute authored Mar 25, 2020
1 parent abd5ed6 commit b8986ef
Show file tree
Hide file tree
Showing 22 changed files with 88 additions and 34 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ out
src/LICENSE.txt
src/_ignore
# Gradle
.gradle
.gradle
# Maven
target
54 changes: 53 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,59 @@
<modelVersion>4.0.0</modelVersion>

<groupId>com.kttdevelopment</groupId>
<artifactId>httpserver</artifactId>
<artifactId>simplehttpserver</artifactId>
<version>DEVELOPMENT</version>
<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.6.1</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>11</source>
<target>11</target>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ktt.lib.httpserver;
package com.kttdevelopment.simplehttpserver;

import java.util.HashMap;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ktt.lib.httpserver;
package com.kttdevelopment.simplehttpserver;

import java.util.UUID;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ktt.lib.httpserver;
package com.kttdevelopment.simplehttpserver;

import java.text.SimpleDateFormat;
import java.util.Date;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ktt.lib.httpserver;
package com.kttdevelopment.simplehttpserver;

import com.sun.net.httpserver.*;
import ktt.lib.httpserver.var.HttpCode;
import ktt.lib.httpserver.var.RequestMethod;
import com.kttdevelopment.simplehttpserver.var.HttpCode;
import com.kttdevelopment.simplehttpserver.var.RequestMethod;

import java.io.IOException;
import java.net.InetSocketAddress;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ktt.lib.httpserver;
package com.kttdevelopment.simplehttpserver;

/**
* Before each request is processed, the authenticator determines whether to cancel the request or not. The authenticator may also choose to process the request ahead of the handler. By default it returns true.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ktt.lib.httpserver;
package com.kttdevelopment.simplehttpserver;

import com.sun.net.httpserver.*;
import ktt.lib.httpserver.var.*;
import com.kttdevelopment.simplehttpserver.var.*;

import java.io.*;
import java.net.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ktt.lib.httpserver;
package com.kttdevelopment.simplehttpserver;

import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpHandler;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ktt.lib.httpserver;
package com.kttdevelopment.simplehttpserver;

import com.sun.net.httpserver.HttpHandler;
import com.sun.net.httpserver.HttpServer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ktt.lib.httpserver;
package com.kttdevelopment.simplehttpserver;

import com.sun.net.httpserver.*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ktt.lib.httpserver.handler;
package com.kttdevelopment.simplehttpserver.handler;

import java.io.*;
import java.nio.file.Files;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ktt.lib.httpserver.handler;
package com.kttdevelopment.simplehttpserver.handler;

import java.io.File;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ktt.lib.httpserver.handler;
package com.kttdevelopment.simplehttpserver.handler;

import java.io.*;
import java.nio.file.Files;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ktt.lib.httpserver.handler;
package com.kttdevelopment.simplehttpserver.handler;

import ktt.lib.httpserver.var.HttpCode;
import ktt.lib.httpserver.SimpleHttpExchange;
import ktt.lib.httpserver.SimpleHttpHandler;
import com.kttdevelopment.simplehttpserver.var.HttpCode;
import com.kttdevelopment.simplehttpserver.SimpleHttpExchange;
import com.kttdevelopment.simplehttpserver.SimpleHttpHandler;

import java.io.*;
import java.nio.file.Files;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ktt.lib.httpserver.handler;
package com.kttdevelopment.simplehttpserver.handler;

/**
* This interface determines the file name and bytes to use when adding to {@link FileHandler}. Not intended for directories.<br>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ktt.lib.httpserver.handler;
package com.kttdevelopment.simplehttpserver.handler;

import java.io.File;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ktt.lib.httpserver.handler;
package com.kttdevelopment.simplehttpserver.handler;

import com.sun.net.httpserver.HttpHandler;
import ktt.lib.httpserver.SimpleHttpExchange;
import ktt.lib.httpserver.SimpleHttpHandler;
import com.kttdevelopment.simplehttpserver.SimpleHttpExchange;
import com.kttdevelopment.simplehttpserver.SimpleHttpHandler;

import java.io.IOException;
import java.util.function.Predicate;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ktt.lib.httpserver.handler;
package com.kttdevelopment.simplehttpserver.handler;

import ktt.lib.httpserver.var.HttpCode;
import ktt.lib.httpserver.SimpleHttpExchange;
import ktt.lib.httpserver.SimpleHttpHandler;
import com.kttdevelopment.simplehttpserver.var.HttpCode;
import com.kttdevelopment.simplehttpserver.SimpleHttpExchange;
import com.kttdevelopment.simplehttpserver.SimpleHttpHandler;

import java.io.IOException;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ktt.lib.httpserver.handler;
package com.kttdevelopment.simplehttpserver.handler;

import com.sun.net.httpserver.HttpHandler;
import ktt.lib.httpserver.SimpleHttpHandler;
import com.kttdevelopment.simplehttpserver.SimpleHttpHandler;

/**
* By default the {@link com.sun.net.httpserver.HttpServer} will use the most specific context for requests; this however causes the context <code>/</code> to catch all contexts without an associated handler, instead of sending a 404 or no response. This workaround will process requests at <code>/</code> only and send all other requests to a different handler (typically a 404 page will be set here).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ktt.lib.httpserver.var;
package com.kttdevelopment.simplehttpserver.var;

/**
* A list of expected HTTP status codes.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ktt.lib.httpserver.var;
package com.kttdevelopment.simplehttpserver.var;

/**
* A list of expected HTTP method requests.
Expand Down

0 comments on commit b8986ef

Please sign in to comment.