Skip to content

Commit

Permalink
add distro zip creation
Browse files Browse the repository at this point in the history
  • Loading branch information
edeso committed Aug 29, 2021
1 parent 6678fcb commit 0bec4fc
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 2 deletions.
28 changes: 28 additions & 0 deletions distro-zip.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<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>
</dependencySets>
<!-- place deps in a extension lib/ subfolder
using fileset to easily include downloadeded jmat
system scope deps are ignored by dependencySet -->
<fileSets>
<fileSet>
<directory>${project.build.directory}/libs/</directory>
<outputDirectory>/lib</outputDirectory>
</fileSet>
</fileSets>
</assembly>
74 changes: 72 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<artifactId>jmat</artifactId>
<version>5.0</version>
<scope>system</scope>
<systemPath>${project.build.directory}/lib/jmat_5.0.jar</systemPath>
<systemPath>${project.build.directory}/libs/jmat_5.0.jar</systemPath>
</dependency>
<dependency>
<groupId>com.github.yannrichet</groupId>
Expand All @@ -55,6 +55,10 @@
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.6.6</version>
<configuration>
<alwaysVerifyChecksum>true</alwaysVerifyChecksum>
</configuration>
<executions>
<!-- fetch jmat from sf.net -->
<execution>
Expand All @@ -66,7 +70,73 @@
<url>https://sourceforge.net/projects/jmat/files/jmat/5.0/jmat_5.0.jar</url>
<sha1>64e3d669401fa3cdaba62977b770bfe8c651e891</sha1>
<unpack>false</unpack>
<outputDirectory>${project.build.directory}/lib/</outputDirectory>
<outputDirectory>${project.build.directory}/libs/</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<!-- fix "not covered by lifecycle configuration" Eclipse issue -->
<?m2e execute onConfiguration,onIncremental?>
<id>copy-dependencies</id>
<phase>process-resources</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/libs/</outputDirectory>
<excludeTransitive>true</excludeTransitive>
<includeScope>runtime</includeScope>
<excludeArtifactIds>OpenJUMP</excludeArtifactIds>
</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>
Expand Down

0 comments on commit 0bec4fc

Please sign in to comment.