Author: tchemit Date: 2012-08-29 21:37:13 +0200 (Wed, 29 Aug 2012) New Revision: 1969 Url: http://nuiton.org/repositories/revision/i18n/1969 Log: fixes #2289: Deprecate some parser (jsp, tapestry) : there are not enough efficient :( Modified: trunk/i18n-maven-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserJspMojo.java trunk/i18n-maven-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserTapestryMojo.java Modified: trunk/i18n-maven-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserJspMojo.java =================================================================== --- trunk/i18n-maven-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserJspMojo.java 2012-08-29 19:36:40 UTC (rev 1968) +++ trunk/i18n-maven-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserJspMojo.java 2012-08-29 19:37:13 UTC (rev 1969) @@ -51,6 +51,7 @@ * * @author tchemit <chemit@codelutin.com> * @since 2.0 + * @deprecated since 2.5, hard to maintain jsp as valid xml docs. Will be removed soon */ @Mojo(name = "parserJsp", defaultPhase = LifecyclePhase.GENERATE_RESOURCES) public class ParserJspMojo extends AbstractParserXmlMojo { @@ -161,6 +162,7 @@ return new XmlFileParser(getLog(), encoding, oldParser, + acceptPattern, showTouchedFiles, rules, xpath, Modified: trunk/i18n-maven-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserTapestryMojo.java =================================================================== --- trunk/i18n-maven-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserTapestryMojo.java 2012-08-29 19:36:40 UTC (rev 1968) +++ trunk/i18n-maven-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserTapestryMojo.java 2012-08-29 19:37:13 UTC (rev 1969) @@ -46,6 +46,7 @@ import java.io.LineNumberReader; import java.util.HashSet; import java.util.Set; +import java.util.regex.Pattern; /** * To parse Tapestry templates to detect new I18n keys, says content of patterns : @@ -57,6 +58,7 @@ * * @author tchemit <chemit@codelutin.com> * @since 2.1 + * @deprecated since 2.5, Not very usefull, since not very efficient, will be removed soon. */ @Mojo(name = "parserTapestry", defaultPhase = LifecyclePhase.GENERATE_RESOURCES) public class ParserTapestryMojo extends AbstractI18nParserMojo { @@ -73,7 +75,7 @@ /** * Default included files to process (ant-like expression). - * + * <p/> * <strong>Note:</strong> default value is **\/*.tml * * @since 2.1 @@ -146,11 +148,12 @@ } @Override - public FileParser newFileParser() { + public FileParser newFileParser(Pattern acceptPattern) { return new TapestryFileParser(getLog(), encoding, oldParser, + acceptPattern, isShowTouchedFiles() ); } @@ -161,8 +164,9 @@ public TapestryFileParser(Log log, String encoding, SortedProperties oldParser, + Pattern acceptKeyPattern, boolean showTouchedFiles) { - super(log, encoding, oldParser, showTouchedFiles); + super(log, encoding, oldParser, acceptKeyPattern, showTouchedFiles); } @@ -222,8 +226,8 @@ return; } - // one key found in file, so file is marked as touched - setTouched(true); +// // one key found in file, so file is marked as touched +// setTouched(true); // Found a i18n key, register it. if (getLog().isDebugEnabled()) { getLog().debug(file.getName() + " detected key = " + key);