Maven plugin to integrate KeePass into build process
<plugin>
<groupId>org.knowhowlab.maven.plugins</groupId>
<artifactId>keepass-maven-plugin</artifactId>
<version>0.4.1</version>
</plugin>
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>
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>