Skip to content

dernasherbrezon/deb-maven-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

deb-maven-plugin .github/workflows/build.yml Quality Gate Status

maven plugin for .deb packaging. Control file generated from pom.xml. Required fields:

  • description
  • name
  • developers. At least 1 developer with valid email and name. This email will be used for maintainer section.

Custom installation scripts

.deb file supports installation scripts. See manual. Plugin supports these scripts as well. They should be placed into ./src/main/deb/. Supported scripts:

  • preinst
  • postinst
  • prerm
  • postrm

configuration

Parameter Filter property name Description
unixUserId ${config.unixUserId} User name for application files permissions.
unixGroupId ${config.unixGroupId} User group name for application files permissions.
installDir The directory into which the artefact is going to be installed. This value is optional. `/home/unixUserId` will be used if omitted
osDependencies List of ubuntu dependencies. Example: <logrotate>>=3.7.8</logrotate>. This will add .deb package dependency logrotate with version >=3.7.8
javaServiceWrapper Support tanuki service wrapper. This will create daemon configuration in `/etc/init.d/` directory and configure to use tanuki service wrapper
fileSets/fileSet* File set to include into final .deb. Could be file or directory
attachArtifact true/false. Attach artifact to project
customCopyRightFile Optional. File containing custom copyright, Useful if your package contains files with several different licenses
generateVersion true/false. Default true. Auto generate .deb version from current time according to the pattern ```yyyyMMddHHmmss```. If false - version will be taken from the project's version

fileSet

Parameter Description
source source file or directory. Wildcards ARE NOT supported.
target target file or directory in result .deb file. Absolute paths will be placed in the corresponding absolute paths on the filesystem. Relative paths will be placed relative to the "installDir" parameter

Sample configuration

<plugin>
	<groupId>com.aerse.maven</groupId>
	<artifactId>deb-maven-plugin</artifactId>
	<version>1.9</version>
	<executions>
		<execution>
			<id>package</id>
			<phase>package</phase>
			<goals>
				<goal>package</goal>
			</goals>
		</execution>
	</executions>
	<configuration>
		<unixUserId>ubuntu</unixUserId>
		<unixGroupId>ubuntu</unixGroupId>
		<installDir>/usr/bin</installDir>
		<osDependencies>
			<openjdk-7-jdk></openjdk-7-jdk>
			<nginx></nginx>
			<logrotate>>=3.7.8</logrotate>
			<imagemagick></imagemagick>
			<maven></maven>
		</osDependencies>
		<customCopyRightFile>${project.basedir}/src/main/resources/customText.txt</customCopyRightFile>
		<javaServiceWrapper>true</javaServiceWrapper>
		<fileSets>
			<fileSet>
				<source>${basedir}/src/main/deb</source>
				<target>/</target>
			</fileSet>
		</fileSets>
	</configuration>
</plugin>