Home

Awesome

Build Status PRs Welcome Maven Central

tscfg-maven-plugin

Maven plugin that generates the boiler-plate for a Typesafe Config properties file using the excellent tscfg library by @carueda.

This plugin takes a configuration file (templateFile) and generates objects to hold your configuration.

Usage

<plugin>
    <groupId>com.github.timvlaer</groupId>
    <artifactId>tscfg-maven-plugin</artifactId>
    <version>1.0.0</version>
    <configuration>
        <templateFile>config-spec/service.spec.conf</templateFile>
        <packageName>com.sentiance.service.config</packageName>
        <className>ServiceConfig</className>
        <generateGetters>true</generateGetters>
        <useOptionals>false</useOptionals>
        <useDurations>true</useDurations>
    </configuration>
     <executions>
        <execution>
            <id>tscfg-sources</id>
            <goals>
                <goal>generate-config-class</goal>
            </goals>
        </execution>
    </executions>
</plugin>

To compile the generated code, add the Lightbend Config dependency to your project:

<dependency>
    <groupId>com.typesafe</groupId>
    <artifactId>config</artifactId>
    <version>1.3.4</version>
</dependency>

Configuration

Current limitations

Build the plugin yourself