I'm trying to follow the tutorial found in the GeoServer Developer Manual found here. Unfortunately to someone without much GeoServer and without any Maven experience, I'm having a hard time wrapping my head around it and I can't seem to get it working.

The folder structure is as follows:

├── pom.xml
└── src
   ├── main
   |  ├── java
   |  |  └── HelloResource.java
   |  └── resources
   |     └── applicationContext.xml
   └── test
      └── java
         └── HelloResourceTest.java

The contents of the files are exactly what is specified in the tutorial in the link above. The tutorial never specified what the java files should be named and I'm not sure if that matters.

At the end of the tutorial, it says to run the following command, so I'm trying to run it from the root (a folder called "hello", I'm not sure if the position of this folder matters but right now it's in the root of the geoserver folder).

mvn install

When I run this, I get the following output in the command line:

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building hello_rest
[INFO]    task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
Downloading: http://repo1.maven.org/maven2/com/mockrunner/mockrunner/0.3.6/mockrunner-0.3.6.pom
[INFO] Unable to find resource 'com.mockrunner:mockrunner:pom:0.3.6' in repository central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

1) org.geoserver:gs-rest:jar:2.8-SNAPSHOT

  Try downloading the file manually from the project website.

  Then, install it using the command: 
      mvn install:install-file -DgroupId=org.geoserver -DartifactId=gs-rest -Dversion=2.8-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file there: 
      mvn deploy:deploy-file -DgroupId=org.geoserver -DartifactId=gs-rest -Dversion=2.8-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  Path to dependency: 
    1) org.geoserver:hello_rest:jar:1.0-SNAPSHOT
    2) org.geoserver:gs-rest:jar:2.8-SNAPSHOT

1 required artifact is missing.

for artifact: 

from the specified remote repositories:
  central (http://repo1.maven.org/maven2)

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Wed Aug 31 17:05:56 UTC 2016
[INFO] Final Memory: 9M/240M
[INFO] ------------------------------------------------------------------------

GeoServer is running on an Amazon Web Server instance running Ubuntu, and it is GeoServer version 2.8.2. I didn't set it up so I don't know all the details (though I can find out anything that needs to be known) but GeoServer is installed through Tomcat and is in the tomcat7 folder.

Does anyone have any insight on how I can get this working?

EDIT: Here's my pom file:

<project xmlns="http://maven.apache.org/POM/4.0.0"
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd ">


      <version>2.8-SNAPSHOT</version> <!-- change this to the proper GeoServer version -->
      <version>2.8-SNAPSHOT</version> <!-- change this to the proper GeoServer version -->



  • Please add the repository section of your pom file
    – Ian Turton
    Aug 31, 2016 at 18:50
  • I added the pom file. Aug 31, 2016 at 19:14

1 Answer 1


You haven't told Maven where it can find the GeoTools and GeoServer snapshot jars. You need to add a repositories section to your pom file:

        <name>Java.net repository</name>
        <name>Open Source Geospatial Foundation Repository</name>
      <name>Boundless Maven Repository</name>

In general the GeoTools & GeoServer tutorials assume that you have worked through (at least) the quickstart tutorial.

Note: Pull requests improving the documentation are always appreciated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.