[Geoserver-users] How to make plugins available in geoserver, after compilation

After building the plugin by: mvn clean install -P netcdf
It seems to be build in the path: geoserver/src/extension/netcdf/target/gs-netcdf-2.24-SNAPSHOT.jar
Afterwards, I copy gs-netcdf-2.24-SNAPSHOT.jar to the path: geoserver/src/web/app/target/geoserver/WEB-INF/lib

Now after mvn jetty:run, the plugin is still not available in geoserver.

Would you please inform me what I should do?

Best regards,
Amirhossein Nikfal

Have a look at the pom.xml for web/app - you can see different profiles that add a dependencies for the different extensions and community modules.

You need to add a profile for your community module.

The alternative approach is to make a new web app, which is what I do for my customers.

There is some documentation in the developers guide

https://docs.geoserver.org/latest/en/developer/programming-guide/ows-services/implementing.html

Jody

···


Jody Garnett

On Tuesday, 1 August 2023 11:37:06 PM AEST Amirhossein Nikfal wrote:

After building the plugin by: mvn clean install -P netcdf

It seems to be build in the path:

geoserver/src/extension/netcdf/target/gs-netcdf-2.24-SNAPSHOT.jar

Afterwards, I copy gs-netcdf-2.24-SNAPSHOT.jar to the path:

geoserver/src/web/app/target/geoserver/WEB-INF/lib

Now after mvn jetty:run, the plugin is still not available in geoserver.

Would you please inform me what I should do?

You need to add the dependencies too. The release configuration tells you what they are. See https://github.com/geoserver/geoserver/blob/main/src/release/ext-netcdf.xml

Or you can just do the release build and install per the geoserver manual instructions.

Brad

Actually I was following the link below to include “netcdf” extension in the build:
https://docs.geoserver.org/latest/en/developer/maven-guide/index.html#building-extensions

I thought it should be straightforward according to the documents. It is interesting that after the compilation, the section below is added to the “Raster data sources”:
" org.geoserver.catalog.testreader.CustomFormat - Test custom coverage format - only visible with test jars in the classpath"

I wanted to make a small change to the netcdf plugin to make it support some other file suffixes besides “.nc”.

On Wed, Aug 2, 2023 at 10:07 AM Brad Hards <bradh@anonymised.com> wrote:

On Tuesday, 1 August 2023 11:37:06 PM AEST Amirhossein Nikfal wrote:

After building the plugin by: mvn clean install -P netcdf

It seems to be build in the path:

geoserver/src/extension/netcdf/target/gs-netcdf-2.24-SNAPSHOT.jar

Afterwards, I copy gs-netcdf-2.24-SNAPSHOT.jar to the path:

geoserver/src/web/app/target/geoserver/WEB-INF/lib

Now after mvn jetty:run, the plugin is still not available in geoserver.

Would you please inform me what I should do?

You need to add the dependencies too. The release configuration tells you what they are. See https://github.com/geoserver/geoserver/blob/main/src/release/ext-netcdf.xml

Or you can just do the release build and install per the geoserver manual instructions.

Brad


Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer

Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users