Author: tchemit Date: 2012-07-09 14:53:13 +0200 (Mon, 09 Jul 2012) New Revision: 1960 Url: http://nuiton.org/repositories/revision/i18n/1960 Log: refs #928 (fix default includes) + improve its Added: trunk/maven-i18n-plugin/src/it/ano-1494/iso-8859-1/goals.txt trunk/maven-i18n-plugin/src/it/ano-1494/migrate/goals.txt trunk/maven-i18n-plugin/src/it/ano-1494/utf-8/goals.txt trunk/maven-i18n-plugin/src/it/ano-672/goals.txt trunk/maven-i18n-plugin/src/it/evo-1507/goals.txt trunk/maven-i18n-plugin/src/it/parsers/newProject/goals.txt trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/goals.txt trunk/maven-i18n-plugin/src/main/resources/xwork-validator-1.0.3.dtd trunk/maven-i18n-plugin/src/test/java/org/nuiton/i18n/plugin/parser/SourceEntryTest.java trunk/maven-i18n-plugin/src/test/resources/ trunk/maven-i18n-plugin/src/test/resources/MyBean-validation.xml Removed: trunk/maven-i18n-plugin/src/it/ano-1494/iso-8859-1/invoker.properties trunk/maven-i18n-plugin/src/it/ano-1494/migrate/invoker.properties trunk/maven-i18n-plugin/src/it/ano-1494/utf-8/invoker.properties trunk/maven-i18n-plugin/src/it/ano-672/invoker.properties trunk/maven-i18n-plugin/src/it/evo-1507/invoker.properties trunk/maven-i18n-plugin/src/it/parsers/newProject/invoker.properties trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/invoker.properties Modified: trunk/maven-i18n-plugin/pom.xml trunk/maven-i18n-plugin/src/it/parsers/newProject/src/main/resources/org/nuiton/i18n/test/MyBean-validation.xml trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/src/main/resources/org/nuiton/i18n/test/MyBean-validation.xml trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/AbstractI18nMojo.java trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/AbstractI18nParserMojo.java trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserGWTJavaMojo.java trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserJavaMojo.java trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserJspMojo.java trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserTapestryMojo.java trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserValidationMojo.java Modified: trunk/maven-i18n-plugin/pom.xml =================================================================== --- trunk/maven-i18n-plugin/pom.xml 2012-07-09 12:52:24 UTC (rev 1959) +++ trunk/maven-i18n-plugin/pom.xml 2012-07-09 12:53:13 UTC (rev 1960) @@ -260,8 +260,8 @@ <id>run-its</id> <activation> <property> - <name>performRelease</name> - <value>true</value> + <name>maven.test.skip</name> + <value>!true</value> </property> </activation> <build> @@ -278,7 +278,6 @@ </localRepositoryPath> <settingsFile>src/it/settings.xml</settingsFile> <cloneProjectsTo>${project.build.directory}/its</cloneProjectsTo> - <debug>${maven.verbose}</debug> </configuration> <executions> <execution> Added: trunk/maven-i18n-plugin/src/it/ano-1494/iso-8859-1/goals.txt =================================================================== --- trunk/maven-i18n-plugin/src/it/ano-1494/iso-8859-1/goals.txt (rev 0) +++ trunk/maven-i18n-plugin/src/it/ano-1494/iso-8859-1/goals.txt 2012-07-09 12:53:13 UTC (rev 1960) @@ -0,0 +1 @@ +clean compile \ No newline at end of file Deleted: trunk/maven-i18n-plugin/src/it/ano-1494/iso-8859-1/invoker.properties =================================================================== --- trunk/maven-i18n-plugin/src/it/ano-1494/iso-8859-1/invoker.properties 2012-07-09 12:52:24 UTC (rev 1959) +++ trunk/maven-i18n-plugin/src/it/ano-1494/iso-8859-1/invoker.properties 2012-07-09 12:53:13 UTC (rev 1960) @@ -1,45 +0,0 @@ -### -# #%L -# I18n :: Maven Plugin -# -# $Id$ -# $HeadURL$ -# %% -# Copyright (C) 2007 - 2010 CodeLutin -# %% -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Lesser Public License for more details. -# -# You should have received a copy of the GNU General Lesser Public -# License along with this program. If not, see -# <http://www.gnu.org/licenses/lgpl-3.0.html>. -# #L% -### -# A comma or space separated list of goals/phases to execute, may -# specify an empty list to execute the default goal of the IT project -invoker.goals=clean compile -Dlog4j.configuration=file:src/test/resources/log4j.properties - -# Optionally, a list of goals to run during further invocations of Maven -#invoker.goals.2=${project.groupId}:${project.artifactId}:${project.version}:run - -# A comma or space separated list of profiles to activate -#invoker.profiles=run-all run-once - -# The value for the environment variable MAVEN_OPTS -#invoker.mavenOpts=-Dfile.encoding=UTF-16 -Xms32m -Xmx256m - -# Possible values are "fail-fast" (default), "fail-at-end" and "fail-never" -invoker.failureBehavior=fail-at-end - -# The expected result of the build, possible values are "success" (default) and "failure" -#invoker.buildResult=success - -# A boolean value controlling the -N flag, defaults to "false" -#invoker.nonRecursive=false Added: trunk/maven-i18n-plugin/src/it/ano-1494/migrate/goals.txt =================================================================== --- trunk/maven-i18n-plugin/src/it/ano-1494/migrate/goals.txt (rev 0) +++ trunk/maven-i18n-plugin/src/it/ano-1494/migrate/goals.txt 2012-07-09 12:53:13 UTC (rev 1960) @@ -0,0 +1 @@ +clean compile -Dlog4j.configuration=file:src/main/resources/log4j.properties \ No newline at end of file Deleted: trunk/maven-i18n-plugin/src/it/ano-1494/migrate/invoker.properties =================================================================== --- trunk/maven-i18n-plugin/src/it/ano-1494/migrate/invoker.properties 2012-07-09 12:52:24 UTC (rev 1959) +++ trunk/maven-i18n-plugin/src/it/ano-1494/migrate/invoker.properties 2012-07-09 12:53:13 UTC (rev 1960) @@ -1,45 +0,0 @@ -### -# #%L -# I18n :: Maven Plugin -# -# $Id$ -# $HeadURL$ -# %% -# Copyright (C) 2007 - 2010 CodeLutin -# %% -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Lesser Public License for more details. -# -# You should have received a copy of the GNU General Lesser Public -# License along with this program. If not, see -# <http://www.gnu.org/licenses/lgpl-3.0.html>. -# #L% -### -# A comma or space separated list of goals/phases to execute, may -# specify an empty list to execute the default goal of the IT project -invoker.goals=clean compile -Dlog4j.configuration=file:src/test/resources/log4j.properties - -# Optionally, a list of goals to run during further invocations of Maven -#invoker.goals.2=${project.groupId}:${project.artifactId}:${project.version}:run - -# A comma or space separated list of profiles to activate -#invoker.profiles=run-all run-once - -# The value for the environment variable MAVEN_OPTS -#invoker.mavenOpts=-Dfile.encoding=UTF-16 -Xms32m -Xmx256m - -# Possible values are "fail-fast" (default), "fail-at-end" and "fail-never" -invoker.failureBehavior=fail-at-end - -# The expected result of the build, possible values are "success" (default) and "failure" -#invoker.buildResult=success - -# A boolean value controlling the -N flag, defaults to "false" -#invoker.nonRecursive=false Added: trunk/maven-i18n-plugin/src/it/ano-1494/utf-8/goals.txt =================================================================== --- trunk/maven-i18n-plugin/src/it/ano-1494/utf-8/goals.txt (rev 0) +++ trunk/maven-i18n-plugin/src/it/ano-1494/utf-8/goals.txt 2012-07-09 12:53:13 UTC (rev 1960) @@ -0,0 +1 @@ +clean test \ No newline at end of file Deleted: trunk/maven-i18n-plugin/src/it/ano-1494/utf-8/invoker.properties =================================================================== --- trunk/maven-i18n-plugin/src/it/ano-1494/utf-8/invoker.properties 2012-07-09 12:52:24 UTC (rev 1959) +++ trunk/maven-i18n-plugin/src/it/ano-1494/utf-8/invoker.properties 2012-07-09 12:53:13 UTC (rev 1960) @@ -1,45 +0,0 @@ -### -# #%L -# I18n :: Maven Plugin -# -# $Id$ -# $HeadURL$ -# %% -# Copyright (C) 2007 - 2010 CodeLutin -# %% -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Lesser Public License for more details. -# -# You should have received a copy of the GNU General Lesser Public -# License along with this program. If not, see -# <http://www.gnu.org/licenses/lgpl-3.0.html>. -# #L% -### -# A comma or space separated list of goals/phases to execute, may -# specify an empty list to execute the default goal of the IT project -invoker.goals=clean test -Dlog4j.configuration=file:src/test/resources/log4j.properties - -# Optionally, a list of goals to run during further invocations of Maven -#invoker.goals.2=${project.groupId}:${project.artifactId}:${project.version}:run - -# A comma or space separated list of profiles to activate -#invoker.profiles=run-all run-once - -# The value for the environment variable MAVEN_OPTS -#invoker.mavenOpts=-Dfile.encoding=UTF-16 -Xms32m -Xmx256m - -# Possible values are "fail-fast" (default), "fail-at-end" and "fail-never" -invoker.failureBehavior=fail-at-end - -# The expected result of the build, possible values are "success" (default) and "failure" -#invoker.buildResult=success - -# A boolean value controlling the -N flag, defaults to "false" -#invoker.nonRecursive=false Added: trunk/maven-i18n-plugin/src/it/ano-672/goals.txt =================================================================== --- trunk/maven-i18n-plugin/src/it/ano-672/goals.txt (rev 0) +++ trunk/maven-i18n-plugin/src/it/ano-672/goals.txt 2012-07-09 12:53:13 UTC (rev 1960) @@ -0,0 +1 @@ +clean test \ No newline at end of file Deleted: trunk/maven-i18n-plugin/src/it/ano-672/invoker.properties =================================================================== --- trunk/maven-i18n-plugin/src/it/ano-672/invoker.properties 2012-07-09 12:52:24 UTC (rev 1959) +++ trunk/maven-i18n-plugin/src/it/ano-672/invoker.properties 2012-07-09 12:53:13 UTC (rev 1960) @@ -1,45 +0,0 @@ -### -# #%L -# I18n :: Maven Plugin -# -# $Id$ -# $HeadURL$ -# %% -# Copyright (C) 2007 - 2010 CodeLutin -# %% -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Lesser Public License for more details. -# -# You should have received a copy of the GNU General Lesser Public -# License along with this program. If not, see -# <http://www.gnu.org/licenses/lgpl-3.0.html>. -# #L% -### -# A comma or space separated list of goals/phases to execute, may -# specify an empty list to execute the default goal of the IT project -invoker.goals=clean test - -# Optionally, a list of goals to run during further invocations of Maven -#invoker.goals.2=${project.groupId}:${project.artifactId}:${project.version}:run - -# A comma or space separated list of profiles to activate -#invoker.profiles=run-all run-once - -# The value for the environment variable MAVEN_OPTS -#invoker.mavenOpts=-Dfile.encoding=UTF-16 -Xms32m -Xmx256m - -# Possible values are "fail-fast" (default), "fail-at-end" and "fail-never" -invoker.failureBehavior=fail-at-end - -# The expected result of the build, possible values are "success" (default) and "failure" -#invoker.buildResult=success - -# A boolean value controlling the -N flag, defaults to "false" -#invoker.nonRecursive=false Added: trunk/maven-i18n-plugin/src/it/evo-1507/goals.txt =================================================================== --- trunk/maven-i18n-plugin/src/it/evo-1507/goals.txt (rev 0) +++ trunk/maven-i18n-plugin/src/it/evo-1507/goals.txt 2012-07-09 12:53:13 UTC (rev 1960) @@ -0,0 +1 @@ +clean test \ No newline at end of file Deleted: trunk/maven-i18n-plugin/src/it/evo-1507/invoker.properties =================================================================== --- trunk/maven-i18n-plugin/src/it/evo-1507/invoker.properties 2012-07-09 12:52:24 UTC (rev 1959) +++ trunk/maven-i18n-plugin/src/it/evo-1507/invoker.properties 2012-07-09 12:53:13 UTC (rev 1960) @@ -1,45 +0,0 @@ -### -# #%L -# I18n :: Maven Plugin -# -# $Id$ -# $HeadURL$ -# %% -# Copyright (C) 2007 - 2010 CodeLutin -# %% -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Lesser Public License for more details. -# -# You should have received a copy of the GNU General Lesser Public -# License along with this program. If not, see -# <http://www.gnu.org/licenses/lgpl-3.0.html>. -# #L% -### -# A comma or space separated list of goals/phases to execute, may -# specify an empty list to execute the default goal of the IT project -invoker.goals=clean test - -# Optionally, a list of goals to run during further invocations of Maven -#invoker.goals.2=${project.groupId}:${project.artifactId}:${project.version}:run - -# A comma or space separated list of profiles to activate -#invoker.profiles=run-all run-once - -# The value for the environment variable MAVEN_OPTS -#invoker.mavenOpts=-Dfile.encoding=UTF-16 -Xms32m -Xmx256m - -# Possible values are "fail-fast" (default), "fail-at-end" and "fail-never" -invoker.failureBehavior=fail-at-end - -# The expected result of the build, possible values are "success" (default) and "failure" -#invoker.buildResult=success - -# A boolean value controlling the -N flag, defaults to "false" -#invoker.nonRecursive=false Added: trunk/maven-i18n-plugin/src/it/parsers/newProject/goals.txt =================================================================== --- trunk/maven-i18n-plugin/src/it/parsers/newProject/goals.txt (rev 0) +++ trunk/maven-i18n-plugin/src/it/parsers/newProject/goals.txt 2012-07-09 12:53:13 UTC (rev 1960) @@ -0,0 +1 @@ +clean compile \ No newline at end of file Deleted: trunk/maven-i18n-plugin/src/it/parsers/newProject/invoker.properties =================================================================== --- trunk/maven-i18n-plugin/src/it/parsers/newProject/invoker.properties 2012-07-09 12:52:24 UTC (rev 1959) +++ trunk/maven-i18n-plugin/src/it/parsers/newProject/invoker.properties 2012-07-09 12:53:13 UTC (rev 1960) @@ -1,45 +0,0 @@ -### -# #%L -# I18n :: Maven Plugin -# -# $Id$ -# $HeadURL$ -# %% -# Copyright (C) 2007 - 2010 CodeLutin -# %% -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Lesser Public License for more details. -# -# You should have received a copy of the GNU General Lesser Public -# License along with this program. If not, see -# <http://www.gnu.org/licenses/lgpl-3.0.html>. -# #L% -### -# A comma or space separated list of goals/phases to execute, may -# specify an empty list to execute the default goal of the IT project -invoker.goals=clean compile - -# Optionally, a list of goals to run during further invocations of Maven -#invoker.goals.2=${project.groupId}:${project.artifactId}:${project.version}:run - -# A comma or space separated list of profiles to activate -#invoker.profiles=run-all run-once - -# The value for the environment variable MAVEN_OPTS -#invoker.mavenOpts=-Dfile.encoding=UTF-16 -Xms32m -Xmx256m - -# Possible values are "fail-fast" (default), "fail-at-end" and "fail-never" -invoker.failureBehavior=fail-at-end - -# The expected result of the build, possible values are "success" (default) and "failure" -#invoker.buildResult=success - -# A boolean value controlling the -N flag, defaults to "false" -#invoker.nonRecursive=false Modified: trunk/maven-i18n-plugin/src/it/parsers/newProject/src/main/resources/org/nuiton/i18n/test/MyBean-validation.xml =================================================================== --- trunk/maven-i18n-plugin/src/it/parsers/newProject/src/main/resources/org/nuiton/i18n/test/MyBean-validation.xml 2012-07-09 12:52:24 UTC (rev 1959) +++ trunk/maven-i18n-plugin/src/it/parsers/newProject/src/main/resources/org/nuiton/i18n/test/MyBean-validation.xml 2012-07-09 12:53:13 UTC (rev 1960) @@ -25,8 +25,8 @@ --> <!DOCTYPE validators PUBLIC - "-//OpenSymphony Group//XWork Validator 1.0.2//EN" - "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd"> + "-//Apache Struts//XWork Validator 1.0.3//EN" + "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> <validators> <field name="field1"> Added: trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/goals.txt =================================================================== --- trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/goals.txt (rev 0) +++ trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/goals.txt 2012-07-09 12:53:13 UTC (rev 1960) @@ -0,0 +1 @@ +clean compile \ No newline at end of file Deleted: trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/invoker.properties =================================================================== --- trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/invoker.properties 2012-07-09 12:52:24 UTC (rev 1959) +++ trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/invoker.properties 2012-07-09 12:53:13 UTC (rev 1960) @@ -1,45 +0,0 @@ -### -# #%L -# I18n :: Maven Plugin -# -# $Id$ -# $HeadURL$ -# %% -# Copyright (C) 2007 - 2010 CodeLutin -# %% -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Lesser Public License for more details. -# -# You should have received a copy of the GNU General Lesser Public -# License along with this program. If not, see -# <http://www.gnu.org/licenses/lgpl-3.0.html>. -# #L% -### -# A comma or space separated list of goals/phases to execute, may -# specify an empty list to execute the default goal of the IT project -invoker.goals=clean compile - -# Optionally, a list of goals to run during further invocations of Maven -#invoker.goals.2=${project.groupId}:${project.artifactId}:${project.version}:run - -# A comma or space separated list of profiles to activate -#invoker.profiles=run-all run-once - -# The value for the environment variable MAVEN_OPTS -#invoker.mavenOpts=-Dfile.encoding=UTF-16 -Xms32m -Xmx256m - -# Possible values are "fail-fast" (default), "fail-at-end" and "fail-never" -invoker.failureBehavior=fail-at-end - -# The expected result of the build, possible values are "success" (default) and "failure" -#invoker.buildResult=success - -# A boolean value controlling the -N flag, defaults to "false" -#invoker.nonRecursive=false Modified: trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/src/main/resources/org/nuiton/i18n/test/MyBean-validation.xml =================================================================== --- trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/src/main/resources/org/nuiton/i18n/test/MyBean-validation.xml 2012-07-09 12:52:24 UTC (rev 1959) +++ trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/src/main/resources/org/nuiton/i18n/test/MyBean-validation.xml 2012-07-09 12:53:13 UTC (rev 1960) @@ -25,8 +25,8 @@ --> <!DOCTYPE validators PUBLIC - "-//OpenSymphony Group//XWork Validator 1.0.2//EN" - "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd"> + "-//Apache Struts//XWork Validator 1.0.3//EN" + "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> <validators> <validator type="required"> Modified: trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/AbstractI18nMojo.java =================================================================== --- trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/AbstractI18nMojo.java 2012-07-09 12:52:24 UTC (rev 1959) +++ trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/AbstractI18nMojo.java 2012-07-09 12:53:13 UTC (rev 1960) @@ -80,7 +80,7 @@ protected String bundles; /** Directory where to find project i18n files. */ - @Parameter(property = "i18n.src", defaultValue = "\"${basedir}/src/main/resources/i18n", required = true) + @Parameter(property = "i18n.src", defaultValue = "${basedir}/src/main/resources/i18n", required = true) protected File src; /** Directory where to generate i18n files. */ Modified: trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/AbstractI18nParserMojo.java =================================================================== --- trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/AbstractI18nParserMojo.java 2012-07-09 12:52:24 UTC (rev 1959) +++ trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/AbstractI18nParserMojo.java 2012-07-09 12:53:13 UTC (rev 1960) @@ -207,7 +207,7 @@ if (skip) { if (!silent && verbose) { - getLog().info("skip - " + entry.getSkipMessage()); + getLog().info("skip [" + entry + "] - " + entry.getSkipMessage()); } continue; } Modified: trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserGWTJavaMojo.java =================================================================== --- trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserGWTJavaMojo.java 2012-07-09 12:52:24 UTC (rev 1959) +++ trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserGWTJavaMojo.java 2012-07-09 12:53:13 UTC (rev 1960) @@ -63,6 +63,8 @@ @Mojo(name = "parserGWTJava", defaultPhase = LifecyclePhase.GENERATE_RESOURCES) public class ParserGWTJavaMojo extends AbstractI18nParserMojo { + public static final String DEFAULT_INCLUDES = "**/*.java"; + /** Root directory of the default entry. */ @Parameter(property = "i18n.defaultBasedir", defaultValue = "${basedir}/src/main/java") protected File defaultBasedir; @@ -72,9 +74,8 @@ * <p/> * <strong>Note:</strong> default value is **\/*.java */ -// @Parameter(property = "i18n.defaultIncludes", defaultValue = "**\\/*.java", required = true) - @Parameter(property = "i18n.defaultIncludes") - protected String defaultIncludes = "**\\/*.java"; + @Parameter(property = "i18n.defaultIncludes", defaultValue = DEFAULT_INCLUDES, required = true) + protected String defaultIncludes; /** * Defines the file name of the getter where to put detected i18n keys Modified: trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserJavaMojo.java =================================================================== --- trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserJavaMojo.java 2012-07-09 12:52:24 UTC (rev 1959) +++ trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserJavaMojo.java 2012-07-09 12:53:13 UTC (rev 1960) @@ -59,6 +59,8 @@ @Mojo(name = "parserJava", defaultPhase = LifecyclePhase.GENERATE_RESOURCES) public class ParserJavaMojo extends AbstractI18nParserMojo { + public static final String DEFAULT_INCLUDES = "**/*.java"; + /** Root directory of the default entry. */ @Parameter(property = "i18n.defaultBasedir", defaultValue = "${basedir}/src/main/java") protected File defaultBasedir; @@ -68,9 +70,8 @@ * <p/> * <strong>Note:</strong> default value is **\/*.java */ -// @Parameter(property = "i18n.defaultIncludes", defaultValue = "**\\/*.java", required = true) - @Parameter(property = "i18n.defaultIncludes") - protected String defaultIncludes = "**\\/*.java"; + @Parameter(property = "i18n.defaultIncludes", defaultValue = DEFAULT_INCLUDES, required = true) + protected String defaultIncludes; /** * Defines the file name of the getter where to put detected i18n keys Modified: trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserJspMojo.java =================================================================== --- trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserJspMojo.java 2012-07-09 12:52:24 UTC (rev 1959) +++ trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserJspMojo.java 2012-07-09 12:53:13 UTC (rev 1960) @@ -55,6 +55,8 @@ @Mojo(name = "parserJsp", defaultPhase = LifecyclePhase.GENERATE_RESOURCES) public class ParserJspMojo extends AbstractParserXmlMojo { + public static final String DEFAULT_INCLUDES = "**/*.jsp"; + /** * Root directory of the default entry. * @@ -66,13 +68,12 @@ /** * Default included files to process (ant-like expression). * <p/> - * <strong>Note:</strong> default value is **\/**.jsp + * <strong>Note:</strong> default value is **\/*.jsp * * @since 2.0 */ -// @Parameter(property = "i18n.defaultIncludes", defaultValue = "**\\/**.jsp", required = true) - @Parameter(property = "i18n.defaultIncludes") - protected String defaultIncludes = "**\\/**.jsp"; + @Parameter(property = "i18n.defaultIncludes", defaultValue = DEFAULT_INCLUDES, required = true) + protected String defaultIncludes; /** * Defines the core rules file used to detect i18n keys in jsp files. Modified: trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserTapestryMojo.java =================================================================== --- trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserTapestryMojo.java 2012-07-09 12:52:24 UTC (rev 1959) +++ trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserTapestryMojo.java 2012-07-09 12:53:13 UTC (rev 1960) @@ -61,6 +61,8 @@ @Mojo(name = "parserTapestry", defaultPhase = LifecyclePhase.GENERATE_RESOURCES) public class ParserTapestryMojo extends AbstractI18nParserMojo { + public static final String DEFAULT_INCLUDES = "**/*.tml"; + /** * Root directory of the default entry. * @@ -76,9 +78,8 @@ * * @since 2.1 */ -// @Parameter(property = "i18n.defaultIncludes", defaultValue = "**\\/*.tml", required = true) - @Parameter(property = "i18n.defaultIncludes") - protected String defaultIncludes ="**\\/*.tml"; + @Parameter(property = "i18n.defaultIncludes", defaultValue = DEFAULT_INCLUDES, required = true) + protected String defaultIncludes; /** * Defines the file name of the getter where to put detected i18n keys Modified: trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserValidationMojo.java =================================================================== --- trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserValidationMojo.java 2012-07-09 12:52:24 UTC (rev 1959) +++ trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserValidationMojo.java 2012-07-09 12:53:13 UTC (rev 1960) @@ -54,19 +54,21 @@ @Mojo(name = "parserValidation", defaultPhase = LifecyclePhase.GENERATE_RESOURCES) public class ParserValidationMojo extends AbstractParserXmlMojo { + public static final String DEFAULT_INCLUDES = "**/*-validation.xml"; + final URL xworksResource = getClass().getResource("/xwork-validator-1.0.2.dtd"); /** Root directory of the default entry. */ @Parameter(property = "i18n.defaultBasedir", defaultValue = "${basedir}/src/main/resources", required = true) protected File defaultBasedir; - /** Default included files to process (ant-like expression). - * + /** + * Default included files to process (ant-like expression). + * <p/> * <strong>Note:</strong> default value is **\/**-validation.xml - * */ -// @Parameter(property = "i18n.defaultIncludes", defaultValue = "**\\/**-validation.xml", required = true) - @Parameter(property = "i18n.defaultIncludes") - protected String defaultIncludes ="**\\/**-validation.xml"; + */ + @Parameter(property = "i18n.defaultIncludes", defaultValue = DEFAULT_INCLUDES, required = true) + protected String defaultIncludes; /** * Defines the core rules file used to detect i18n keys in xml validation @@ -175,7 +177,7 @@ return new EntityResolver() { public static final String XWORK_PUBLIC_ID = - "-//OpenSymphony Group//XWork Validator 1.0.2//EN"; + "-//Apache Struts//XWork Validator 1.0.3//EN"; boolean useLocal = useLocalResolver; Added: trunk/maven-i18n-plugin/src/main/resources/xwork-validator-1.0.3.dtd =================================================================== --- trunk/maven-i18n-plugin/src/main/resources/xwork-validator-1.0.3.dtd (rev 0) +++ trunk/maven-i18n-plugin/src/main/resources/xwork-validator-1.0.3.dtd 2012-07-09 12:53:13 UTC (rev 1960) @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + XWork Validators DTD. + Used the following DOCTYPE. + + <!DOCTYPE validators PUBLIC + "-//Apache Struts//XWork Validator 1.0.3//EN" + "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> +--> + + +<!ELEMENT validators (field|validator)+> + +<!ELEMENT field (field-validator+)> +<!ATTLIST field + name CDATA #REQUIRED +> + +<!ELEMENT field-validator (param*, message)> +<!ATTLIST field-validator + type CDATA #REQUIRED + short-circuit (true|false) "false" +> + +<!ELEMENT validator (param*, message)> +<!ATTLIST validator + type CDATA #REQUIRED + short-circuit (true|false) "false" +> + +<!ELEMENT param (#PCDATA)> +<!ATTLIST param + name CDATA #REQUIRED +> + +<!ELEMENT message (#PCDATA|param)*> +<!ATTLIST message + key CDATA #IMPLIED +> + + Added: trunk/maven-i18n-plugin/src/test/java/org/nuiton/i18n/plugin/parser/SourceEntryTest.java =================================================================== --- trunk/maven-i18n-plugin/src/test/java/org/nuiton/i18n/plugin/parser/SourceEntryTest.java (rev 0) +++ trunk/maven-i18n-plugin/src/test/java/org/nuiton/i18n/plugin/parser/SourceEntryTest.java 2012-07-09 12:53:13 UTC (rev 1960) @@ -0,0 +1,43 @@ +package org.nuiton.i18n.plugin.parser; + +import org.junit.Assert; +import org.junit.Test; +import org.nuiton.i18n.plugin.parser.impl.ParserJavaMojo; +import org.nuiton.i18n.plugin.parser.impl.ParserValidationMojo; + +import java.io.File; + +/** + * Tests the {@link SourceEntry}. + * + * @author tchemit <chemit@codelutin.com> + * @since 2.4.3 + */ +public class SourceEntryTest { + + @Test + public void testGetIncludedFiles() throws Exception { + SourceEntry entry = new SourceEntry(); + File basedir = new File("."); + + File defaultBasedir = new File(basedir, "src" + File.separator + "test" + File.separator + "java"); + File defaultBasedir2 = new File(basedir, "src" + File.separator + "test" + File.separator + "resources"); + + String[] includedFiles; + + includedFiles = entry.getIncludedFiles(defaultBasedir, + new String[]{ParserJavaMojo.DEFAULT_INCLUDES}, + I18nSourceEntry.EMPTY_STRING_ARRAY); + Assert.assertNotNull(includedFiles); + Assert.assertTrue(includedFiles.length > 0); + + + includedFiles = entry.getIncludedFiles(defaultBasedir2, + new String[]{ParserValidationMojo.DEFAULT_INCLUDES}, + I18nSourceEntry.EMPTY_STRING_ARRAY); + Assert.assertNotNull(includedFiles); + Assert.assertTrue(includedFiles.length > 0); + + + } +} Copied: trunk/maven-i18n-plugin/src/test/resources/MyBean-validation.xml (from rev 1957, trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/src/main/resources/org/nuiton/i18n/test/MyBean-validation.xml) =================================================================== --- trunk/maven-i18n-plugin/src/test/resources/MyBean-validation.xml (rev 0) +++ trunk/maven-i18n-plugin/src/test/resources/MyBean-validation.xml 2012-07-09 12:53:13 UTC (rev 1960) @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + I18n :: Maven Plugin + + $Id$ + $HeadURL$ + %% + Copyright (C) 2007 - 2010 CodeLutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Lesser Public License for more details. + + You should have received a copy of the GNU General Lesser Public + License along with this program. If not, see + <http://www.gnu.org/licenses/lgpl-3.0.html>. + #L% + --> + +<!DOCTYPE validators PUBLIC + "-//Apache Struts//XWork Validator 1.0.3//EN" + "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> +<validators> + + <validator type="required"> + <message>validationGetter.key3</message> + </validator> + + <field name="field1"> + + <field-validator type="required"> + <message>validationGetter.key1</message> + </field-validator> + + </field> + + <field name="field2"> + + <field-validator type="required"> + <message>validationGetter.key2##${parm1}</message> + </field-validator> + + </field> + +</validators>