Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cedricwalter/properties-sync-maven-plugin

Apache maven plugin for failing fast at build time when using maven resources filtering with environment based <filters>. This maven plugin will force you to keep in sync all properties files with the reference.
https://github.com/cedricwalter/properties-sync-maven-plugin

apache-maven continuous-delivery continuous-integration java plugins

Last synced: about 1 month ago
JSON representation

Apache maven plugin for failing fast at build time when using maven resources filtering with environment based <filters>. This maven plugin will force you to keep in sync all properties files with the reference.

Awesome Lists containing this project

README

        

# Introduction
Apache maven plugin for **failing fast** at build time when using maven resources filtering with environment based ``

## Scenario
* You use maven filtering: some files get filtered because they may contains stage dependent values for example.
* you have some properties files that are used, and need to be kept in sync with another reference.properties.

This maven plugin will force you to keep in sync all properties files with the reference.

**In Short it compare files against a reference file and enforce consistency.**

# Quick Usage
properties-sync-maven-plugin is available in Maven Central.

```


com.cedricwalter
properties-sync-maven-plugin
1.0



properties

process-resources

${basedir}/src/main/resources
reference.properties
[a-zA-Z]*.properties



```

# Complete example

Imagine you have a folder src/main/filters which contains
* localhost.properties
* host1.properties

You want to force developer to keep in sync localhost.properties and host1.properties

Example of filtering
```


${basedir}/src/main/filters/${hostname}.properties




org.apache.maven.plugins
maven-resources-plugin
3.0.1


filter-resources
process-resources

resources



pdf
zip
jks

jar
tar.gz






com.cedricwalter
properties-sync-maven-plugin
1.0



properties

process-resources

${basedir}/src/main/filters
localhost.properties
host1.properties




```

The build will now failed if both files do not contains the same number of keys.