An easy way to detect unused property keys?

Given a set of property files and a list of files that can refer to keys in these property files, what is an easy way to determine which keys are not used?

Example:

Given a project with files

muppets.properties

kermit=Kermit the Frog
oscar=Oscar the Grouch

smurfs.properties

papa=Papa Smurf

and / WEB-INF / pages / template.jsp

Some jsp template displaying the key <bean:write bundle='muppets' key='kermit'/>.

then the running program with the inputs "* .properties" and "/WEB-INF/**/*.jsp" should inform

Unused properties:

muppets.properties
oscar

smurfs.properties
papa

What is the easiest way to do this? Are there any open source Java libraries that make this easier? The idea is to implement the solution inside the internal Maven plugin, which will be launched when the web application is created.

, ( , ), . .

: .

+3
2

IntelliJ IDEA . , , Maven.

IDEA . . , , , -, .

, http://www.jetbrains.net/devnet/index.jspa

+1

All Articles