Index: maven-i18n-plugin/src/java/org/codelutin/i18n/plugin/core/AbstractI18nPlugin.java diff -u maven-i18n-plugin/src/java/org/codelutin/i18n/plugin/core/AbstractI18nPlugin.java:1.12 maven-i18n-plugin/src/java/org/codelutin/i18n/plugin/core/AbstractI18nPlugin.java:1.13 --- maven-i18n-plugin/src/java/org/codelutin/i18n/plugin/core/AbstractI18nPlugin.java:1.12 Mon Feb 4 19:14:21 2008 +++ maven-i18n-plugin/src/java/org/codelutin/i18n/plugin/core/AbstractI18nPlugin.java Wed Feb 20 20:31:41 2008 @@ -29,7 +29,6 @@ import java.util.Properties; import org.apache.maven.plugin.AbstractMojo; -import org.apache.maven.plugin.logging.Log; import org.codelutin.i18n.plugin.util.SortedProperties; import org.codelutin.util.StringUtil; @@ -89,8 +88,9 @@ /** * Log + * Do not use a instance of, use a lazy instancier */ - protected Log log = getLog(); + //protected Log log = getLog(); /** * Répertoire de stockage des fichiers i18n pour la récupération des fichiers Index: maven-i18n-plugin/src/java/org/codelutin/i18n/plugin/core/AbstractI18nParser.java diff -u maven-i18n-plugin/src/java/org/codelutin/i18n/plugin/core/AbstractI18nParser.java:1.4 maven-i18n-plugin/src/java/org/codelutin/i18n/plugin/core/AbstractI18nParser.java:1.5 --- maven-i18n-plugin/src/java/org/codelutin/i18n/plugin/core/AbstractI18nParser.java:1.4 Mon Feb 4 18:07:10 2008 +++ maven-i18n-plugin/src/java/org/codelutin/i18n/plugin/core/AbstractI18nParser.java Wed Feb 20 20:31:41 2008 @@ -121,11 +121,11 @@ saveFile.delete(); } catch (Exception e) { - log.error("Error code parsing ", e); + getLog().error("Error code parsing ", e); throw new MojoFailureException("Error code parsing"); } - log.info(getLogEntry(" success [treated file(s) : " + fileTreated + "]", fileTreated-1, 0, t0)); + getLog().info(getLogEntry(" success [treated file(s) : " + fileTreated + "]", fileTreated-1, 0, t0)); } public void parse() { @@ -136,7 +136,7 @@ for (SourceEntry entry : entries) { if (!entry.useForGoal(getClass().getSimpleName())) { if (verbose) { - log.debug("skip entry "+entry.toString()); + getLog().debug("skip entry "+entry.toString()); } continue; } @@ -144,12 +144,12 @@ String[] foundFiles = entry.getIncludedFiles(getDefaultBasedir(), getDefaultIncludes()); long t000 = System.nanoTime(); - log.info(getLogEntry(" parse <" + entry + "> [incoming file(s) : " + foundFiles.length + "]", 0, 0, 0)); + getLog().info(getLogEntry(" parse <" + entry + "> [incoming file(s) : " + foundFiles.length + "]", 0, 0, 0)); // launch parser for found files parseEntry(entry.getBasedir(), foundFiles); fileTreated += foundFiles.length; if (verbose) { - log.debug(getLogEntry(" success <" + entry.getBasedir() + "> [treated file(s) : " + foundFiles.length + "]", foundFiles.length - 1, t000, t00)); + getLog().debug(getLogEntry(" success <" + entry.getBasedir() + "> [treated file(s) : " + foundFiles.length + "]", foundFiles.length - 1, t000, t00)); } t00 = System.nanoTime(); } @@ -179,7 +179,7 @@ } parseFile(file); if (verbose) { - log.debug(getLogEntry(fileName, i, t000, t00)); + getLog().debug(getLogEntry(fileName, i, t000, t00)); } for (ParserEvent event : events) { event.eventNextFile(file); Index: maven-i18n-plugin/src/java/org/codelutin/i18n/plugin/core/Getter.java diff -u maven-i18n-plugin/src/java/org/codelutin/i18n/plugin/core/Getter.java:1.8 maven-i18n-plugin/src/java/org/codelutin/i18n/plugin/core/Getter.java:1.9 --- maven-i18n-plugin/src/java/org/codelutin/i18n/plugin/core/Getter.java:1.8 Wed Jan 23 09:41:17 2008 +++ maven-i18n-plugin/src/java/org/codelutin/i18n/plugin/core/Getter.java Wed Feb 20 20:31:41 2008 @@ -53,25 +53,25 @@ String[] files = ds.getIncludedFiles(); // Fusion des fichiers propriétés des différents parsers - for (int i = 0; i < files.length; i++) { - File bundleGetter = new File(out.getAbsolutePath() + File.separatorChar + files[i]); + for (String file : files) { + File bundleGetter = new File(out.getAbsolutePath() + File.separatorChar + file); concactProperties(bundleGetter, bundleGetters); - if(genSrc) { + if (genSrc) { bundleGetter.delete(); } - log.info("Create bundle with " + bundleGetter.getAbsolutePath()); + getLog().info("Create bundle with " + bundleGetter.getAbsolutePath()); } // Création des bundles for (String bundle : bundles) { File bundleOut = new File(out.getAbsolutePath() + File.separatorChar + artifactId + "-" + bundle + ".properties"); FileUtil.copy(bundleGetters, bundleOut); - log.info("Generate bundle " + bundleOut.getAbsolutePath()); + getLog().info("Generate bundle " + bundleOut.getAbsolutePath()); } bundleGetters.delete(); } catch (IOException e) { - log.error("File Error I/O ", e); + getLog().error("File Error I/O ", e); throw new MojoFailureException("File Error I/O"); } } Index: maven-i18n-plugin/src/java/org/codelutin/i18n/plugin/core/Generate.java diff -u maven-i18n-plugin/src/java/org/codelutin/i18n/plugin/core/Generate.java:1.8 maven-i18n-plugin/src/java/org/codelutin/i18n/plugin/core/Generate.java:1.9 --- maven-i18n-plugin/src/java/org/codelutin/i18n/plugin/core/Generate.java:1.8 Wed Feb 6 18:38:16 2008 +++ maven-i18n-plugin/src/java/org/codelutin/i18n/plugin/core/Generate.java Wed Feb 20 20:31:41 2008 @@ -86,17 +86,17 @@ FileUtil.copy(bundleSrc, new File(src.getAbsolutePath() + File.separatorChar + artifactId + "-" + bundle + ".properties" + "~")); } - log.info("Merge bundle " + bundleSrc.getAbsolutePath()); + getLog().info("Merge bundle " + bundleSrc.getAbsolutePath()); } if(genSrc) { // Copie des fichiers dans les sources FileUtil.copy(bundleOut, bundleSrc); - log.info("Copy bundle " + bundleSrc.getAbsolutePath()); + getLog().info("Copy bundle " + bundleSrc.getAbsolutePath()); } } catch (IOException e) { - log.error("File Error I/O ", e); + getLog().error("File Error I/O ", e); throw new MojoFailureException("File Error I/O "); } }