0

I am encountering an issue while building a GeoServer wps using Maven, and I could use some guidance.

Error Description:

I am attempting to build a GeoServer wps using Maven (mvn clean install). However, I'm facing a dependency resolution problem related to the gs-wps library. The error suggests that Maven cannot find the artifact in the specified repository (https://repo.osgeo.org/repository/geoserver-releases/). I Already tried all versions but same error. i checked the Repository and i didnt found the gs:wps. Error: Could not resolve dependencies for project org.geoserver:Test:jar:2.8-SNAPSHOT: The following artifacts could not be resolved: org.geoserver:gs-wps:jar:2.23.0 (absent): org.geoserver:gs-wps:jar:2.23.0 was not found in https://repo.osgeo.org/repository/geoserver-releases/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of osgeo-snapshot has elapsed or updates are forced -> [Help 1]

Is there an alternative repository, a recommended version, or any other solution to successfully resolve this dependency?

pom.xml

 <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <gt.version>29.0</gt.version> <!-- GeoTools version --> <gs.version>2.23.0</gs.version> <!-- GeoServer version --> <jts.version>1.18.2</jts.version> <!-- JTS version --> </properties> <dependencies> <!-- GeoTools dependencies --> <dependency> <groupId>org.geotools</groupId> <artifactId>gt-process</artifactId> <version>${gt.version}</version> </dependency> <dependency> <groupId>org.geoserver.extension</groupId> <artifactId>gs-wps-core</artifactId> <version>${gs.version}</version> </dependency> <!-- JTS (Java Topology Suite) --> <dependency> <groupId>org.locationtech.jts</groupId> <artifactId>jts-core</artifactId> <version>${jts.version}</version> </dependency> <dependency> <groupId>org.geoserver</groupId> <artifactId>gs-wps</artifactId> <version>2.23.0</version> <!-- Use the appropriate version --> 
</dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.1</version> <!-- Replace with the appropriate version --> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin> <!-- Other plugins... --> </plugins> </build> <repositories> <repository> <id>osgeo-snapshot</id> <name>OSGeo Snapshot Repository</name> <url>https://repo.osgeo.org/repository/geoserver-releases/</url> </repository> <repository> <id>osgeo</id> <name>Open Source Geospatial Foundation Repository</name> <url>https://repo.osgeo.org/repository/release/</url> </repository> <repository> <id>central</id> <url>https://repo.maven.apache.org/maven2</url> </repository> </repositories> 

1 Answer 1

0

If you look in the GeoServer main pom.xml you will see the required repositories:

 <repositories> <!-- Please do not add additional repositories as it slows the build down for everyone --> <repository> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> <id>osgeo-releases</id> <name>OSGeo Nexus Release Repository</name> <url>https://repo.osgeo.org/repository/release/</url> </repository> <repository> <releases> <enabled>false</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> <id>osgeo-snapshots</id> <name>OSGeo Nexus Snapshot Repository</name> <url>https://repo.osgeo.org/repository/snapshot/</url> <!-- Access to OSGeo snapshots repositories --> </repository> </repositories> 

And if you look in the tutorial you will see that you need to depend on gs-wps-core:

 <dependency> <groupId>org.geoserver.extension</groupId> <artifactId>gs-wps-core</artifactId> <version>${gs.version}</version> </dependency> 
6
  • Thx Ian. I still get the same Error. Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project FKWPS: Compilation failure: Compilation failure: [ERROR] /C:/Users/src/main/java/org/geoserver/FkWPS.java:[5,28] cannot find symbol [ERROR] symbol: class GeoServerProcessUtils [ERROR] location: package org.geoserver.wps.gs [ERROR] /C:kWPS/src/main/java/org/geoserver/FkWPS.java:[6,33] cannot find symbol [ERROR] symbol: class WPSUtils [ERROR] location: package org.geoserver.wps.process Commented Jan 18, 2024 at 10:21
  • My Goal is to create a WPS from a PostGIS function Commented Jan 18, 2024 at 10:22
  • Have you read and followed docs.geotools.org/latest/userguide/tutorial/process.html ? Commented Jan 18, 2024 at 13:25
  • Yes i followed this tutorial. I already did it for the HelloWPS and i Deployt it succesfull and i want to make the same for this new wps Commented Jan 18, 2024 at 17:56
  • Then what is the difference between the two projects? Commented Jan 18, 2024 at 20:27

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.