Skip to content

Commit

Permalink
- Physically move geofence and geofence-server plugins to extensions
Browse files Browse the repository at this point in the history
fix test cases
  • Loading branch information
afabiani committed Sep 5, 2018
1 parent 7ccf9cb commit 7282b5a
Show file tree
Hide file tree
Showing 126 changed files with 263 additions and 184 deletions.
2 changes: 0 additions & 2 deletions doc/en/user/source/community/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ officially part of the GeoServer releases. They are however built along with the
rest-upload/index
geomesa/index
gwc-distributed/index
geofence/index
geofence-server/index
gdal/index
gwc-s3/index
gwc-sqlite/index
Expand Down
3 changes: 3 additions & 0 deletions doc/en/user/source/extensions/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@ This section describes most of the extensions available for GeoServer. Other dat
wcs20eo/index
mongodb/index
sldservice/index
geofence/index
geofence-server/index

29 changes: 3 additions & 26 deletions src/community/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,10 @@
<descriptor>release/ext-wps-download.xml</descriptor>
<descriptor>release/ext-jms-cluster.xml</descriptor>
<descriptor>release/ext-hz-cluster.xml</descriptor>
<descriptor>release/ext-activeMQ.xml</descriptor>
<descriptor>release/ext-solr.xml</descriptor>
<descriptor>release/ext-geofence.xml</descriptor>
<descriptor>release/ext-activeMQ.xml</descriptor>
<descriptor>release/ext-solr.xml</descriptor>
<!-- <descriptor>release/ext-rest-upload.xml</descriptor> -->
<descriptor>release/ext-gwc-distributed.xml</descriptor>
<descriptor>release/ext-geofence-server.xml</descriptor>
<descriptor>release/ext-gwc-distributed.xml</descriptor>
<descriptor>release/ext-gwc-s3.xml</descriptor>
<descriptor>release/ext-gdal-wcs.xml</descriptor>
<descriptor>release/ext-gdal-wps.xml</descriptor>
Expand Down Expand Up @@ -223,8 +221,6 @@
<module>hz-cluster</module>
<module>solr</module>
<!-- <module>rest-upload</module> -->
<module>geofence</module>
<module>geofence-server</module>
<module>params-extractor</module>
<module>wps-remote</module>
<module>wps-jdbc</module>
Expand Down Expand Up @@ -389,25 +385,6 @@
<module>jms-cluster</module>
</modules>
</profile>
<profile>
<id>geofence</id>
<activation>
<property><name>geofence</name></property>
</activation>
<modules>
<module>geofence</module>
</modules>
</profile>
<profile>
<id>geofence-server</id>
<activation>
<property><name>geofence</name></property>
</activation>
<modules>
<module>geofence</module>
<module>geofence-server</module>
</modules>
</profile>
<profile>
<id>hz-cluster</id>
<modules>
Expand Down
12 changes: 1 addition & 11 deletions src/community/release/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,7 @@
<groupId>org.geoserver.community</groupId>
<artifactId>gs-hz-cluster</artifactId>
<version>${project.version}</version>
</dependency>
<!-- <dependency>
<groupId>org.geoserver.community</groupId>
<artifactId>gs-geofence</artifactId>
<version>${project.version}</version>
</dependency> -->
<dependency>
<groupId>org.geoserver.community</groupId>
<artifactId>gs-geofence-server</artifactId>
<version>${project.version}</version>
</dependency>
</dependency>
<dependency>
<groupId>org.geoserver.community</groupId>
<artifactId>gs-web-solr</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<!-- set parent pom to community pom -->
<!-- set parent pom to extension pom -->
<parent>
<groupId>org.geoserver</groupId>
<artifactId>community</artifactId>
<artifactId>extension</artifactId>
<version>2.15-SNAPSHOT</version>
</parent>

<groupId>org.geoserver.community</groupId>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-geofence-server</artifactId>
<packaging>jar</packaging>
<version>2.15-SNAPSHOT</version>
Expand Down Expand Up @@ -113,7 +113,7 @@
</dependency>

<dependency>
<groupId>org.geoserver.community</groupId>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-geofence</artifactId>
<version>${project.version}</version>
<exclusions>
Expand Down Expand Up @@ -175,7 +175,7 @@
</dependency>

