PAC Maven Plugin

A pure Java implementation of tools for building Arch Linux packages.

License

License

Categories

Categories

Maven Build Tools
GroupId

GroupId

com.github.gino0631
ArtifactId

ArtifactId

pac-maven-plugin
Last Version

Last Version

1.0
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

PAC Maven Plugin
A pure Java implementation of tools for building Arch Linux packages.

Download pac-maven-plugin

How to add to project

<plugin>
    <groupId>com.github.gino0631</groupId>
    <artifactId>pac-maven-plugin</artifactId>
    <version>1.0</version>
</plugin>

Dependencies

compile (3)

Group / Artifact Type Version
com.github.gino0631 : pac-core jar 1.0
org.apache.maven : maven-plugin-api jar 3.2.5
org.apache.maven.shared : maven-shared-utils jar 3.1.0

provided (1)

Group / Artifact Type Version
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.5

test (4)

Group / Artifact Type Version
org.apache.maven.plugin-testing : maven-plugin-testing-harness jar 3.3.0
org.apache.maven : maven-core jar 3.2.5
org.apache.maven : maven-compat jar 3.2.5
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

PAC

Build Status Maven Central

A pure Java implementation of tools for building Arch Linux packages.

Requirements

  • Maven 3
  • Java 8

Usage

The tools consist of a Java library and plugins for build systems (currently, only Maven is supported).

Maven plugin

The first step is to add the plugin to your project:

<project>
  ...
  <build>
    <!-- To define the plugin version in your parent POM -->
    <pluginManagement>
        <plugin>
          <groupId>com.github.gino0631</groupId>
          <artifactId>pac-maven-plugin</artifactId>
          <version>...</version>
        </plugin>
        ...
      </plugins>
    </pluginManagement>
    <!-- To use the plugin goals in your POM or parent POM -->
    <plugins>
      <plugin>
        <groupId>com.github.gino0631</groupId>
        <artifactId>pac-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>create-arch-package</id>
            <phase>package</phase>
            <goals><goal>package</goal></goals>
            <configuration>
              <root>${project.build.directory}/product/linux-noarch</root>
              ...
              <permissionSets>
                ...
              </permissionSets>
            </configuration>
          </execution>
        </executions>
      </plugin>
    ...
    </plugins>
    ...
  </build>
  ...
</project>

The most important configuration parameter is root, which specifies the directory containing the payload to be installed. Its contents should be relative to the root directory on a target system.

The following parameters are required, but they have reasonable default values, so it is necessary to specify them only to change the defaults:

<packageName>${project.artifactId}</packageName>
<packageVersion>${project.artifact.selectedVersion.majorVersion}.${project.artifact.selectedVersion.minorVersion}.${project.artifact.selectedVersion.incrementalVersion}</packageVersion>
<releaseNumber>1</releaseNumber>
<architecture>any</architecture>

Other optional parameters allow to further define the properties of the package:

<description>...</description>
<url>...</url>
<packager>...</packager>
<licenses>
  <license>...</license>
</licenses>
<depends>
  <depend>...</depend>
</depends>
<optDepends>
  <optDepend>...</optDepend>
</optDepends>

Refer to PKGBUILD(5) and makepkg.conf(5) manual pages for information about their meanings and possible values.

By default, all installed files and directories will have 0644 and 0755 permissions set accordingly. To change this, use permissionSets, for example:

<permissionSets>
  <permissionSet>
    <includes>
      <include>**/*.sh</include>
    </includes>
    <fileMode>0755</fileMode>
  </permissionSet>
</permissionSets>

The permissionSets are processed in the order they are specified, and every permissionSet that matches (according to its include and exclude patterns) sets fileMode, directoryMode, uid and gid (if they are specified) on the file or directory in question.

Standalone library

Add a dependency on com.github.gino0631:pac-core to your project, and use PackageBuilder class.

Versions

Version
1.0