Skip to content

pro-crafting/yaml-properties-maven-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yaml-Properties Maven Plugin

A Yaml extension of the MojoHaus Properties Maven Plugin v.1.0.1

Continuous Integration:
Maven Central
Build Status

Project is going to be archived.

The properties-maven-plugin can now be expanded with additional file formats. I will update the readme once a final solution for yaml properties files is available. https://github.com/mojohaus/properties-maven-plugin/tree/master/src/main/java/org/codehaus/mojo/properties/managers

How to use it?

This extension provides capability to import content from a yaml file into your pom. To this end, you should read the instructions for the properties-maven-plugin.

Just rememeber that current release is version 1.1.4. To use it in Maven, replace the following code

<groupId>com.pro-crafting.maven</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.1.4</version>

with:

<groupId>com.pro-crafting.maven</groupId>
<artifactId>yaml-properties-maven-plugin</artifactId>
<version>1.1.4</version>

Example of usage:

<plugin>
    <groupId>it.ozimov</groupId>
    <artifactId>yaml-properties-maven-plugin</artifactId>
    <version>LATEST</version>
    <executions>
        <execution>
            <phase>initialize</phase>
            <goals>
                <goal>read-project-properties</goal>
            </goals>
            <configuration>
                <files>
                    <file>config/my_configuration.yaml</file>
                </files>
            </configuration>
        </execution>
    </executions>
</plugin>

And then usage in the pom as

 <plugin>
    <groupId>some groupId</groupId>
    <artifactId>some artifactId</artifactId>
    <version>X.Y.Z</version>
    <configuration>
        <cfg_1>${my_yaml_key}</cfg_1>
    </configuration>
</plugin>

Packages

No packages published

Languages

  • Java 100.0%