Skip to content

Commit

Permalink
Use maven-assembly-plugin to package the project (#27)
Browse files Browse the repository at this point in the history
Signed-off-by: Owen <[email protected]>
  • Loading branch information
OwenCorrigan76 authored Jun 27, 2024
1 parent 2e542e9 commit 5d5c3b2
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The implementation is currently still in progress.
## Build

```shell
mvn package assembly:single
mvn package
```

## Run
Expand Down
22 changes: 21 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
<maven.dependency.version>3.6.1</maven.dependency.version>
<maven.source.version>3.2.1</maven.source.version>
<maven.jar.version>3.3.0</maven.jar.version>
<!-- <maven.assembly.version>3.4.2</maven.assembly.version> -->
<maven.assembly.version>3.4.2</maven.assembly.version>
<maven.gpg.version>3.1.0</maven.gpg.version>
<sonatype.nexus.staging>1.6.13</sonatype.nexus.staging>

Expand Down Expand Up @@ -233,6 +233,26 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>${maven.assembly.version}</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<tarLongFileMode>posix</tarLongFileMode>
<descriptors>
<descriptor>src/main/assembly/dist.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
Expand Down
30 changes: 30 additions & 0 deletions src/main/assembly/dist.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>zip</id>
<includeBaseDirectory>true</includeBaseDirectory>

<formats>
<format>tar.gz</format>
<format>zip</format>
<format>dir</format>
</formats>
<fileSets>
<fileSet>
<directory>${project.basedir}</directory>
<includes>
<include>README*</include>
<include>LICENSE*</include>
</includes>
<fileMode>0644</fileMode>
</fileSet>
</fileSets>
<dependencySets>
<dependencySet>
<scope>runtime</scope>
<outputDirectory>libs</outputDirectory>
<fileMode>0644</fileMode>
<outputFileNameMapping>${artifact.groupId}.${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
</dependencySet>
</dependencySets>
</assembly>

0 comments on commit 5d5c3b2

Please sign in to comment.