Giter Site home page Giter Site logo

armedia / repo-creds-maven-plugin Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 41 KB

A Maven plugin to expose repository usernames and passwords in environment variable for consumption in complex builds

License: GNU Lesser General Public License v3.0

Java 100.00%

repo-creds-maven-plugin's Introduction

repocreds-maven-plugin

Decrypts server values from .m2/settings.xml and either writes them to files, or sets them into properties.

Status: released to Maven Central

Maven site

Usage

Add this to your pom.xml in the <build><plugins> section:

<plugin>
    <groupId>com.armedia.maven</groupId>
    <artifactId>repocreds-maven-plugin</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <executions>
        <execution>
            <id>repocreds-1</id>
            <phase>initialize</phase>
            <goals>
                <goal>decrypt</goal>
            </goals>
            <configuration>
                <!-- all these values can be set using -Dmaven.repocreds.<valueName> -->

                <!-- The ID of the server whose credentials you wish to decrypt -->
                <serverId>some-server-id</serverId>

                <!-- Whether to skip execution or not -->
                <skip>false</skip>

                <!-- Store values into files -->
                <usernameFile>username.txt</usernameFile>
                <passwordFile>password.txt</passwordFile>
                <privateKeyFile>privateKey.txt</privateKeyFile>
                <passphraseFile>passphrase.txt</passphraseFile>

                <!-- Store valuse into properties -->
                <usernameVar>var.username</usernameVar>
                <passwordVar>var.password</passwordVar>
                <privateKeyVar>var.privateKey</privateKeyVar>
                <passphraseVar>var.passphrase</passphraseVar>
            </configuration>
        </execution>
    </executions>
</plugin>

To call:

mvn repocreds:decrypt -Dmaven.repocreds.serverId=... -Dmaven.repocreds.usernameFile=username.txt ...

repo-creds-maven-plugin's People

Contributors

drivera-armedia avatar

Watchers

David Miller avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.