From 3e9156b0e472e8380191c4e6b8f100565756cc8f Mon Sep 17 00:00:00 2001 From: RISHABH JOSHI Date: Mon, 18 May 2020 19:28:29 +0530 Subject: [PATCH] Remove unused handler --- README.adoc | 11 ++++++----- .../java/com/github/rishabh9/kumoru/MainVerticle.java | 11 +++++------ .../rishabh9/kumoru/handlers/IndexSearchHandler.java | 9 --------- 3 files changed, 11 insertions(+), 20 deletions(-) delete mode 100644 src/main/java/com/github/rishabh9/kumoru/handlers/IndexSearchHandler.java diff --git a/README.adoc b/README.adoc index 94ff4c3..107578b 100644 --- a/README.adoc +++ b/README.adoc @@ -5,13 +5,14 @@ image:https://img.shields.io/badge/vert.x-3.9.0-purple.svg[link="https://vertx.i A minimal implementation of Nexus repository to practice Vert.x == Features -.Mirrors -* [x] Mirror Maven 2. -* [x] Mirror JCenter. -* [x] Mirror Jitpack. + +.Mirrors the following repositories: +* [x] Maven 2. +* [x] JCenter. +* [x] Jitpack. .Snapshots -* [ ] Enable snapshots. +* [x] Enable snapshots. .Publishing artifacts * [ ] Publish artifacts to Kumoru. (_Contemplating_) diff --git a/src/main/java/com/github/rishabh9/kumoru/MainVerticle.java b/src/main/java/com/github/rishabh9/kumoru/MainVerticle.java index b5a239b..8dc86a6 100644 --- a/src/main/java/com/github/rishabh9/kumoru/MainVerticle.java +++ b/src/main/java/com/github/rishabh9/kumoru/MainVerticle.java @@ -1,7 +1,6 @@ package com.github.rishabh9.kumoru; import com.github.rishabh9.kumoru.handlers.FinalHandler; -import com.github.rishabh9.kumoru.handlers.IndexSearchHandler; import com.github.rishabh9.kumoru.handlers.JCenterMirrorHandler; import com.github.rishabh9.kumoru.handlers.JitPackMirrorHandler; import com.github.rishabh9.kumoru.handlers.LocalResourceHandler; @@ -34,9 +33,8 @@ public void start(final Promise startFuture) { final MavenMirrorHandler mavenMirror = new MavenMirrorHandler(vertx); final JCenterMirrorHandler jcenterMirror = new JCenterMirrorHandler(vertx); final JitPackMirrorHandler jitPackMirror = new JitPackMirrorHandler(vertx); - final FinalHandler finalHandler = new FinalHandler(); - final IndexSearchHandler searchHandler = new IndexSearchHandler(); final SendFileHandler sendFileHandler = new SendFileHandler(); + final FinalHandler finalHandler = new FinalHandler(); final Router router = Router.router(vertx); // for all routes do @@ -45,8 +43,6 @@ public void start(final Promise startFuture) { route.handler(LoggerHandler.create(LoggerFormat.DEFAULT)); } route.handler(validRequestHandler); - // for HEAD method do - router.head().handler(searchHandler).handler(finalHandler); // for GET method do router .get() @@ -66,7 +62,10 @@ public void start(final Promise startFuture) { asyncResult -> { if (asyncResult.succeeded()) { startFuture.complete(); - log.info("Kumoru server started on port {}", port); + log.info( + "Kumoru server [v{}] started on port {}", + VersionProperties.INSTANCE.getVersion(), + port); } else { startFuture.fail(asyncResult.cause()); } diff --git a/src/main/java/com/github/rishabh9/kumoru/handlers/IndexSearchHandler.java b/src/main/java/com/github/rishabh9/kumoru/handlers/IndexSearchHandler.java deleted file mode 100644 index 1064ab5..0000000 --- a/src/main/java/com/github/rishabh9/kumoru/handlers/IndexSearchHandler.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.github.rishabh9.kumoru.handlers; - -import io.vertx.ext.web.RoutingContext; - -public class IndexSearchHandler extends KumoruHandler { - - @Override - public void handle(final RoutingContext event) {} -}