Skip to content

Commit

Permalink
pom cleanup, reformat, added distro-zip & checksums
Browse files Browse the repository at this point in the history
propagate maven project version/date to language file
  • Loading branch information
edeso committed Sep 6, 2021
1 parent 53a8307 commit 7aafc93
Show file tree
Hide file tree
Showing 4 changed files with 143 additions and 46 deletions.
30 changes: 30 additions & 0 deletions distro-zip.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd">
<id>distro zip</id>
<formats>
<format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<dependencySets>
<dependencySet>
<!-- place extension jar in folder root to be parsed by OJ -->
<outputDirectory>/</outputDirectory>
<useTransitiveFiltering>false</useTransitiveFiltering>
<includes>
<include>${artifact}</include>
</includes>
</dependencySet>
<dependencySet>
<!-- place deps in a extension lib/ subfolder, as jgrapht is a shared dependency -->
<outputDirectory>/lib</outputDirectory>
<unpack>false</unpack>
<scope>runtime</scope>
<useTransitiveFiltering>true</useTransitiveFiltering>
<useProjectArtifact>false</useProjectArtifact>
<excludes>
<exclude>org.openjump:OpenJUMP</exclude>
</excludes>
</dependencySet>
</dependencySets>
</assembly>
152 changes: 108 additions & 44 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,50 +1,114 @@
<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/maven-v4_0_0.xsd">
<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/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>
<groupId>org.openjump</groupId>
<artifactId>color-chooser-extension</artifactId>
<version>2.1.0</version>
<name>color-chooser-extension</name>
<description>Color chooser extension</description>
<modelVersion>4.0.0</modelVersion>
<groupId>org.openjump</groupId>
<artifactId>color-chooser-extension</artifactId>
<version>2.1.0</version>
<name>color-chooser-extension</name>
<description>Color chooser extension</description>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.number>0.0.0</version.number>
<jts.version>1.18.1</jts.version>
</properties>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<repositories>
<repository>
<id>ojrepo</id>
<name>OpenJUMP Snapshot Repository</name>
<url>https://ojrepo.soldin.de/</url>
</repository>
</repositories>
<repositories>
<repository>
<id>ojrepo</id>
<name>OpenJUMP Snapshot Repository</name>
<url>https://ojrepo.soldin.de/</url>
</repository>
</repositories>

<dependencies>

<dependency>
<groupId>org.openjump</groupId>
<artifactId>OpenJUMP</artifactId>
<version>2.0-main-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>org.locationtech.jts</groupId>
<artifactId>jts-core</artifactId>
<version>${jts.version}</version>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>

</dependencies>
<dependencies>
<dependency>
<groupId>org.openjump</groupId>
<artifactId>OpenJUMP</artifactId>
<version>2.0-main-SNAPSHOT</version>
</dependency>
</dependencies>

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>color_chooser/language/</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>build-datestamp-property</id>
<phase>validate</phase>
<goals>
<goal>timestamp-property</goal>
</goals>
<configuration>
<name>project.build.datestamp</name>
<pattern>yyyy-MM-dd</pattern>
<locale>en_US</locale>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
<executions>
<execution>
<id>distro zip</id>
<phase>package</phase>
<configuration>
<descriptors>
<descriptor>distro-zip.xml</descriptor>
</descriptors>
<attach>false</attach>
</configuration>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.nicoulaj.maven.plugins</groupId>
<artifactId>checksum-maven-plugin</artifactId>
<version>1.10</version>
<executions>
<execution>
<goals>
<goal>files</goal>
</goals>
<phase>package</phase>
<configuration>
<fileSets>
<fileSet>
<directory>${project.build.directory}</directory>
<includes>
<include>${project.build.finalName}.zip</include>
</includes>
</fileSet>
</fileSets>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

import org.openjump.core.ui.plugin.colorchooser.FeatureColorChooserPlugIn;

import com.vividsolutions.jump.I18N;
import com.vividsolutions.jump.workbench.plugin.Extension;
import com.vividsolutions.jump.workbench.plugin.PlugInContext;

public class FeatureColorChooserExtension extends Extension {

private static final String NAME = "Feature Color Chooser PlugIn (Giuseppe Aruta - adapted from SkyJUMP sourceforge.net/projects/skyjump/)";
private static final String VERSION = "2.1.0 (2021-08-18)";
private static final String VERSION = I18N.getInstance("color_chooser").get("color_chooser.version");

public String getName() {
return NAME;
Expand Down
4 changes: 3 additions & 1 deletion src/main/resources/color_chooser/language/jump.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#jump.properties
# do not translate, will be replaced by maven build
color_chooser.version=${project.version} (${project.build.datestamp})
# translate the following entries only
color= Colour
color-by-attribute = Colour by Attribute
choose-color = Choose Colour
Expand Down

0 comments on commit 7aafc93

Please sign in to comment.