Repository navigation
KeePassJava2 3.0.0
The first release of version 3. It needs Java 11, and is on Maven Central.
Version 2 is still maintained for now, with bug and security fixes; its current release is 2.2.6, on the master branch. Version 3 is developed on v3-develop, and v3-master holds the latest 3.x release.
Changes you may need to act on
Upgrading from 2.x needs some, mostly minor, changes to your code and build:
-
Java 11 is required.
-
One KDBX implementation. The Jackson implementation is now the KDBX database,
KdbxDatabase(wasJacksonDatabase). The Simple, JAXB and DOM implementations are removed. -
No generics on the database classes.
Database,Group,Entryand so on are no longer generic, so declarations such asDatabase<?,?,?,?>become plainDatabase. -
Renamed classes, for example
KdbxCredsis nowKdbxCredentials. -
New artifacts (group
org.linguafranca.pwdb):2.x 3.0.0 KeePassJava2-jacksonKeePassJava2.kdbx.databaseKeePassJava2-kdbxKeePassJava2.kdbx.ioKeePassJava2-kdbKeePassJava2.kdbdatabasedatabaseKeePassJava2(all)KeePassJava2(KDBX and KDB)KeePassJava2-simple,-jaxb,-domremoved -
New Java module names (#93), deliberately different from 2.x:
org.linguafranca.pwdb.database,org.linguafranca.pwdb.kdb,org.linguafranca.pwdb.kdbx.io,org.linguafranca.pwdb.kdbx.databaseandorg.linguafranca.pwdb.all. Update yourrequiresclauses.
See the Quick Start for a worked example in the version 3 API.
New
- Pluggable storage of property values, so sensitive values such as passwords can be kept protected in memory. By default the password is protected.
- Fluent building of entries, e.g.
group.addEntry("entry").addProperty(USER_NAME, "Tom").addProperty(PASSWORD, ...), and more convenience methods. - Group times (#99):
Groupnow hasgetCreationTime(),getLastModificationTime(),getLastAccessTime(),getExpires()/setExpires()andgetExpiryTime()/setExpiryTime(), asEntrydoes. - Loading XML (#96):
KdbxDatabase.load(StreamFormat, Credentials, InputStream), for example withStreamFormat.Nonefor XML; KeePass XML exportProtectInMemoryvalues stay protected, andloadXml()no longer fails onProtectedvalues.
Fixes
Version 3 includes all the fixes made in 2.x up to 2.2.6:
- Attachments: KDBX 4 files stored attachments twice, and each save of a loaded database added another copy (#97);
Meta/Binarieswas written in a form KeePassXC drops for KDBX 3.1 (#98). - Non-UTF-8 default encoding: non-ASCII text was saved in the platform encoding, so the database couldn't be loaded back (#104, #83).
- Custom icons were serialized incorrectly (#87), and an empty autotype element KeePass needs was missing (#89).
- No test or logging libraries are passed on to your application (#81).
Dependencies and build
- Dependencies are current, as in 2.2.5 (#88, #90): Jackson 2.22.3, Woodstox 7.3.0, Guava 33.7.2, Bouncy Castle 1.86 and Commons Codec 1.22.1.
- The Maven plugins are updated (#68), and publishing uses the Central Publishing plugin.
- Building KeePassJava2 needs JDK 11 or later; it compiles with
--release 11.
Maven
<dependency>
<groupId>org.linguafranca.pwdb</groupId>
<artifactId>KeePassJava2.kdbx.database</artifactId>
<version>3.0.0</version>
</dependency>Or KeePassJava2 for the KDBX and KDB implementations together.
See the CHANGELOG for the full history.