I'm creating a docker that runs geoserver on top of linux and tomcat. I'm installing geoserver by adding the gs-web-app dependency in my pom, and moving it into tomcat's webapps folder in the build phase of my pom. This part works fine. I'd also like to add the css styling extension. My process involved including the dependency for gs-css and moving it into geoserver/WEB-INF/lib in the build phase. This part works to the extent that the gs-css jar makes it into the lib directory, and when I try to create a new CSS style, CSS is listed as an option under formats.
The error occurs when I try to validate my new css style.
Caused by: java.lang.NoClassDefFoundError: org/geotools/styling/css/CssParser
at org.geoserver.community.css.web.CssHandler.convertToSLD(CssHandler.java:133)
at org.geoserver.community.css.web.CssHandler.validate(CssHandler.java:150)
Relevant pieces of pom
<properties>
<geoserver.version>2.12.2</geoserver.version>
</properties>
<dependencies>
<dependency>
<groupId>org.geoserver.web</groupId>
<artifactId>gs-web-app</artifactId>
<version>${geoserver.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-css</artifactId>
<version>${geoserver.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-querylayer</artifactId>
<version>${geoserver.version}</version>
<type>jar</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-dependencies</id>
<phase>process-sources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.geoserver.web</groupId>
<artifactId>gs-web-app</artifactId>
<version>${geoserver.version}</version>
<type>jar</type>
<excludes>**/layergroups/**,
**/workspaces/cite/,
**/workspaces/it.geosolutions/,
**/workspaces/nurc/,
**/workspaces/sde/,
**/workspaces/sf/,
**/workspaces/tiger/,
**/workspaces/topp/</excludes>
<destFileName>geoserver.war.zip</destFileName>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/docker/geoserver</outputDirectory>
</configuration>
</execution>
<execution>
<id>unpack-dependencies-5</id>
<phase>process-sources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-css</artifactId>
<version>${geoserver.version}</version>
<type>jar</type>
</artifactItem>
<artifactItem>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-querylayer</artifactId>
<version>${geoserver.version}</version>
<type>jar</type>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/docker/geoserver/WEB-INF/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
Does it look like I'm doing anything wrong here? I'm installing the querylayers extension in the same way, and it seems to be functioning properly.
I believe Andrea is correct. For now I'll just pull in the extension in a zip with curl. I still seek a good way to move the dependencies of gs-css with maven.