Skip to content

Commit

Permalink
Cleanup around webadmin removal
Browse files Browse the repository at this point in the history
  • Loading branch information
pe4cey committed Mar 4, 2016
1 parent c63b8b1 commit e43045c
Show file tree
Hide file tree
Showing 13 changed files with 10 additions and 372 deletions.
127 changes: 0 additions & 127 deletions community/server/pom.xml
Expand Up @@ -337,38 +337,6 @@
</dependencies> </dependencies>


<build> <build>
<resources>
<resource>
<directory>src/main/resources</directory>
<excludes>
<exclude>webadmin-html/index.html</exclude>
</excludes>
<filtering>false</filtering>
</resource>

<resource>
<directory>src/main/resources/</directory>
<includes>
<include>webadmin-html/index.html</include>
</includes>
<filtering>true</filtering>
</resource>

<resource>
<directory>${project.build.directory}/generated-sources</directory>
</resource>
<resource>
<directory>${basedir}</directory>
<targetPath>META-INF</targetPath>
<includes>
<include>NOTICE.txt</include>
<include>LICENSE.txt</include>
<include>CHANGES.txt</include>
<include>LICENSES.txt</include>
</includes>
</resource>
</resources>

<plugins> <plugins>


<!-- Development execution --> <!-- Development execution -->
Expand Down Expand Up @@ -398,19 +366,6 @@
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId> <artifactId>maven-assembly-plugin</artifactId>
<executions> <executions>
<execution>
<id>static-web</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<attach>true</attach>
<descriptors>
<descriptor>src/main/assemblies/static-web.xml</descriptor>
</descriptors>
</configuration>
</execution>
<execution> <execution>
<id>sources</id> <id>sources</id>
<phase>package</phase> <phase>package</phase>
Expand Down Expand Up @@ -454,11 +409,6 @@
<include>src/**/*.scala</include> <include>src/**/*.scala</include>
<include>src/**/*.xml</include> <include>src/**/*.xml</include>
</includes> </includes>
<excludes>
<exclude>**/lib/*.js</exclude>
<exclude>**/lib/**/*.js</exclude>
<exclude>**/webadmin-html/**</exclude>
</excludes>
<mapping> <mapping>
<scala>JAVADOC_STYLE</scala> <scala>JAVADOC_STYLE</scala>
</mapping> </mapping>
Expand All @@ -480,7 +430,6 @@
</manifest> </manifest>
</archive> </archive>
<excludes> <excludes>
<exclude>webadmin-html/**</exclude>
<exclude>lib/**</exclude> <exclude>lib/**</exclude>
</excludes> </excludes>
</configuration> </configuration>
Expand Down Expand Up @@ -713,82 +662,6 @@
</activation> </activation>
</profile> </profile>


<profile>
<id>neodev</id>
<!-- Expands the number of things skipped by the neodev profile defined in parent-central pom. This is meant to be used by maven exec, it does not guarantee producing working artifacts. -->
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>static-web</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>skip-brew</id>
<build>
<plugins>
<plugin>
<groupId>com.voltvoodoo</groupId>
<artifactId>brew</artifactId>
<executions>
<execution>
<id>compile-webadmin</id>
<phase>none</phase>
</execution>
<execution>
<id>minify-webadmin</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.searls</groupId>
<artifactId>jasmine-maven-plugin</artifactId>
<executions>
<execution>
<id>webadmin-specs</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

<!-- Firefox is default implementation, set in properties at the top of this file. -->
<profile>
<id>chrome-mac</id>
<properties>
<webdriver.implementation>Chrome</webdriver.implementation>
</properties>
</profile>
<profile>
<id>sauce-labs-firefox-windows</id>
<properties>
<webdriver.implementation>SauceLabsFirefoxWindows</webdriver.implementation>
</properties>
</profile>
<profile>
<id>sauce-labs-chrome-windows</id>
<properties>
<webdriver.implementation>SauceLabsChromeWindows</webdriver.implementation>
</properties>
</profile>
<profile>
<id>sauce-labs-internet-explorer-windows</id>
<properties>
<webdriver.implementation>SauceLabsInternetExplorerWindows</webdriver.implementation>
</properties>
</profile>

<profile> <profile>
<id>initial-build</id> <id>initial-build</id>
<repositories> <repositories>
Expand Down
60 changes: 0 additions & 60 deletions community/server/src/main/assemblies/static-web.xml

This file was deleted.

Expand Up @@ -30,9 +30,6 @@


public class WebAdminModule implements ServerModule 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 final WebServer webServer;
private Config config; private Config config;


Expand Down
Expand Up @@ -41,7 +41,7 @@ public void whenServerIsStartedItshouldStartASingleDatabase() throws Exception
} }


@Test @Test
public void shouldRedirectRootToWebadmin() throws Exception public void shouldRedirectRootToBrowser() throws Exception
{ {
assertFalse( server().baseUri() assertFalse( server().baseUri()
.toString() .toString()
Expand Down
Expand Up @@ -70,8 +70,8 @@ public void shouldPickUpPortFromConfig() throws Exception
@Test @Test
public void shouldPickupRelativeUrisForWebAdminAndWebAdminRest() throws IOException public void shouldPickupRelativeUrisForWebAdminAndWebAdminRest() throws IOException
{ {
String webAdminDataUri = "/a/different/webadmin/data/uri/"; String webAdminDataUri = "/a/different/data/uri/";
String webAdminManagementUri = "/a/different/webadmin/management/uri/"; String webAdminManagementUri = "/a/different/management/uri/";


server = server().withRelativeWebDataAdminUriPath( webAdminDataUri ) server = server().withRelativeWebDataAdminUriPath( webAdminDataUri )
.usingDataDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) .usingDataDir( folder.directory( name.getMethodName() ).getAbsolutePath() )
Expand Down Expand Up @@ -142,7 +142,7 @@ public void shouldEnableWebadminConsoleByDefault() throws IOException
} }


@Test @Test
public void shouldDisableWebadminWhenAskedTo() throws IOException public void shouldDisableWebadminConsoleWhenAskedTo() throws IOException
{ {
// Given // Given
server = server().withProperty( ServerSettings.webadmin_enabled.name(), "false" ) server = server().withProperty( ServerSettings.webadmin_enabled.name(), "false" )
Expand All @@ -151,7 +151,6 @@ public void shouldDisableWebadminWhenAskedTo() throws IOException
server.start(); server.start();


// When & then // 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() ); assertEquals( 404, new RestRequest().get( "http://localhost:7474/db/manage/server/console" ).getStatus() );
} }


Expand Down
Expand Up @@ -19,16 +19,16 @@
*/ */
package org.neo4j.server.helpers; 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.net.URI;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; 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.kernel.internal.GraphDatabaseAPI;
import org.neo4j.server.NeoServer; import org.neo4j.server.NeoServer;
import org.neo4j.server.rest.JaxRsResponse; import org.neo4j.server.rest.JaxRsResponse;
Expand Down Expand Up @@ -236,13 +236,6 @@ public GraphDatabaseAPI getDatabase()
return server.getDatabase().getGraph(); return server.getDatabase().getGraph();
} }


public String webAdminUri()
{
// the trailing slash prevents a 302 redirect
return server.baseUri()
.toString() + "webadmin" + "/";
}

public JaxRsResponse get(String path) { public JaxRsResponse get(String path) {
return request.get(path); return request.get(path);
} }
Expand Down
Expand Up @@ -78,7 +78,7 @@ public void shouldHaveJsonDataInResponse() throws Exception
} }


@Test @Test
public void shouldRedirectToWebadminOnHtmlRequest() throws Exception public void shouldRedirectOnHtmlRequest() throws Exception
{ {
Client nonRedirectingClient = Client.create(); Client nonRedirectingClient = Client.create();
nonRedirectingClient.setFollowRedirects( false ); nonRedirectingClient.setFollowRedirects( false );
Expand Down
49 changes: 0 additions & 49 deletions community/server/src/test/resources/SpecRunner.htmlTemplate

This file was deleted.

0 comments on commit e43045c

Please sign in to comment.