Skip to content

knowhowlab/keepass-maven-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KeePass Maven Plugin

Maven plugin to integrate KeePass into build process

Build Status

Buy me a coffee

Features

  • reads KeePass 2.x files
  • supports both credentials: master password and key file
  • sets properties from filtered KeePass entry
  • filter Groups by UUID, path, name and name regex
  • filter Entries by UUID, title and title regex
  • read custom entry attributes

Documentation

  • Detailed reference is in the User Manual
  • Project info and reports are here
  • Blog articles related to the plugin are here
  • Mailing List is here

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>