In order to execute a maven plugin, you would need to have a pom.xml file. This fragment will be necessary for this plugin:
<build>
<plugins>
<plugin>
<!-- https://mvnrepository.com/artifact/de.pentabyte.tools/i18n-maven-plugin -->
<groupId>de.pentabyte.tools</groupId>
<artifactId>i18n-maven-plugin</artifactId>
<version>1.2.3</version>
<configuration>
<tableDirectory>${basedir}</tableDirectory>
</configuration>
</plugin>
</plugins>
</build>
This example configuration will make the plugin scan your basedir for i18n.xml files and will create JSON files as such: i18n_{locale}.js.
Unlike other target language files, you can instantly access the translations like this:
alert(i18n.form.validation.required$);
Please note the dollar sign, which acts as 'terminator'. Without it, Javascript would not be able to tell if you are about to access the tree structure or a concrete value.