knowhowlab / keepass-maven-plugin

Maven plugin to integrate KeePass into build process
Apache License 2.0
5 stars 4 forks source link

KeePass Maven Plugin

Maven plugin to integrate KeePass into build process

Build Status

Buy me a coffee

Features

Documentation

Installation

    <plugin>
        <groupId>org.knowhowlab.maven.plugins</groupId>
        <artifactId>keepass-maven-plugin</artifactId>
        <version>0.4.1</version>
    </plugin>

Example

Read Username, Password and URL from test.kdbx file, group name production, entry title HTTP Server and store in properties http.username, http.password and http.url

    <plugin>
        <groupId>org.knowhowlab.maven.plugins</groupId>
        <artifactId>keepass-maven-plugin</artifactId>
        <version>0.4</version>
        <configuration>
            <file>${project.basedir}/src/main/keepass/test.kdbx</file>
            <password>admin123</password>
        </configuration>
        <executions>
            <execution>
                <id>read-production</id>
                <goals>
                    <goal>read</goal>
                </goals>
                <configuration>
                    <records>
                        <record>
                            <prefix>http.</prefix>
                            <group>name:production</group>
                            <entry>title:HTTP Server</entry>
                        </record>
                    </records>
                </configuration>
            </execution>
        </executions>
    </plugin>

Known issues

On Java 7 or 8 you can see an exception

java.security.InvalidKeyException: Illegal key size or default parameters

This means that JCE (Java Cryptography Extension) should be installed:

or use property that applies JCE workaround from here (JCE Workaround)

    <jceWorkaround>true</jceWorkaround>