r620 - in trunk: . src/main/java/org/nuiton/helper/plugin src/test/java/org/nuiton/plugin src/test/resources/org/nuiton/mail/plugin src/test/resources/org/nuiton/mail/plugin/sendEmailMojoTest
Author: tchemit Date: 2009-11-01 17:18:50 +0100 (Sun, 01 Nov 2009) New Revision: 620 Added: trunk/src/test/resources/org/nuiton/mail/plugin/sendEmailMojoTest/ Removed: trunk/src/main/java/org/nuiton/helper/plugin/CheckProjectFilesPlugin.java trunk/src/test/resources/org/nuiton/mail/plugin/SendEmailMojoTest/ Modified: trunk/changelog.txt trunk/pom.xml trunk/src/test/java/org/nuiton/plugin/AbstractMojoTest.java trunk/src/test/resources/org/nuiton/mail/plugin/sendEmailMojoTest/sendEmail.xml trunk/src/test/resources/org/nuiton/mail/plugin/sendEmailMojoTest/skipSendEmail.xml Log: change test dir (use a decapitalize package name to avoid class name collision) prepare next release Modified: trunk/changelog.txt =================================================================== --- trunk/changelog.txt 2009-10-30 20:37:39 UTC (rev 619) +++ trunk/changelog.txt 2009-11-01 16:18:50 UTC (rev 620) @@ -1,3 +1,22 @@ +maven-helper-plugin (1.1.0) stable; urgency=high + + * [FIX #60] rendre le plugin compatible maven 2.2.x + * [FIX #85] le client rest doit avoir un encoding + * [FEATURE #45] utiliser des generics dans le framework de test de mojos + * [FEATURE #46] ajout d'un contrat pour faire des parseurs xpp3 + * [FEATURE #50] utilisation Junit 4.7 et amélioration du framework de test des Mojos + * [FEATURE #51] Rethink to AbstractPlugin api + * [FEATURE #52] ajout d'un goal neutre d'envoie de mail + * [FEATURE #53] ajout d'un goal pour collecter des donnees + * [FEATURE #54] ajout d'un client rest basique + * [FEATURE #61] ajout des tests d'intégration + * [FEATURE #65] reorganisation des packages + * [FEATURE #66] documentation des frameworks mojo et test mojo + * [FEATURE #69] ajout d'un goal pour exposer des secrets du serveur + * [FEATURE #86] Déplacement du paquetage license vers maven-license-plugin + + -- chemit -- Sun, 01 Nov 2009 15:50:59 +0100 + maven-helper-plugin (1.0.3) stable; urgency=high * [FEATURE #46] ajout d'un contrat pour faire des parseurs xpp3 Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2009-10-30 20:37:39 UTC (rev 619) +++ trunk/pom.xml 2009-11-01 16:18:50 UTC (rev 620) @@ -1,12 +1,13 @@ <?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <!-- ************************************************************* --> <!-- *** POM Relationships *************************************** --> <!-- ************************************************************* --> - + <groupId>org.nuiton</groupId> <artifactId>maven-helper-plugin</artifactId> @@ -28,13 +29,13 @@ <artifactId>commons-lang</artifactId> <version>2.4</version> </dependency> - + <dependency> <groupId>commons-httpclient</groupId> <artifactId>commons-httpclient</artifactId> <version>3.1</version> </dependency> - + <dependency> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> @@ -54,7 +55,7 @@ </dependency> <!-- plexus --> - + <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-utils</artifactId> @@ -72,13 +73,13 @@ <artifactId>plexus-cipher</artifactId> <version>1.5</version> </dependency> - + <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-container-default</artifactId> <version>1.0-alpha-9-stable-1</version> </dependency> - + <dependency> <groupId>plexus</groupId> <artifactId>plexus-mail-sender-api</artifactId> @@ -114,7 +115,7 @@ </exclusion> </exclusions> </dependency> - + <!-- provided dependencies --> <dependency> @@ -135,7 +136,7 @@ <version>${maven.version}</version> <scope>provided</scope> </dependency> - + <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-artifact</artifactId> @@ -149,16 +150,16 @@ <scope>provided</scope> </dependency> - <!-- forces use of javamail 1.4 since it's the only version available in the repo. We should remove this as soon - as the dependency in plexus-mail-sender-javamail will be updated - --> + <!-- forces use of javamail 1.4 since it's the only version available in the repo. We should remove this as soon + as the dependency in plexus-mail-sender-javamail will be updated + --> <dependency> <groupId>javax.mail</groupId> <artifactId>mail</artifactId> <version>1.4</version> </dependency> - + <!-- tests dependencies --> <dependency> @@ -192,7 +193,7 @@ <groupId>org.apache.maven.reporting</groupId> <artifactId>maven-reporting-api</artifactId> </exclusion> - + </exclusions> </dependency> @@ -234,7 +235,7 @@ </licenses> <developers> - + <developer> <name>Eric Chatellier</name> <id>echatellier</id> @@ -326,7 +327,7 @@ <packaging>maven-plugin</packaging> <properties> - + <license.version>2.0.0</license.version> <maven.version>2.2.1</maven.version> <plexusMailSender.version>1.0-alpha-2</plexusMailSender.version> @@ -338,14 +339,15 @@ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> - + <maven.test.skip>false</maven.test.skip> + <maven.javadoc.skip>false</maven.javadoc.skip> <!-- to activate generation of reports and javadoc when doing a site --> <maven.reports.generate>true</maven.reports.generate> <license.licenseName>lgpl_v3</license.licenseName> - + <repository.home.url>http://maven.nuiton.org/release</repository.home.url> </properties> @@ -367,7 +369,7 @@ </testResources> <plugins> - + <plugin> <artifactId>maven-plugin-plugin</artifactId> <executions> @@ -435,11 +437,11 @@ <encoding>${project.reporting.outputEncoding}</encoding> <charset>${project.reporting.outputEncoding}</charset> <quiet>true</quiet> - <!-- uniquement a partir de javadoc 2.5 --> - <!--skip>${maven.javadoc.skip}</skip--> + <skip>${maven.javadoc.skip}</skip> <taglets> <taglet> - <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoAggregatorTypeTaglet</tagletClass> + <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoAggregatorTypeTaglet + </tagletClass> <tagletArtifact> <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-tools-javadoc</artifactId> @@ -447,7 +449,8 @@ </tagletArtifact> </taglet> <taglet> - <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoComponentFieldTaglet</tagletClass> + <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoComponentFieldTaglet + </tagletClass> <tagletArtifact> <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-tools-javadoc</artifactId> @@ -455,7 +458,8 @@ </tagletArtifact> </taglet> <taglet> - <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoConfiguratorTypeTaglet</tagletClass> + <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoConfiguratorTypeTaglet + </tagletClass> <tagletArtifact> <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-tools-javadoc</artifactId> @@ -471,7 +475,8 @@ </tagletArtifact> </taglet> <taglet> - <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoExecutionStrategyTypeTaglet</tagletClass> + <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoExecutionStrategyTypeTaglet + </tagletClass> <tagletArtifact> <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-tools-javadoc</artifactId> @@ -487,7 +492,8 @@ </tagletArtifact> </taglet> <taglet> - <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoInheritByDefaultTypeTaglet</tagletClass> + <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoInheritByDefaultTypeTaglet + </tagletClass> <tagletArtifact> <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-tools-javadoc</artifactId> @@ -495,7 +501,8 @@ </tagletArtifact> </taglet> <taglet> - <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoInstantiationStrategyTypeTaglet</tagletClass> + <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoInstantiationStrategyTypeTaglet + </tagletClass> <tagletArtifact> <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-tools-javadoc</artifactId> @@ -503,7 +510,8 @@ </tagletArtifact> </taglet> <taglet> - <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoParameterFieldTaglet</tagletClass> + <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoParameterFieldTaglet + </tagletClass> <tagletArtifact> <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-tools-javadoc</artifactId> @@ -535,7 +543,9 @@ </tagletArtifact> </taglet> <taglet> - <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresDependencyResolutionTypeTaglet</tagletClass> + <tagletClass> + org.apache.maven.tools.plugin.javadoc.MojoRequiresDependencyResolutionTypeTaglet + </tagletClass> <tagletArtifact> <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-tools-javadoc</artifactId> @@ -543,7 +553,9 @@ </tagletArtifact> </taglet> <taglet> - <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresDirectInvocationTypeTaglet</tagletClass> + <tagletClass> + org.apache.maven.tools.plugin.javadoc.MojoRequiresDirectInvocationTypeTaglet + </tagletClass> <tagletArtifact> <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-tools-javadoc</artifactId> @@ -551,7 +563,8 @@ </tagletArtifact> </taglet> <taglet> - <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresOnLineTypeTaglet</tagletClass> + <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresOnLineTypeTaglet + </tagletClass> <tagletArtifact> <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-tools-javadoc</artifactId> @@ -559,7 +572,8 @@ </tagletArtifact> </taglet> <taglet> - <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresProjectTypeTaglet</tagletClass> + <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresProjectTypeTaglet + </tagletClass> <tagletArtifact> <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-tools-javadoc</artifactId> @@ -567,7 +581,8 @@ </tagletArtifact> </taglet> <taglet> - <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresReportsTypeTaglet</tagletClass> + <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresReportsTypeTaglet + </tagletClass> <tagletArtifact> <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-tools-javadoc</artifactId> @@ -629,7 +644,7 @@ <artifactId>maven-invoker-plugin</artifactId> <version>1.3</version> </plugin> - + <plugin> <groupId>org.nuiton</groupId> <artifactId>maven-license-plugin</artifactId> @@ -650,6 +665,28 @@ <plugin> <artifactId>maven-project-info-reports-plugin</artifactId> <version>2.1.2</version> + <configuration> + <dependencyDetailsEnabled>${maven.reports.dependencyDetailsEnabled}</dependencyDetailsEnabled> + <dependencyLocationsEnabled>${maven.reports.dependencyLocationsEnabled}</dependencyLocationsEnabled> + </configuration> + <reportSets> + <reportSet> + <reports> + <report>project-team</report> + <report>mailing-list</report> + <report>cim</report> + <report>issue-tracking</report> + <report>license</report> + <report>scm</report> + <report>dependencies</report> + <report>dependency-convergence</report> + <report>plugin-management</report> + <report>plugins</report> + <report>dependency-management</report> + <report>summary</report> + </reports> + </reportSet> + </reportSets> </plugin> <plugin> @@ -657,7 +694,7 @@ <version>${javadoc.version}</version> <configuration> <quiet>true</quiet> - <!--<skip>true</skip>--> + <skip>${maven.javadoc.skip}</skip> <docencoding>${project.build.sourceEncoding}</docencoding> <encoding>${project.build.sourceEncoding}</encoding> <charset>${project.reporting.outputEncoding}</charset> @@ -696,7 +733,8 @@ </tagletArtifact> </taglet> <taglet> - <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoExecutionStrategyTypeTaglet</tagletClass> + <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoExecutionStrategyTypeTaglet + </tagletClass> <tagletArtifact> <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-tools-javadoc</artifactId> @@ -712,7 +750,8 @@ </tagletArtifact> </taglet> <taglet> - <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoInheritByDefaultTypeTaglet</tagletClass> + <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoInheritByDefaultTypeTaglet + </tagletClass> <tagletArtifact> <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-tools-javadoc</artifactId> @@ -720,7 +759,8 @@ </tagletArtifact> </taglet> <taglet> - <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoInstantiationStrategyTypeTaglet</tagletClass> + <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoInstantiationStrategyTypeTaglet + </tagletClass> <tagletArtifact> <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-tools-javadoc</artifactId> @@ -760,7 +800,9 @@ </tagletArtifact> </taglet> <taglet> - <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresDependencyResolutionTypeTaglet</tagletClass> + <tagletClass> + org.apache.maven.tools.plugin.javadoc.MojoRequiresDependencyResolutionTypeTaglet + </tagletClass> <tagletArtifact> <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-tools-javadoc</artifactId> @@ -768,7 +810,8 @@ </tagletArtifact> </taglet> <taglet> - <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresDirectInvocationTypeTaglet</tagletClass> + <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresDirectInvocationTypeTaglet + </tagletClass> <tagletArtifact> <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-tools-javadoc</artifactId> @@ -776,7 +819,8 @@ </tagletArtifact> </taglet> <taglet> - <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresOnLineTypeTaglet</tagletClass> + <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresOnLineTypeTaglet + </tagletClass> <tagletArtifact> <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-tools-javadoc</artifactId> @@ -784,7 +828,8 @@ </tagletArtifact> </taglet> <taglet> - <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresProjectTypeTaglet</tagletClass> + <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresProjectTypeTaglet + </tagletClass> <tagletArtifact> <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-tools-javadoc</artifactId> @@ -792,7 +837,8 @@ </tagletArtifact> </taglet> <taglet> - <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresReportsTypeTaglet</tagletClass> + <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresReportsTypeTaglet + </tagletClass> <tagletArtifact> <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-tools-javadoc</artifactId> @@ -843,7 +889,7 @@ <artifactId>maven-changelog-plugin</artifactId> <version>2.1</version> </plugin> - + <!-- Implicit add of reportSet to not generate jira reports --> <plugin> <artifactId>maven-changes-plugin</artifactId> @@ -900,7 +946,7 @@ </plugins> </reporting> - + <profiles> <!-- perform only on a release stage when using the maven-release-plugin --> <profile> @@ -911,7 +957,7 @@ <value>true</value> </property> </activation> - + <build> <plugins> @@ -982,7 +1028,7 @@ <maven.reports.generate>false</maven.reports.generate> </properties> </profile> - <!-- do not build dependencies detail in maven-project-info-report (speedup site generation in dev) --> + <!-- do not build dependencies detail in maven-project-info-report (speedup site generation in dev) --> <profile> <id>nodepdetails</id> <activation> Deleted: trunk/src/main/java/org/nuiton/helper/plugin/CheckProjectFilesPlugin.java =================================================================== --- trunk/src/main/java/org/nuiton/helper/plugin/CheckProjectFilesPlugin.java 2009-10-30 20:37:39 UTC (rev 619) +++ trunk/src/main/java/org/nuiton/helper/plugin/CheckProjectFilesPlugin.java 2009-11-01 16:18:50 UTC (rev 620) @@ -1,129 +0,0 @@ -/* - * *##% - * Maven helper plugin - * Copyright (C) 2009 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>. - * ##%* - */ -package org.nuiton.helper.plugin; - -import org.nuiton.plugin.*; -import java.io.File; -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.project.MavenProject; - -/** - * Check that : - * - * 1) the changelog exists on standalone module or root module of a - * multi-module project. - * 2) any project module has a README.txt and LICENSE.txt file - * - * @goal check-project-files - * @requiresProject true - * @phase validate - * @author chemit - * @since 1.0.2 - * @deprecated since 1.0.3, reuse just a enforcer plugin to check those files. (removed in 1.1.0) - */ -@Deprecated -public class CheckProjectFilesPlugin extends AbstractPlugin { - - /** - * Dependance du projet. - * - * @parameter default-value="${project}" - * @required - * @since 1.0.2 - */ - protected MavenProject project; - /** - * Un flag pour activer le mode verbeux. - * - * @parameter expression="${helper.verbose}" default-value="${maven.verbose}" - * @since 1.0.2 - */ - protected boolean verbose; - - @Override - public MavenProject getProject() { - return project; - } - - @Override - public void setProject(MavenProject project) { - this.project = project; - } - - @Override - public boolean isVerbose() { - return verbose; - } - - @Override - public void setVerbose(boolean verbose) { - this.verbose = verbose; - } - - @Override - protected boolean init() throws Exception { - return true; - } - - @Override - protected void doAction() throws Exception { - checkChangelogFile(); - checkReadmeFile(); - checkLicenseFile(); - } - - protected void checkChangelogFile() throws MojoExecutionException { - if (project.isExecutionRoot()) { - File f = new File(project.getBasedir(), "changelog.txt"); - if (!f.exists()) { - throw new MojoExecutionException("the module " + project.getName() + " requires the file " + f.getAbsolutePath()); - } else { - if (verbose) { - getLog().info("changelog file dectected : " + f.getAbsolutePath()); - } - } - } else { - getLog().info("changelog.txt is not required for module " + project.getName() + " (not a root module)"); - } - } - - protected void checkReadmeFile() throws MojoExecutionException { - File f = new File(project.getBasedir(), "README.txt"); - if (!f.exists()) { - throw new MojoExecutionException("the module " + project.getName() + " requires the file " + f.getAbsolutePath()); - } else { - if (verbose) { - getLog().info("readme file dectected : " + f.getAbsolutePath()); - } - } - } - - protected void checkLicenseFile() throws MojoExecutionException { - File f = new File(project.getBasedir(), "LICENSE.txt"); - if (!f.exists()) { - throw new MojoExecutionException("the module " + project.getName() + " requires the file " + f.getAbsolutePath()); - } else { - if (verbose) { - getLog().info("license file dectected : " + f.getAbsolutePath()); - } - } - } -} Modified: trunk/src/test/java/org/nuiton/plugin/AbstractMojoTest.java =================================================================== --- trunk/src/test/java/org/nuiton/plugin/AbstractMojoTest.java 2009-10-30 20:37:39 UTC (rev 619) +++ trunk/src/test/java/org/nuiton/plugin/AbstractMojoTest.java 2009-11-01 16:18:50 UTC (rev 620) @@ -20,7 +20,9 @@ */ package org.nuiton.plugin; +import java.beans.Introspector; import java.io.File; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.maven.plugin.Mojo; @@ -35,12 +37,12 @@ /** * Base test class for a mojo. - * + * <p/> * <b>Note:</b> replace the previous class * {@code org.nuiton.util.BasePluginTestCase}. * <p/> * Inside each test method, we can use the following objects : - * + * <p/> * <ul> * <li>{@link #getTestDir()} : location of mojo resources (where the pom file for example)</li> * <li>{@link #getPomFile()} : location of the pom file</li> @@ -57,9 +59,9 @@ * <li>{@link #createMojo(java.io.File, java.lang.String)}</li> * <li>{@link #setUpMojo(org.nuiton.plugin.Plugin, java.io.File)}</li> * </ul> - * + * + * @author chemit * @param <P> type of goal to test - * @author chemit * @since 1.0.3 */ public abstract class AbstractMojoTest<P extends Plugin> { @@ -117,9 +119,8 @@ * <p/> * By convention, we should consider that a test class use always the same * goal's name. - * + * * @param methodName the name of the next test to execute. - * * @return the name of the goal to test for the given method test name. */ protected abstract String getGoalName(String methodName); @@ -130,16 +131,17 @@ * <p/> * By convention, will be the package named by the test class name from the * {@link #getTestBasedir()}. - * + * * @param methodName the method of the next test to execute - * @param goalName the common goal name to use + * @param goalName the common goal name to use * @return the directory where to find resources for the test */ protected File getTestDir(String methodName, String goalName) { - String rep = getClass().getName(); + //TC-20091101 use a decipatilize simple name to avoid conflict of package with + // existing class name. + String rep = getClass().getPackage().getName() + "." + Introspector.decapitalize(getClass().getSimpleName()); rep = rep.replaceAll("\\.", File.separator); - File testDir = new File(getTestBasedir(), rep); if (isVerbose()) { log.info("test dir = " + getRelativePathFromBasedir(testDir)); @@ -155,11 +157,11 @@ * <p/> * By default, the pom file is the file with name {@code methodName+".xml"} * in the {@code testDir}. - * - * @param testDir the location of resources for the next test (is the result - * of the method {@link #getTestDir(java.lang.String, java.lang.String)}. + * + * @param testDir the location of resources for the next test (is the result + * of the method {@link #getTestDir(java.lang.String, java.lang.String)}. * @param methodName the name of the next test - * @param goalName the name of the common goal + * @param goalName the name of the common goal * @return the location of the pom file for the next mojo test. */ protected File getPomFile(File testDir, String methodName, String goalName) { @@ -178,7 +180,7 @@ * Create the mojo base on the given {@code pomFile} for the * given {@code goalName}. * - * @param pomFile the location of the pom file + * @param pomFile the location of the pom file * @param goalName the name of the goal to lookup * @return the instanciated mojo * @throws Exception if any problem while creating the mojo @@ -193,7 +195,7 @@ /** * Initialize the given mojo. * - * @param mojo the instanciate mojo + * @param mojo the instanciate mojo * @param pomFile the pom file used to instanciate the mojo * @throws Exception if any pb */ @@ -238,7 +240,7 @@ /** * To offer inside each test method (annotated by a {@link org.junit.Test}) the * following properties : - * + * <p/> * <ul> * <li>{@link #testDir} : location where to find resources for the test</li> * <li>{@link #pomFile} : location of the pom file to use to build the mojo</li> Modified: trunk/src/test/resources/org/nuiton/mail/plugin/sendEmailMojoTest/sendEmail.xml =================================================================== --- trunk/src/test/resources/org/nuiton/mail/plugin/SendEmailMojoTest/sendEmail.xml 2009-10-30 20:37:39 UTC (rev 619) +++ trunk/src/test/resources/org/nuiton/mail/plugin/sendEmailMojoTest/sendEmail.xml 2009-11-01 16:18:50 UTC (rev 620) @@ -15,7 +15,7 @@ <groupId>org.nuiton</groupId> <artifactId>maven-helper-plugin</artifactId> <configuration> - <emailContentFile>target/test-classes/org/nuiton/mail/plugin/SendEmailMojoTest/mailContentFile.txt</emailContentFile> + <emailContentFile>target/test-classes/org/nuiton/mail/plugin/sendEmailMojoTest/mailContentFile.txt</emailContentFile> <emailTitle>[ANNOUNCEMENT] - One 1.0.0 released</emailTitle> <encoding>UTF-8</encoding> <skipSendEmail>false</skipSendEmail> Modified: trunk/src/test/resources/org/nuiton/mail/plugin/sendEmailMojoTest/skipSendEmail.xml =================================================================== --- trunk/src/test/resources/org/nuiton/mail/plugin/SendEmailMojoTest/skipSendEmail.xml 2009-10-30 20:37:39 UTC (rev 619) +++ trunk/src/test/resources/org/nuiton/mail/plugin/sendEmailMojoTest/skipSendEmail.xml 2009-11-01 16:18:50 UTC (rev 620) @@ -15,7 +15,7 @@ <groupId>org.nuiton</groupId> <artifactId>maven-helper-plugin</artifactId> <configuration> - <emailContentFile>target/test-classes/org/nuiton/smail/plugin/SendEmailMojoTest/mailContentFile.txt</emailContentFile> + <emailContentFile>target/test-classes/org/nuiton/smail/plugin/sendEmailMojoTest/mailContentFile.txt</emailContentFile> <emailTitle>[ANNOUNCEMENT] - One 1.0.0 released</emailTitle> <encoding>UTF-8</encoding> <skipSendEmail>true</skipSendEmail>
participants (1)
-
tchemit@users.nuiton.org