[Geoserver-devel] geos-9413 update

I have been intent on reusing geoserver gs-web-app war, something that we noticed was not working during foss4g workshop. The idea was to publish this as a jar (to save space) rather than deploy the war to our repository each time.

With the upcoming 2.16.2 release I figured I would look again, here are my findings:

  1. The gs-web-app jar is empty (no content is included)
  2. A misconfigured deploy is causing geoserver.war to be deployed twice (both as a jar and as a war)

Details https://osgeo-org.atlassian.net/browse/GEOS-9414

···

Jody Garnett

Hi Jody,
I’ve noticed the same thing recently too, and it’s the same with the geowebcache gwc-web project, the jar is deployed with the full war contents.

I’m not sure how to fix it though, have you found a solution? if not I guess I could do some research over the next few days.

Cheers,
Gabriel

···

Gabriel Roldán

I assume the problem is the helper plugin and I would like to remove it:

org.codehaus.mojo build-helper-maven-plugin 1.8 attach-war package attach-artifact ${project.build.directory}/geoserver.war war

I think I have an approach, but it involves configuring the war and jetty plugins. Still arguing over where stuff goes, since I am mostly reverse engineering the default WAR packaging.

Start with JAR packaging: This may not be worth it, easier to skip deployment …

jar

Exclude some stuff from the JAR packaging:

org.apache.maven.plugins maven-jar-plugin 3.2.0 ${project.build.directory}/geoserver WEB-INF/lib/* true

Manually define a WAR (rather than use a helper plugin):

maven-war-plugin
3.0.0



target/geoserver


Configure JETTY:

org.eclipse.jetty jetty-maven-plugin ${jetty.version} /geoserver ${project.basedir}/geoserver/WEB-INF/web.xml ${project.build.directory}/geoserver ${jetty.port} 10000 jar ${jetty.stopPort} GEOSERVER_JETTY_STOPKEY false ${project.build.testOutputDirectory}/jetty-context.xml

Until we figure out deploy I was skipping it:

org.apache.maven.plugins maven-deploy-plugin 2.7 true
···


Jody Garnett