<dependency>
<groupId>org.geoserver.community</groupId>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-geofence</artifactId>
<version>${project.version}</version>
<classifier>tests</classifier>
Expand Down
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import java.util.Arrays;
import java.util.List;
import java.util.Set;
import java.util.logging.Level;
import org.geoserver.data.test.SystemTestData;
import org.geoserver.security.AbstractSecurityServiceTest;
import org.geoserver.security.GeoServerRoleService;
Expand Down Expand Up @@ -96,6 +97,24 @@ public void setDefaultUserService() throws Exception {
System.setProperty(InternalUserResolver.DEFAULT_USER_GROUP_SERVICE_KEY, "test");
}

@Override
protected void onTearDown(SystemTestData testData) throws Exception {
/** Dispose Services */
this.service = null;
this.testData = new SystemTestData();

try {
if (System.getProperty("IS_GEOFENCE_AVAILABLE") != null) {
System.clearProperty("IS_GEOFENCE_AVAILABLE");
}
} catch (Exception e) {
LOGGER.log(
Level.WARNING,
"Could not remove System ENV variable {IS_GEOFENCE_AVAILABLE}",
e);
}
}

protected void addTestUser(
String username,
List<String> roles,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import static org.junit.Assert.assertTrue;

import java.util.Arrays;
import java.util.logging.Level;
import org.geoserver.data.test.SystemTestData;
import org.geoserver.geofence.services.dto.ShortRule;
import org.geoserver.web.GeoServerWicketTestSupport;
import org.junit.Test;
Expand All @@ -20,6 +22,23 @@
*/
public class GeofenceRulesModelTest extends GeoServerWicketTestSupport {

@Override
protected void onTearDown(SystemTestData testData) throws Exception {
/** Dispose Services */
this.testData = new SystemTestData();

try {
if (System.getProperty("IS_GEOFENCE_AVAILABLE") != null) {
System.clearProperty("IS_GEOFENCE_AVAILABLE");
}
} catch (Exception e) {
LOGGER.log(
Level.WARNING,
"Could not remove System ENV variable {IS_GEOFENCE_AVAILABLE}",
e);
}
}

@Test
public void testRulesModel() {
GeofenceRulesModel model = new GeofenceRulesModel();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import static org.junit.Assert.assertEquals;

import java.util.logging.Level;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.util.tester.FormTester;
import org.geoserver.data.test.SystemTestData;
Expand All @@ -31,6 +32,23 @@ public void before() {
tester.startPage(GeofenceServerAdminPage.class);
}

@Override
protected void onTearDown(SystemTestData testData) throws Exception {
/** Dispose Services */
this.testData = new SystemTestData();

try {
if (System.getProperty("IS_GEOFENCE_AVAILABLE") != null) {
System.clearProperty("IS_GEOFENCE_AVAILABLE");
}
} catch (Exception e) {
LOGGER.log(
Level.WARNING,
"Could not remove System ENV variable {IS_GEOFENCE_AVAILABLE}",
e);
}
}

@Test
public void testAddNewRuleLink() {
tester.assertRenderedPage(GeofenceServerAdminPage.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import static org.junit.Assert.assertEquals;

import java.util.logging.Level;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.util.tester.FormTester;
import org.geoserver.data.test.SystemTestData;
Expand All @@ -31,6 +32,23 @@ public void before() {
tester.startPage(GeofenceServerPage.class);
}

@Override
protected void onTearDown(SystemTestData testData) throws Exception {
/** Dispose Services */
this.testData = new SystemTestData();

try {
if (System.getProperty("IS_GEOFENCE_AVAILABLE") != null) {
System.clearProperty("IS_GEOFENCE_AVAILABLE");
}
} catch (Exception e) {
LOGGER.log(
Level.WARNING,
"Could not remove System ENV variable {IS_GEOFENCE_AVAILABLE}",
e);
}
}

@Test
public void testAddNewRuleLink() {
tester.assertRenderedPage(GeofenceServerPage.class);
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<!-- set parent pom to community pom -->
<!-- set parent pom to extension pom -->
<parent>
<groupId>org.geoserver</groupId>
<artifactId>community</artifactId>
<artifactId>extension</artifactId>
<version>2.15-SNAPSHOT</version>
</parent>

<groupId>org.geoserver.community</groupId>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-geofence</artifactId>
<packaging>jar</packaging>
<version>2.15-SNAPSHOT</version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,11 @@ public void after() {

@Override
protected void onTearDown(SystemTestData testData) throws Exception {
super.onTearDown(testData);
/** Dispose Services */
this.accessManager = null;
this.configManager = null;
this.geofenceService = null;
this.testData = new SystemTestData();

try {
if (System.getProperty("IS_GEOFENCE_AVAILABLE") != null) {
Expand Down

0 comments on commit 7282b5a

Please sign in to comment.