Maven plugin to work with i18n json files. Currently includes a combine goal
that combines i18n files like this:
src/main/resources/publicand subdirectories are searched- files named
SomeComponent.i18n.jsonare processed
i18n files should look like this:
{
"de": {
"someKey": "Beschreibung"
},
"en": {
"someKey": "Some description"
}
}
After processing, a de.json and a en.json file will be generated (example de.json):
{
"SomeComponent": {
"someKey": "Beschreibung"
}
}
Configure the plugin in your pom.xml like this:
<plugin>
<groupId>de.terrestris</groupId>
<artifactId>i18n-maven-plugin</artifactId>
<executions>
<execution>
<id>generate-i18n</id>
<phase>generate-resources</phase>
<goals>
<goal>combine</goal>
</goals>
</execution>
</executions>
</plugin>
See the plugin help for details:
mvn i18n:help -Ddetail=true
Artifacts are deployed manually to the terrestris Reposilite instance (https://maven.terrestris.de/releases and https://maven.terrestris.de/snapshots).
Add a server entry with a Reposilite token that has write access to your ~/.m2/settings.xml for each of the ids reposilite-repository-releases and reposilite-repository-snapshots:
<server>
<id>reposilite-repository-releases</id>
<username>YOUR_USER</username>
<password>YOUR_TOKEN</password>
</server>
<server>
<id>reposilite-repository-snapshots</id>
<username>YOUR_USER</username>
<password>YOUR_TOKEN</password>
</server>
Use the Maven release plugin. It sets the release version, tags it, deploys
the artifacts (deploy goal) and bumps to the next snapshot version:
mvn release:prepare
mvn release:perform