Skip to content

Commit

Permalink
Merge pull request geoserver#421 from groldan/build/pgconfig_project_…
Browse files Browse the repository at this point in the history
…rename

build: Rename pgsql backend module as pgconfig
  • Loading branch information
groldan authored Jan 31, 2024
2 parents 246839c + a906728 commit f403101
Show file tree
Hide file tree
Showing 70 changed files with 615 additions and 820 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
</dependency>
<dependency>
<groupId>org.geoserver.cloud.catalog.backend</groupId>
<artifactId>gs-cloud-catalog-backend-pgsql</artifactId>
<artifactId>gs-cloud-catalog-backend-pgconfig</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion report-aggregate/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
</dependency>
<dependency>
<groupId>org.geoserver.cloud.catalog.backend</groupId>
<artifactId>gs-cloud-catalog-backend-pgsql</artifactId>
<artifactId>gs-cloud-catalog-backend-pgconfig</artifactId>
</dependency>
<dependency>
<groupId>org.geoserver.cloud.gwc</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
*/
package org.geoserver.cloud.autoconfigure.metrics.catalog;

import io.micrometer.core.annotation.Timed;

import lombok.NonNull;

import org.geoserver.catalog.Catalog;
Expand All @@ -14,6 +16,7 @@
import org.springframework.boot.actuate.autoconfigure.metrics.MetricsAutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;

