user-id-maven-plugin Maven Plugin

Provide `user.id`-property for unix-like environments.

Лицензия

Лицензия

Категории

Категории

Maven Компиляция и сборка
Группа

Группа

org.rjung.util
Идентификатор

Идентификатор

user-id-maven-plugin
Последняя версия

Последняя версия

1.0
Дата

Дата

Тип

Тип

maven-plugin
Описание

Описание

user-id-maven-plugin Maven Plugin
Provide `user.id`-property for unix-like environments.
Ссылка на сайт

Ссылка на сайт

http://rynr.github.io/user-id-maven-plugin
Система контроля версий

Система контроля версий

http://github.com/rynr/user-id-maven-plugin

Скачать user-id-maven-plugin

Как подключить последнюю версию

<plugin>
    <groupId>org.rjung.util</groupId>
    <artifactId>user-id-maven-plugin</artifactId>
    <version>1.0</version>
</plugin>

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
org.apache.maven : maven-plugin-api jar 3.3.9
org.codehaus.plexus : plexus-utils jar 3.0.24

provided (1)

Идентификатор библиотеки Тип Версия
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.4

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12

Модули Проекта

Данный проект не имеет модулей.

user-id maven plugin

This plugin provides the user-id (UID) of the user executing the build. Due to the java system itself not providing this information but only the username, the plugin gets the property user.name of the systems properties. This unfortunately breaky the possibillity to use the plugin for non-standard unix-environments.

WARNING

Using this plugin could couple your build tightly to your environment.
Please use it only if you really need it.

Example

To enable the plugin add this to your build-plugins in your pom.xml.

<plugin>
  <!-- Plugin only works with unix-like environments, please use it wisely! -->
  <groupId>org.rjung.util</groupId>
  <artifactId>user-id-maven-plugin</artifactId>
  <version>1.0</version>
  <!-- (If you have an idea how I can omit the executions, please contact the author of this plugin) -->
  <executions>
    <execution>
      <goals>
        <goal>user-id</goal>
      </goals>
    </execution>
  </executions>
</plugin>

Now you can use ${user.id} within your pom.xml.

Configuration

You can adapt some different values to your need:

<plugin>
  <!-- Plugin only works with unix-like environments, please use it wisely! -->
  <!-- This contains the default configuration for standard unix systems. -->
  <groupId>org.rjung.util</groupId>
  <artifactId>user-id-maven-plugin</artifactId>
  <version>1.0</version>
  <configuration>
    <propertyName>user.id</propertyName>
    <passwdPath>/etc/passwd</passwdPath>
    <columnSeparator>:</columnSeparator>
    <usernameColumn>0</usernameColumn><!-- first column is 0 -->
    <uidColumn>2</uidColumn>
    <defaultUid>0</defaultUid>
  </configuration>
  <!-- (If you have an idea how I can omit the executions, please contact the author of this plugin) -->
  <executions>
    <execution>
      <goals>
        <goal>user-id</goal>
      </goals>
    </execution>
  </executions>
</plugin>

Links

Версии библиотеки

Версия
1.0