Skip to content

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

Notifications You must be signed in to change notification settings

jrichard8/uid-maven-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

uid maven plugin

This plugin provides the user-id (UID) and user-gid (GID) of the user executing the build. Due to the java system itself not providing this information but only the username.
This unfortunately break the possibility to use the plugin on 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>com.traxens.util</groupId>
  <artifactId>uid-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.uid} and ${user.gid} 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>
    <uidPropertyName>user.uid</uidPropertyName>
    <gidPropertyName>user.gid</gidPropertyName>
  </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

About

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

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages