From e43045cd1db827e544c0b0f771615781d44b44f1 Mon Sep 17 00:00:00 2001 From: Mark Peace Date: Fri, 4 Mar 2016 11:27:03 +0000 Subject: [PATCH] Cleanup around webadmin removal --- community/server/pom.xml | 127 ------------------ .../server/src/main/assemblies/static-web.xml | 60 --------- .../neo4j/server/modules/WebAdminModule.java | 3 - .../java/org/neo4j/server/NeoServerDocIT.java | 2 +- .../org/neo4j/server/ServerConfigDocIT.java | 7 +- .../server/helpers/FunctionalTestHelper.java | 17 +-- .../server/rest/DiscoveryServiceDocIT.java | 2 +- .../test/resources/SpecRunner.htmlTemplate | 49 ------- community/server/tools/webadmin-develop | 66 --------- enterprise/server-enterprise/pom.xml | 35 ----- packaging/.gitignore | 1 - packaging/neo4j-desktop/pom.xml | 7 - packaging/standalone/pom.xml | 6 - 13 files changed, 10 insertions(+), 372 deletions(-) delete mode 100644 community/server/src/main/assemblies/static-web.xml delete mode 100644 community/server/src/test/resources/SpecRunner.htmlTemplate delete mode 100755 community/server/tools/webadmin-develop diff --git a/community/server/pom.xml b/community/server/pom.xml index ff74a7b9e7ba1..e87ddccf0dad5 100644 --- a/community/server/pom.xml +++ b/community/server/pom.xml @@ -337,38 +337,6 @@ - - - src/main/resources - - webadmin-html/index.html - - false - - - - src/main/resources/ - - webadmin-html/index.html - - true - - - - ${project.build.directory}/generated-sources - - - ${basedir} - META-INF - - NOTICE.txt - LICENSE.txt - CHANGES.txt - LICENSES.txt - - - - @@ -398,19 +366,6 @@ org.apache.maven.plugins maven-assembly-plugin - - static-web - package - - single - - - true - - src/main/assemblies/static-web.xml - - - sources package @@ -454,11 +409,6 @@ src/**/*.scala src/**/*.xml - - **/lib/*.js - **/lib/**/*.js - **/webadmin-html/** - JAVADOC_STYLE @@ -480,7 +430,6 @@ - webadmin-html/** lib/** @@ -713,82 +662,6 @@ - - neodev - - - - - maven-assembly-plugin - - - static-web - none - - - - - - - - - skip-brew - - - - com.voltvoodoo - brew - - - compile-webadmin - none - - - minify-webadmin - none - - - - - com.github.searls - jasmine-maven-plugin - - - webadmin-specs - none - - - - - - - - - - chrome-mac - - Chrome - - - - sauce-labs-firefox-windows - - SauceLabsFirefoxWindows - - - - sauce-labs-chrome-windows - - SauceLabsChromeWindows - - - - sauce-labs-internet-explorer-windows - - SauceLabsInternetExplorerWindows - - - initial-build diff --git a/community/server/src/main/assemblies/static-web.xml b/community/server/src/main/assemblies/static-web.xml deleted file mode 100644 index 588af7bab4358..0000000000000 --- a/community/server/src/main/assemblies/static-web.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - static-web - false - - jar - - - - - ${project.build.outputDirectory}/webadmin-html - /webadmin-html - true - - **/*.js - **/*.html - **/*.css - - - - - ${project.build.outputDirectory}/webadmin-html - /webadmin-html - - **/*.js - **/*.html - **/*.css - - - - ${project.basedir} - /META-INF/ - - LICENSE.txt - NOTICE.txt - - - - diff --git a/community/server/src/main/java/org/neo4j/server/modules/WebAdminModule.java b/community/server/src/main/java/org/neo4j/server/modules/WebAdminModule.java index b83dc8e18cdf4..52c164117ff2f 100644 --- a/community/server/src/main/java/org/neo4j/server/modules/WebAdminModule.java +++ b/community/server/src/main/java/org/neo4j/server/modules/WebAdminModule.java @@ -30,9 +30,6 @@ public class WebAdminModule implements ServerModule { - private static final String DEFAULT_WEB_ADMIN_PATH = "/webadmin"; - private static final String DEFAULT_WEB_ADMIN_STATIC_WEB_CONTENT_LOCATION = "webadmin-html"; - private final WebServer webServer; private Config config; diff --git a/community/server/src/test/java/org/neo4j/server/NeoServerDocIT.java b/community/server/src/test/java/org/neo4j/server/NeoServerDocIT.java index 6be467952c73c..8770a6b2107d8 100644 --- a/community/server/src/test/java/org/neo4j/server/NeoServerDocIT.java +++ b/community/server/src/test/java/org/neo4j/server/NeoServerDocIT.java @@ -41,7 +41,7 @@ public void whenServerIsStartedItshouldStartASingleDatabase() throws Exception } @Test - public void shouldRedirectRootToWebadmin() throws Exception + public void shouldRedirectRootToBrowser() throws Exception { assertFalse( server().baseUri() .toString() diff --git a/community/server/src/test/java/org/neo4j/server/ServerConfigDocIT.java b/community/server/src/test/java/org/neo4j/server/ServerConfigDocIT.java index b0e4e4b3c5d2a..f2e18eeba5e48 100644 --- a/community/server/src/test/java/org/neo4j/server/ServerConfigDocIT.java +++ b/community/server/src/test/java/org/neo4j/server/ServerConfigDocIT.java @@ -70,8 +70,8 @@ public void shouldPickUpPortFromConfig() throws Exception @Test public void shouldPickupRelativeUrisForWebAdminAndWebAdminRest() throws IOException { - String webAdminDataUri = "/a/different/webadmin/data/uri/"; - String webAdminManagementUri = "/a/different/webadmin/management/uri/"; + String webAdminDataUri = "/a/different/data/uri/"; + String webAdminManagementUri = "/a/different/management/uri/"; server = server().withRelativeWebDataAdminUriPath( webAdminDataUri ) .usingDataDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) @@ -142,7 +142,7 @@ public void shouldEnableWebadminConsoleByDefault() throws IOException } @Test - public void shouldDisableWebadminWhenAskedTo() throws IOException + public void shouldDisableWebadminConsoleWhenAskedTo() throws IOException { // Given server = server().withProperty( ServerSettings.webadmin_enabled.name(), "false" ) @@ -151,7 +151,6 @@ public void shouldDisableWebadminWhenAskedTo() throws IOException server.start(); // When & then - assertEquals( 404, new RestRequest().get( "http://localhost:7474/webadmin" ).getStatus() ); assertEquals( 404, new RestRequest().get( "http://localhost:7474/db/manage/server/console" ).getStatus() ); } diff --git a/community/server/src/test/java/org/neo4j/server/helpers/FunctionalTestHelper.java b/community/server/src/test/java/org/neo4j/server/helpers/FunctionalTestHelper.java index 25c5481b741bd..033df4dc0fef0 100644 --- a/community/server/src/test/java/org/neo4j/server/helpers/FunctionalTestHelper.java +++ b/community/server/src/test/java/org/neo4j/server/helpers/FunctionalTestHelper.java @@ -19,16 +19,16 @@ */ package org.neo4j.server.helpers; -import com.sun.jersey.api.client.Client; -import org.hamcrest.Description; -import org.hamcrest.Matcher; -import org.hamcrest.TypeSafeMatcher; - import java.net.URI; import java.util.Arrays; import java.util.HashMap; import java.util.Map; +import com.sun.jersey.api.client.Client; +import org.hamcrest.Description; +import org.hamcrest.Matcher; +import org.hamcrest.TypeSafeMatcher; + import org.neo4j.kernel.internal.GraphDatabaseAPI; import org.neo4j.server.NeoServer; import org.neo4j.server.rest.JaxRsResponse; @@ -236,13 +236,6 @@ public GraphDatabaseAPI getDatabase() return server.getDatabase().getGraph(); } - public String webAdminUri() - { - // the trailing slash prevents a 302 redirect - return server.baseUri() - .toString() + "webadmin" + "/"; - } - public JaxRsResponse get(String path) { return request.get(path); } diff --git a/community/server/src/test/java/org/neo4j/server/rest/DiscoveryServiceDocIT.java b/community/server/src/test/java/org/neo4j/server/rest/DiscoveryServiceDocIT.java index fe3d298df2146..145351139255b 100644 --- a/community/server/src/test/java/org/neo4j/server/rest/DiscoveryServiceDocIT.java +++ b/community/server/src/test/java/org/neo4j/server/rest/DiscoveryServiceDocIT.java @@ -78,7 +78,7 @@ public void shouldHaveJsonDataInResponse() throws Exception } @Test - public void shouldRedirectToWebadminOnHtmlRequest() throws Exception + public void shouldRedirectOnHtmlRequest() throws Exception { Client nonRedirectingClient = Client.create(); nonRedirectingClient.setFollowRedirects( false ); diff --git a/community/server/src/test/resources/SpecRunner.htmlTemplate b/community/server/src/test/resources/SpecRunner.htmlTemplate deleted file mode 100644 index f03f1299f4139..0000000000000 --- a/community/server/src/test/resources/SpecRunner.htmlTemplate +++ /dev/null @@ -1,49 +0,0 @@ - - - - - Jasmine Spec Runner - $cssDependencies$ - $javascriptDependencies$ - - - - - - diff --git a/community/server/tools/webadmin-develop b/community/server/tools/webadmin-develop deleted file mode 100755 index 23d476fa2c574..0000000000000 --- a/community/server/tools/webadmin-develop +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash - -SERVER_LOG="./target/server.log" -BREW_LOG="./target/brew.log" -SERVER_PID=0 -BREW_PID=0 - -function startServer() -{ - echo "Compiling and booting server, saving output in '$SERVER_LOG'.." - - mvn compile exec:java -Pneodev,skip-brew 1> $SERVER_LOG 2> $SERVER_LOG 0> $SERVER_LOG & - SERVER_PID=$! - - lastLine="" - expected='0.0.0:7474' - bad='Failed to start Neo Server on port' - until [[ "$lastLine" == *"$expected"* ]]; do - - lastLine=$(tail -n 1 $SERVER_LOG) - - if [[ "$lastLine" == *"$bad"* ]]; then - echo "Starting server failed, please see $SERVER_LOG" - exit 1 - fi - - sleep 1 - done - - echo "Server started." -} - -function autoCompileWebadmin() -{ - echo "Booting coffeescript autocompiler.." - - mvn compile -Dbrew.watch=true -Pneodev & - BREW_PID=$! - -} - -function infiniteSleep() -{ - while(true); do - sleep 1; - done; -} - -function onExit() -{ - echo "Stopping coffeescript compiler.." - kill $BREW_PID - - echo "Stopping the server.." - kill $SERVER_PID -} - -# -# Main -# - -trap onExit EXIT - -startServer; -autoCompileWebadmin; -infiniteSleep; diff --git a/enterprise/server-enterprise/pom.xml b/enterprise/server-enterprise/pom.xml index 458db95c8c79d..e0b93d967a56b 100644 --- a/enterprise/server-enterprise/pom.xml +++ b/enterprise/server-enterprise/pom.xml @@ -212,7 +212,6 @@ - webadmin-html/** lib/** @@ -300,40 +299,6 @@ - - - webadmin-build - - - - com.voltvoodoo - brew - 1.0-SNAPSHOT - - - build-webadmin - - compile-haml - compile-coffeescript - optimize - - - - - - webadmin - ${basedir}/src/main/resources/webadmin-html/js - ${basedir}/src/main/resources/webadmin-html/js - ${basedir}/src/main/resources/webadmin-html/js - ${basedir}/src/main/resources/webadmin-html/js - - - - - - htmlunit diff --git a/packaging/.gitignore b/packaging/.gitignore index 25746e59b70b9..2b083588b53f2 100644 --- a/packaging/.gitignore +++ b/packaging/.gitignore @@ -11,7 +11,6 @@ target *.iml .idea .DS_Store -server/src/main/resources/webadmin-html/webadmin.js /bin .gradle /installer-windows/src/main/resources/installer/installer-cache/ \ No newline at end of file diff --git a/packaging/neo4j-desktop/pom.xml b/packaging/neo4j-desktop/pom.xml index 4108964e04125..4d0718f1caa98 100644 --- a/packaging/neo4j-desktop/pom.xml +++ b/packaging/neo4j-desktop/pom.xml @@ -29,13 +29,6 @@ neo4j-server ${project.version} - - org.neo4j.app - neo4j-server - ${project.version} - static-web - - junit junit diff --git a/packaging/standalone/pom.xml b/packaging/standalone/pom.xml index 614b66c5d1ee5..e27aea936e131 100644 --- a/packaging/standalone/pom.xml +++ b/packaging/standalone/pom.xml @@ -315,12 +315,6 @@ windows-service-wrapper ${windows-wrapper.version} - - org.neo4j.app - neo4j-server - ${neo4j.version} - static-web - org.neo4j neo4j-import-tool