Author: tchemit Date: 2012-07-15 20:24:59 +0200 (Sun, 15 Jul 2012) New Revision: 852 Url: http://nuiton.org/repositories/revision/maven-helper-plugin/852 Log: refix logger Modified: trunk/src/test/java/org/nuiton/helper/plugin/SendEmailMojoTest.java trunk/src/test/java/org/nuiton/plugin/AbstractMojoTest.java Modified: trunk/src/test/java/org/nuiton/helper/plugin/SendEmailMojoTest.java =================================================================== --- trunk/src/test/java/org/nuiton/helper/plugin/SendEmailMojoTest.java 2012-07-15 16:31:16 UTC (rev 851) +++ trunk/src/test/java/org/nuiton/helper/plugin/SendEmailMojoTest.java 2012-07-15 18:24:59 UTC (rev 852) @@ -25,6 +25,8 @@ package org.nuiton.helper.plugin; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.junit.Assert; import org.junit.Assume; import org.junit.Test; @@ -40,6 +42,9 @@ */ public class SendEmailMojoTest extends AbstractMojoTest<SendEmailMojo> { + /** Logger. */ + private static final Log log = LogFactory.getLog(SendEmailMojoTest.class); + protected boolean canContinue; @Override Modified: trunk/src/test/java/org/nuiton/plugin/AbstractMojoTest.java =================================================================== --- trunk/src/test/java/org/nuiton/plugin/AbstractMojoTest.java 2012-07-15 16:31:16 UTC (rev 851) +++ trunk/src/test/java/org/nuiton/plugin/AbstractMojoTest.java 2012-07-15 18:24:59 UTC (rev 852) @@ -70,8 +70,8 @@ */ public abstract class AbstractMojoTest<P extends Plugin> { - /** Test logger */ - protected final Log log = LogFactory.getLog(getClass()); + /** Logger. */ + private static final Log log = LogFactory.getLog(AbstractMojoTest.class); /** the basedir of the project */ protected static File basedir; @@ -306,7 +306,7 @@ * the mojo</li> <li>{@link #mojo} : the instanciated and initialized * mojo</li> </ul> */ - protected class MojoTestRule extends TestName { + public class MojoTestRule extends TestName { /** location of the pom to use */ private File pomFile; @@ -330,14 +330,16 @@ if (isVerbose()) { log.info("=============================================================================================="); } + String methodName = name.getMethodName(); + log.info("NEW Mojo test starting : " + getTestClass().getName() + - "#" + getMethodName()); + "#" + methodName); - String goalName = getGoalName(name.getMethodName()); + String goalName = getGoalName(methodName); - testDir = getTest().getTestDir(getMethodName(), goalName); + testDir = getTest().getTestDir(methodName, goalName); - pomFile = getTest().getPomFile(testDir, getMethodName(), goalName); + pomFile = getTest().getPomFile(testDir, methodName, goalName); try { Assert.assertTrue("could not find pom " + @@ -350,7 +352,7 @@ } catch (Exception ex) { throw new IllegalStateException( "could not init test " + getClass() + " - " + - getMethodName() + " for reason " + ex.getMessage(), ex); + methodName + " for reason " + ex.getMessage(), ex); } }