Wicket I18N Maven Plugin

Plugin for generating Java constants containing Wicket I18N keys

License

License

Categories

Categories

Maven Build Tools Wicket User Interface Web Frameworks
GroupId

GroupId

com.jeroensteenbeeke
ArtifactId

ArtifactId

wicket-i18n-maven-plugin
Last Version

Last Version

1.1
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

Wicket I18N Maven Plugin
Plugin for generating Java constants containing Wicket I18N keys
Project URL

Project URL

https://github.com/jsteenbeeke/wicket-i18n-plugin
Source Code Management

Source Code Management

https://github.com/jsteenbeeke/wicket-i18n-plugin

Download wicket-i18n-maven-plugin

How to add to project

<plugin>
    <groupId>com.jeroensteenbeeke</groupId>
    <artifactId>wicket-i18n-maven-plugin</artifactId>
    <version>1.1</version>
</plugin>

Dependencies

compile (7)

Group / Artifact Type Version
com.google.guava : guava jar 19.0
javax.servlet : servlet-api jar 3.0-alpha-1
org.apache.maven : maven-plugin-api jar 3.3.9
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.4
org.apache.wicket : wicket-core jar 7.2.0
org.slf4j : slf4j-simple jar 1.7.13
org.sonatype.plexus : plexus-build-api jar 0.0.7

provided (1)

Group / Artifact Type Version
org.apache.maven : maven-core jar 3.3.9

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

wicket-i18n-plugin

A Maven plugin for gathering wicket:message keys from Wicket components and property files into a convenient constant class.

Configuration

Add the following segment to the <plugins> section of your POM's <build> tag.

<plugin>
	<groupId>com.jeroensteenbeeke</groupId>
	<artifactId>wicket-i18n-maven-plugin</artifactId>
	<version>1.1</version>
	<configuration>
		<packagePrefix>your.package.prefix</packagePrefix>
		<monitoredPackages>
			<monitoredPackage>path.to.your.web.package</monitoredPackage>
		</monitoredPackages>
	</configuration>
	<executions>
		<execution>
			<id>generate-sources</id>
			<phase>generate-sources</phase>
			<goals>
				<goal>generate</goal>
			</goals>
		</execution>
	</executions>
</plugin>

This will create a minimal config that will scan the indicated monitoredPackage, and read the keys from any Wicket component HTML file it finds. In addition to this basic setup, there are a number of options to expand the functionality of this plugin.

Option Required Type
packagePrefix Yes String
monitoredPackages Yes List of Strings
propertyFiles No List of Strings
rootClassName No (defaults to I18N) String
javaDirectory No (defaults to src/main/java) String
outputDirectory No (defaults to target/generated-sources/wicket-i18n String

Execution

To run the plugin, simply run mvn generate-sources in your project directory.

Versions

Version
1.1
1.0