Java code migrated from amsa-code/amsa-java/parent/amsa-util for reading configuration properties files.
The original code has been trimmed to the core classes in use in amsa-code and the API simplified significantly. This library is not a drop-in replacement for amsa-util configuration classes, it has breaking changes and also includes a couple of minor bug fixes (like using UTC timezone instead of the platform default in parsing of datetimes in configuration).
- supports encrypted fields
- supports resolving configuration (resolves nested references to other fields)
- loads configuration from file system, classpath, system properties, java.util.Map
- uses slf4j for logging
- compatible with Java 8, 11, 17 (see ci.yml)
- dependabot enabled with automerge for passing dependabot PRs (see ci.yml)
- Enforced 100% unit test coverage
- Enforced Spotbugs and PMD checks
Add this to your poml.xml:
<dependency>
<groupId>au.gov.amsa.er</groupId>
<artifactId>configuration-properties</artifactId>
<version>VERSION_HERE</version>
</dependency>mvn clean installNote that to complete the build there must be 100% code coverage and spotbugs and pmd maven plugins must pass checks.
Run
./release.sh <VERSION>You do of course need a relevant entry in the servers section of your .m2/settings.xml. Something like:
<servers>
...
<server>
<id>amsa-maven-private</id>
<username>amsa</username>
<password>ENCRYPTED_PASSWORD</password>
</server>
</servers>After running the script please update Releases (convert the new tag into a release).