Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #14

Merged
merged 3 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 19 additions & 117 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,18 @@
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>nl.aerius</groupId>

<parent>
<groupId>nl.aerius</groupId>
<artifactId>aerius-root-pom</artifactId>
<version>1.1.0-SNAPSHOT</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>

<artifactId>sld-generator-maven-plugin</artifactId>
<name>SLD Generator Maven Plugin</name>
<description>AERIUS SLD Generator Maven Plugin generates SLD style files from JSON.</description>
<version>1.1.0</version>
<version>1.2.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging>

<organization>
Expand All @@ -44,34 +51,13 @@
<tag>HEAD</tag>
</scm>

<distributionManagement>
<repository>
<id>aerius-nexus</id>
<url>https://nexus.aerius.nl/repository/maven-releases/</url>
</repository>
<snapshotRepository>
<id>aerius-nexus</id>
<url>https://nexus.aerius.nl/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>

<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<maven-plugin.version>3.8.2</maven-plugin.version>
<junit.version>5.7.2</junit.version>
<jackson.version>2.12.3</jackson.version>

<aerius-tools.version>1.1.0</aerius-tools.version>
<spotless.version>2.5.0</spotless.version>
<jacoco.version>0.8.12</jacoco.version>
<maven-plugin-api.version>3.9.9</maven-plugin-api.version>
<apache-commons-text.version>1.13.0</apache-commons-text.version>
<maven-plugin-plugin.version>3.15.1</maven-plugin-plugin.version>

<sonar.projectKey>aerius_sld-generator-maven-plugin</sonar.projectKey>
<sonar.moduleKey>${project.artifactId}</sonar.moduleKey>
<sonar.organization>aerius</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
</properties>

<repositories>
Expand All @@ -86,38 +72,34 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>${maven-plugin.version}</version>
<version>${maven-plugin-api.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>${maven-plugin.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.9</version>
<version>${apache-commons-text.version}</version>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.version}</version>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>${junit.version}</version>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -127,91 +109,11 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>${maven-plugin.version}</version>
<version>${maven-plugin-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
</plugin>

<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless.version}</version>
<configuration>
<formats>
<format>
<includes>
<include>pom.xml</include>
</includes>
<licenseHeader>
<file>pom-xml-header.txt</file>
<delimiter>&lt;project</delimiter>
</licenseHeader>
<trimTrailingWhitespace />
<endWithNewline />
<eclipseWtp>
<type>XML</type>
<files>
<file>pom-xml.prefs</file>
</files>
</eclipseWtp>
</format>
</formats>
<java>
<includes>
<include>src/*/java/nl/aerius/**/*.java</include>
</includes>
<licenseHeader>
<file>checkstyle-header.txt</file>
</licenseHeader>
<eclipse>
<file>eclipse_code_formatter_profile.xml</file>
</eclipse>
<importOrder>
<file>eclipse.importorder</file>
</importOrder>
</java>
</configuration>

<dependencies>
<dependency>
<groupId>nl.aerius</groupId>
<artifactId>tools</artifactId>
<version>${aerius-tools.version}</version>
</dependency>
</dependencies>
</plugin>

<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>3.0</version>
<configuration>
<header>license-header.txt</header>

<mapping>
<java>SLASHSTAR_STYLE</java>
</mapping>

<includes>
<include>**/*.java</include>
<include>**/pom.xml</include>
</includes>

<excludes>
<!-- External source code present in our source code -->
<exclude>**/src/main/java/com/**/*.java</exclude>
</excludes>
</configuration>
<dependencies>
<dependency>
<groupId>nl.aerius</groupId>
<artifactId>tools</artifactId>
<version>${aerius-tools.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/nl/aerius/sldgenerator/generator/SldUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,12 @@ public ConditionOperatorEnum getConditionOperator() {
public String getValue() {
return value;
}

@Override
public String toString() {
return "ParsedCondition [key=" + key + ", conditionOperator=" + conditionOperator + ", value=" + value + "]";
}

}

private enum SymbolizerType {
Expand Down
11 changes: 5 additions & 6 deletions src/main/java/nl/aerius/sldgenerator/input/ZoomLevel.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ public class ZoomLevel {
private int maxScale;

// Object must be constructable from Jackson
public ZoomLevel() {
}
public ZoomLevel() {}

public ZoomLevel(int zoomLevel, int minScale, int maxScale) {
public ZoomLevel(final int zoomLevel, final int minScale, final int maxScale) {
this.zoomLevel = zoomLevel;
this.minScale = minScale;
this.maxScale = maxScale;
Expand All @@ -42,7 +41,7 @@ public int getZoomLevel() {
return zoomLevel;
}

public void setZoomLevel(int zoomLevel) {
public void setZoomLevel(final int zoomLevel) {
this.zoomLevel = zoomLevel;
}

Expand All @@ -53,7 +52,7 @@ public int getMinScale() {
return minScale;
}

public void setMinScale(int minScale) {
public void setMinScale(final int minScale) {
this.minScale = minScale;
}

Expand All @@ -64,7 +63,7 @@ public int getMaxScale() {
return maxScale;
}

public void setMaxScale(int maxScale) {
public void setMaxScale(final int maxScale) {
this.maxScale = maxScale;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@
import java.util.ArrayList;

public class ZoomLevelsJsonFile extends ArrayList<ZoomLevel> {

private static final long serialVersionUID = 1L;

}
14 changes: 6 additions & 8 deletions src/main/java/nl/aerius/sldgenerator/plugin/SldPluginMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,13 @@
@Mojo(name = "generate-sld", defaultPhase = LifecyclePhase.PROCESS_RESOURCES)
public class SldPluginMojo extends AbstractMojo {

@Parameter
private File sourcePath;
@Parameter private File sourcePath;

@Parameter
private File targetPath;
@Parameter private File targetPath;

@Parameter
private String targetPostfix = "";
@Parameter private final String targetPostfix = "";

@Override
public void execute() throws MojoExecutionException {

try {
Expand All @@ -66,12 +64,12 @@ public void execute() throws MojoExecutionException {
SldPlugin.generateSld(getLog(), sourceFilePath, outputStream);
outputStream.close();

} catch (JacksonException e) {
} catch (final JacksonException e) {
throw new MojoExecutionException("JSON Parse Error at (" + sourceFilePath + ") while generating SLDs", e);
}
}

} catch (IOException e) {
} catch (final IOException e) {
throw new MojoExecutionException("IO Error while generating SLDs", e);
}
}
Expand Down