Skip to content

Commit

Permalink
Improve the application distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
io7m committed Sep 29, 2024
1 parent 0300f98 commit 0992c3d
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 0 deletions.
45 changes: 45 additions & 0 deletions com.io7m.laurel.distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,37 @@

<build>
<plugins>
<plugin>
<groupId>org.cyclonedx</groupId>
<artifactId>cyclonedx-maven-plugin</artifactId>
<version>${io7m.cyclonedx-maven-plugin.version}</version>
<executions>
<execution>
<id>assembly-bom</id>
<phase>prepare-package</phase>
<goals>
<goal>makeAggregateBom</goal>
</goals>
<configuration>
<projectType>library</projectType>
<schemaVersion>1.4</schemaVersion>
<includeBomSerialNumber>true</includeBomSerialNumber>
<includeCompileScope>true</includeCompileScope>
<includeProvidedScope>true</includeProvidedScope>
<includeRuntimeScope>true</includeRuntimeScope>
<includeSystemScope>true</includeSystemScope>
<includeTestScope>false</includeTestScope>
<includeLicenseText>true</includeLicenseText>
<outputReactorProjects>true</outputReactorProjects>
<outputFormat>xml</outputFormat>
<outputName>bom</outputName>
<outputDirectory>${project.build.directory}</outputDirectory>
<verbose>false</verbose>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
Expand All @@ -59,6 +90,20 @@
<plugin>
<groupId>io.github.zlika</groupId>
<artifactId>reproducible-build-maven-plugin</artifactId>
<executions>
<execution>
<id>strip-distribution</id>
<phase>package</phase>
<goals>
<goal>strip-jar</goal>
</goals>
<configuration>
<includes>
<include>${project.artifactId}-${project.version}-distribution.zip</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Expand Down
25 changes: 25 additions & 0 deletions com.io7m.laurel.distribution/src/main/assembly/distribution.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>

<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand All @@ -20,4 +22,27 @@
</dependencySet>
</dependencySets>

<files>
<file>
<source>src/main/sh/laurel</source>
<outputDirectory>/bin</outputDirectory>
<fileMode>0755</fileMode>
</file>
<file>
<source>src/main/sh/laurel-ui</source>
<outputDirectory>/bin</outputDirectory>
<fileMode>0755</fileMode>
</file>
</files>

<fileSets>
<fileSet>
<directory>${project.build.directory}</directory>
<includes>
<include>bom.xml</include>
</includes>
<outputDirectory>meta</outputDirectory>
</fileSet>
</fileSets>

</assembly>
12 changes: 12 additions & 0 deletions com.io7m.laurel.distribution/src/main/sh/laurel
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

if [ -z "${LAUREL_HOME}" ]
then
echo "LAUREL_HOME is unset" 1>&2
exit 1
fi

exec /usr/bin/env java \
-p "${LAUREL_HOME}/lib" \
-m com.io7m.laurel.cmdline/com.io7m.laurel.cmdline.LCMain \
"$@"
12 changes: 12 additions & 0 deletions com.io7m.laurel.distribution/src/main/sh/laurel-ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

if [ -z "${LAUREL_HOME}" ]
then
echo "LAUREL_HOME is unset" 1>&2
exit 1
fi

exec /usr/bin/env java \
-p "${LAUREL_HOME}/lib" \
-m com.io7m.laurel.gui.main/com.io7m.laurel.gui.main.LGUIMain \
"$@"
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>

<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">

<id>documentation</id>

<baseDirectory>${project.name}-${project.version}</baseDirectory>

<formats>
<format>zip</format>
</formats>

<fileSets>
<fileSet>
<directory>${project.build.directory}/documentation</directory>
<outputDirectory>/</outputDirectory>
</fileSet>
</fileSets>

</assembly>

0 comments on commit 0992c3d

Please sign in to comment.