Expand All @@ -26,6 +29,7 @@
*/
@AutoConfiguration(
after = {MetricsAutoConfiguration.class, CompositeMeterRegistryAutoConfiguration.class})
@ConditionalOnClass(Timed.class)
@ConditionalOnGeoServerMetricsEnabled
@EnableConfigurationProperties(GeoSeverMetricsConfigProperties.class)
public class CatalogMetricsAutoConfiguration {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.geoserver.platform.GeoServerEnvironment;
import org.geoserver.platform.GeoServerExtensions;
import org.geoserver.platform.GeoServerResourceLoader;
import org.geoserver.platform.resource.ResourceStoreFactory;
import org.geoserver.security.SecureCatalogImpl;
import org.geoserver.security.impl.DataAccessRuleDAO;
import org.geoserver.security.impl.DefaultResourceAccessManager;
Expand Down Expand Up @@ -181,4 +182,9 @@ GeoServerImpl geoServer(
GeoServerDataDirectory dataDirectory(GeoServerResourceLoader resourceLoader) {
return new GeoServerDataDirectory(resourceLoader);
}

@Bean
ResourceStoreFactory resourceStore() {
return new ResourceStoreFactory();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<artifactId>gs-cloud-catalog-backends</artifactId>
<version>${revision}</version>
</parent>
<artifactId>gs-cloud-catalog-backend-pgsql</artifactId>
<artifactId>gs-cloud-catalog-backend-pgconfig</artifactId>
<packaging>jar</packaging>
<description>PostgreSQL catalog backend</description>
<dependencies>
Expand Down Expand Up @@ -50,6 +50,15 @@
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.ben-manes.caffeine</groupId>
<artifactId>caffeine</artifactId>
</dependency>
<dependency>
<!-- to access gwc-core transitively without having to specify the gwc version -->
<!-- required to implement a TileLayerCatalog postgres backend -->
Expand Down Expand Up @@ -107,5 +116,49 @@
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>add-source</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<sources>
<source>${project.build.directory}/generated-sources-mapstruct</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<generatedSourcesDirectory>${project.build.directory}/generated-sources-mapstruct</generatedSourcesDirectory>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* (c) 2020 Open Source Geospatial Foundation - all rights reserved This code is licensed under the
* GPL 2.0 license, available at the root application directory.
*/
package org.geoserver.cloud.autoconfigure.catalog.backend.pgsql;
package org.geoserver.cloud.autoconfigure.catalog.backend.pgconfig;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
* (c) 2023 Open Source Geospatial Foundation - all rights reserved This code is licensed under the
* GPL 2.0 license, available at the root application directory.
*/
package org.geoserver.cloud.autoconfigure.catalog.backend.pgsql;
package org.geoserver.cloud.autoconfigure.catalog.backend.pgconfig;

import org.geoserver.cloud.config.catalog.backend.core.CatalogProperties;
import org.geoserver.cloud.config.catalog.backend.pgsql.PgsqlBackendConfiguration;
import org.geoserver.cloud.config.catalog.backend.pgconfig.PgsqlBackendConfiguration;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Import;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
* (c) 2023 Open Source Geospatial Foundation - all rights reserved This code is licensed under the
* GPL 2.0 license, available at the root application directory.
*/
package org.geoserver.cloud.autoconfigure.catalog.backend.pgsql;
package org.geoserver.cloud.autoconfigure.catalog.backend.pgconfig;

import org.geoserver.cloud.config.catalog.backend.pgsql.PgsqlDataSourceConfiguration;
import org.geoserver.cloud.config.catalog.backend.pgconfig.PgsqlDataSourceConfiguration;
import org.geoserver.cloud.config.jndidatasource.JNDIDataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Import;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
* (c) 2023 Open Source Geospatial Foundation - all rights reserved This code is licensed under the
* GPL 2.0 license, available at the root application directory.
*/
package org.geoserver.cloud.autoconfigure.catalog.backend.pgsql;
package org.geoserver.cloud.autoconfigure.catalog.backend.pgconfig;

import org.geoserver.cloud.config.catalog.backend.pgsql.DatabaseMigrationConfiguration;
import org.geoserver.cloud.config.catalog.backend.pgconfig.DatabaseMigrationConfiguration;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Import;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* (c) 2023 Open Source Geospatial Foundation - all rights reserved This code is licensed under the
* GPL 2.0 license, available at the root application directory.
*/
package org.geoserver.cloud.backend.pgsql;
package org.geoserver.cloud.backend.pgconfig;

import lombok.NonNull;
import lombok.RequiredArgsConstructor;
Expand All @@ -16,8 +16,8 @@
import org.geoserver.catalog.plugin.resolving.CatalogPropertyResolver;
import org.geoserver.catalog.plugin.resolving.CollectionPropertiesInitializer;
import org.geoserver.catalog.plugin.resolving.ResolvingProxyResolver;
import org.geoserver.cloud.backend.pgsql.catalog.PgsqlCatalogFacade;
import org.geoserver.cloud.backend.pgsql.config.PgsqlGeoServerFacade;
import org.geoserver.cloud.backend.pgconfig.catalog.PgsqlCatalogFacade;
import org.geoserver.cloud.backend.pgconfig.config.PgsqlGeoServerFacade;
import org.geoserver.config.plugin.GeoServerImpl;
import org.springframework.jdbc.core.JdbcTemplate;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
* (c) 2023 Open Source Geospatial Foundation - all rights reserved This code is licensed under the
* GPL 2.0 license, available at the root application directory.
*/
package org.geoserver.cloud.backend.pgsql.catalog;
package org.geoserver.cloud.backend.pgconfig.catalog;

import lombok.NonNull;

import org.geoserver.catalog.plugin.RepositoryCatalogFacadeImpl;
import org.geoserver.cloud.backend.pgsql.catalog.repository.PgsqlLayerGroupRepository;
import org.geoserver.cloud.backend.pgsql.catalog.repository.PgsqlLayerRepository;
import org.geoserver.cloud.backend.pgsql.catalog.repository.PgsqlNamespaceRepository;
import org.geoserver.cloud.backend.pgsql.catalog.repository.PgsqlResourceRepository;
import org.geoserver.cloud.backend.pgsql.catalog.repository.PgsqlStoreRepository;
import org.geoserver.cloud.backend.pgsql.catalog.repository.PgsqlStyleRepository;
import org.geoserver.cloud.backend.pgsql.catalog.repository.PgsqlWorkspaceRepository;
import org.geoserver.cloud.backend.pgconfig.catalog.repository.PgsqlLayerGroupRepository;
import org.geoserver.cloud.backend.pgconfig.catalog.repository.PgsqlLayerRepository;
import org.geoserver.cloud.backend.pgconfig.catalog.repository.PgsqlNamespaceRepository;
import org.geoserver.cloud.backend.pgconfig.catalog.repository.PgsqlResourceRepository;
import org.geoserver.cloud.backend.pgconfig.catalog.repository.PgsqlStoreRepository;
import org.geoserver.cloud.backend.pgconfig.catalog.repository.PgsqlStyleRepository;
import org.geoserver.cloud.backend.pgconfig.catalog.repository.PgsqlWorkspaceRepository;
import org.springframework.jdbc.core.JdbcTemplate;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* (c) 2023 Open Source Geospatial Foundation - all rights reserved This code is licensed under the
* GPL 2.0 license, available at the root application directory.
*/
package org.geoserver.cloud.backend.pgsql.catalog.filter;
package org.geoserver.cloud.backend.pgconfig.catalog.filter;

import org.geotools.api.filter.Filter;
import org.geotools.api.filter.expression.PropertyName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* (c) 2023 Open Source Geospatial Foundation - all rights reserved This code is licensed under the
* GPL 2.0 license, available at the root application directory.
*/
package org.geoserver.cloud.backend.pgsql.catalog.filter;
package org.geoserver.cloud.backend.pgconfig.catalog.filter;

import lombok.experimental.UtilityClass;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* (c) 2023 Open Source Geospatial Foundation - all rights reserved This code is licensed under the
* GPL 2.0 license, available at the root application directory.
*/
package org.geoserver.cloud.backend.pgsql.catalog.filter;
package org.geoserver.cloud.backend.pgconfig.catalog.filter;

import lombok.Value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
* (c) 2023 Open Source Geospatial Foundation - all rights reserved This code is licensed under the
* GPL 2.0 license, available at the root application directory.
*/
package org.geoserver.cloud.backend.pgsql.catalog.filter;
package org.geoserver.cloud.backend.pgconfig.catalog.filter;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

import org.geoserver.cloud.backend.pgsql.catalog.filter.PgsqlFilterToSQL.Result;
import org.geoserver.cloud.backend.pgconfig.catalog.filter.PgsqlFilterToSQL.Result;
import org.geotools.api.filter.Filter;
import org.geotools.filter.visitor.SimplifyingFilterVisitor;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* (c) 2023 Open Source Geospatial Foundation - all rights reserved This code is licensed under the
* GPL 2.0 license, available at the root application directory.
*/
package org.geoserver.cloud.backend.pgsql.catalog.filter;
package org.geoserver.cloud.backend.pgconfig.catalog.filter;

import org.geotools.api.filter.BinaryComparisonOperator;
import org.geotools.api.filter.Filter;
Expand Down
Loading

0 comments on commit f403101

Please sign in to comment.