You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2022/07/07 15:35:24 UTC

[maven-project-info-reports-plugin] branch holy-moly updated (d5fbefd -> 2fe978a)

This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a change to branch holy-moly
in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git


 discard d5fbefd  Make magic happen
     new 2fe978a  Make magic happen

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (d5fbefd)
            \
             N -- N -- N   refs/heads/holy-moly (2fe978a)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java  | 2 ++
 1 file changed, 2 insertions(+)


[maven-project-info-reports-plugin] 01/01: Make magic happen

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch holy-moly
in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git

commit 2fe978aea84772cd546ce446e1f2618b26bb7d3e
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sat Jul 2 23:58:47 2022 +0200

    Make magic happen
---
 pom.xml                                            |  10 +-
 .../projectinfo/AbstractProjectInfoReport.java     | 104 ---------------------
 .../projectinfo/AbstractProjectInfoTestCase.java   |  15 +--
 .../report/projectinfo/CiManagementReportTest.java |   2 +-
 .../report/projectinfo/DependenciesReportTest.java |   2 +-
 .../DependencyConvergenceReportTest.java           |   2 +-
 .../DependencyManagementReportTest.java            |   2 +-
 .../maven/report/projectinfo/IndexReportTest.java  |   2 +-
 .../projectinfo/IssueManagementReportTest.java     |   2 +-
 .../report/projectinfo/LicensesReportTest.java     |   4 +-
 .../report/projectinfo/MailingListsReportTest.java |   2 +-
 .../report/projectinfo/ModulesReportTest.java      |  12 ++-
 .../projectinfo/PluginManagementReportTest.java    |  16 ++--
 .../maven/report/projectinfo/ScmReportTest.java    |  10 +-
 .../report/projectinfo/SummaryReportTest.java      |   2 +-
 .../maven/report/projectinfo/TeamReportTest.java   |   7 +-
 16 files changed, 45 insertions(+), 149 deletions(-)

diff --git a/pom.xml b/pom.xml
index 606a044..d54e9a5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -119,12 +119,12 @@ under the License.
 
   <properties>
     <javaVersion>8</javaVersion>
-    <doxiaVersion>1.11.1</doxiaVersion>
-    <doxia-sitetoolsVersion>1.11.1</doxia-sitetoolsVersion>
+    <doxiaVersion>2.0.0-M3</doxiaVersion>
+    <doxia-sitetoolsVersion>2.0.0-M3</doxia-sitetoolsVersion>
     <mavenVersion>3.2.5</mavenVersion>
     <scmVersion>1.13.0</scmVersion>
     <aetherVersion>1.0.0.v20140518</aetherVersion>
-    <sitePluginVersion>3.12.0</sitePluginVersion>
+    <sitePluginVersion>4.0.0-M2</sitePluginVersion>
     <fluidoSkinVersion>1.11.1</fluidoSkinVersion>
     <surefire.version>2.22.2</surefire.version>
     <checkstyle.violation.ignore>ParameterNumber,MethodLength</checkstyle.violation.ignore>
@@ -135,12 +135,12 @@ under the License.
     <dependency>
       <groupId>org.apache.maven.reporting</groupId>
       <artifactId>maven-reporting-api</artifactId>
-      <version>3.1.0</version>
+      <version>4.0.0-M2</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.reporting</groupId>
       <artifactId>maven-reporting-impl</artifactId>
-      <version>3.1.0</version>
+      <version>4.0.0-M2-SNAPSHOT</version>
       <exclusions>
         <exclusion>
           <groupId>org.apache.maven</groupId>
diff --git a/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java b/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java
index b1ab8f3..4d6f9c9 100644
--- a/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java
+++ b/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java
@@ -20,10 +20,7 @@ package org.apache.maven.report.projectinfo;
  */
 
 import java.io.File;
-import java.io.FileOutputStream;
 import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLClassLoader;
@@ -36,26 +33,14 @@ import java.util.Map;
 import java.util.MissingResourceException;
 import java.util.ResourceBundle;
 
-import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.doxia.site.decoration.Body;
-import org.apache.maven.doxia.site.decoration.DecorationModel;
-import org.apache.maven.doxia.siterenderer.Renderer;
-import org.apache.maven.doxia.siterenderer.RendererException;
-import org.apache.maven.doxia.siterenderer.RenderingContext;
-import org.apache.maven.doxia.siterenderer.SiteRenderingContext;
-import org.apache.maven.doxia.siterenderer.sink.SiteRendererSink;
-import org.apache.maven.doxia.tools.SiteTool;
-import org.apache.maven.doxia.tools.SiteToolException;
 import org.apache.maven.execution.MavenSession;
 import org.apache.maven.model.Plugin;
-import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugins.annotations.Component;
 import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.project.ProjectBuilder;
 import org.apache.maven.reporting.AbstractMavenReport;
-import org.apache.maven.reporting.MavenReportException;
 import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.settings.Settings;
 import org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolver;
@@ -65,7 +50,6 @@ import org.codehaus.plexus.interpolation.InterpolationException;
 import org.codehaus.plexus.interpolation.PrefixedObjectValueSource;
 import org.codehaus.plexus.interpolation.PropertiesBasedValueSource;
 import org.codehaus.plexus.interpolation.RegexBasedInterpolator;
-import org.codehaus.plexus.util.IOUtil;
 import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.xml.Xpp3Dom;
 
@@ -82,14 +66,6 @@ public abstract class AbstractProjectInfoReport
     // Mojo components
     // ----------------------------------------------------------------------
 
-    /**
-     * SiteTool component.
-     *
-     * @since 2.1
-     */
-    @Component
-    protected SiteTool siteTool;
-
     /**
      * Artifact Resolver component.
      */
@@ -118,20 +94,6 @@ public abstract class AbstractProjectInfoReport
     @Parameter( defaultValue = "${session}", readonly = true, required = true )
     private MavenSession session;
 
-    /**
-     * Local Repository.
-     */
-    @Parameter( property = "localRepository", required = true, readonly = true )
-    protected ArtifactRepository localRepository;
-
-    /**
-     * Remote repositories used for the project.
-     *
-     * @since 2.1
-     */
-    @Parameter( property = "project.remoteArtifactRepositories" )
-    protected List<ArtifactRepository> remoteRepositories;
-
     /**
      * Plugin repositories used for the project.
      *
@@ -200,63 +162,6 @@ public abstract class AbstractProjectInfoReport
         return !skip;
     }
 
-    @Override
-    public void execute()
-        throws MojoExecutionException
-    {
-        if ( !canGenerateReport() )
-        {
-            return;
-        }
-
-        // TODO: push to a helper? Could still be improved by taking more of the site information from the site plugin
-        Writer writer = null;
-        try
-        {
-            String filename = getOutputName() + ".html";
-
-            DecorationModel model = new DecorationModel();
-            model.setBody( new Body() );
-
-            Map<String, Object> attributes = new HashMap<>();
-            attributes.put( "outputEncoding", "UTF-8" );
-            attributes.put( "project", project );
-
-            Locale locale = Locale.getDefault();
-            Artifact defaultSkin =
-                siteTool.getDefaultSkinArtifact( localRepository, project.getRemoteArtifactRepositories() );
-
-            SiteRenderingContext siteContext = siteRenderer.createContextForSkin( defaultSkin, attributes,
-                                                                                  model, getName( locale ), locale );
-
-            RenderingContext context = new RenderingContext( outputDirectory, filename, null );
-
-            SiteRendererSink sink = new SiteRendererSink( context );
-
-            generate( sink, null, locale );
-
-            outputDirectory.mkdirs();
-
-            writer = new OutputStreamWriter( new FileOutputStream( new File( outputDirectory, filename ) ), "UTF-8" );
-
-            siteRenderer.mergeDocumentIntoSite( writer, sink, siteContext );
-
-            siteRenderer.copyResources( siteContext, outputDirectory );
-
-            writer.close();
-            writer = null;
-        }
-        catch ( RendererException | IOException | SiteToolException | MavenReportException e )
-        {
-            throw new MojoExecutionException( "An error has occurred in " + getName( Locale.ENGLISH )
-                + " report generation.", e );
-        }
-        finally
-        {
-            IOUtil.close( writer );
-        }
-    }
-
     @Override
     public String getCategoryName()
     {
@@ -374,15 +279,6 @@ public abstract class AbstractProjectInfoReport
         return null;
     }
 
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected Renderer getSiteRenderer()
-    {
-        return siteRenderer;
-    }
-
     /**
      * @param locale The locale
      * @param key The key to search for
diff --git a/src/test/java/org/apache/maven/report/projectinfo/AbstractProjectInfoTestCase.java b/src/test/java/org/apache/maven/report/projectinfo/AbstractProjectInfoTestCase.java
index 45d9c90..fbd8a8b 100644
--- a/src/test/java/org/apache/maven/report/projectinfo/AbstractProjectInfoTestCase.java
+++ b/src/test/java/org/apache/maven/report/projectinfo/AbstractProjectInfoTestCase.java
@@ -38,6 +38,8 @@ import org.eclipse.aether.internal.impl.SimpleLocalRepositoryManagerFactory;
 import org.eclipse.aether.DefaultRepositorySystemSession;
 import org.eclipse.aether.repository.LocalRepository;
 
+import com.meterware.httpunit.HttpUnitOptions;
+
 /**
  * Abstract class to test reports generation with <a href="http://www.httpunit.org/">HTTPUnit</a> framework.
  *
@@ -49,7 +51,7 @@ public abstract class AbstractProjectInfoTestCase
     extends AbstractMojoTestCase
 {
     private ArtifactStubFactory artifactStubFactory;
-    
+
     /**
      * The default locale is English.
      */
@@ -72,12 +74,14 @@ public abstract class AbstractProjectInfoTestCase
         // required for mojo lookups to work
         super.setUp();
 
+        HttpUnitOptions.setScriptingEnabled( false );
+
         i18n = getContainer().lookup( I18N.class );
         setVariableValueToObject( i18n, "defaultBundleName", "project-info-reports" );
 
         artifactStubFactory = new DependencyArtifactStubFactory( getTestFile( "target" ), true, false );
         artifactStubFactory.getWorkingDir().mkdirs();
-        
+
         // Set the default Locale
         Locale.setDefault( DEFAULT_LOCALE );
     }
@@ -172,7 +176,7 @@ public abstract class AbstractProjectInfoTestCase
     {
         File pluginXmlFile = new File( getBasedir(), "src/test/resources/plugin-configs/" + pluginXml );
         AbstractProjectInfoReport mojo  = createReportMojo( goal, pluginXmlFile );
-        return generateReport( mojo, pluginXmlFile);
+        return generateReport( mojo, pluginXmlFile );
     }
 
     protected AbstractProjectInfoReport createReportMojo( String goal, File pluginXmlFile )
@@ -180,7 +184,7 @@ public abstract class AbstractProjectInfoTestCase
     {
         AbstractProjectInfoReport mojo = (AbstractProjectInfoReport) lookupMojo( goal, pluginXmlFile );
         assertNotNull( "Mojo found.", mojo );
-        
+
         LegacySupport legacySupport = lookup( LegacySupport.class );
         legacySupport.setSession( newMavenSession( new MavenProjectStub() ) );
         DefaultRepositorySystemSession repoSession =
@@ -199,11 +203,10 @@ public abstract class AbstractProjectInfoTestCase
         mojo.execute();
 
         ProjectBuilder builder = lookup( ProjectBuilder.class );
-        
+
         ProjectBuildingRequest buildingRequest = new DefaultProjectBuildingRequest();
         buildingRequest.setRepositorySession( lookup( LegacySupport.class ).getRepositorySession() );
 
-        assertNotNull( "Local repository", mojo.localRepository );
         testMavenProject = builder.build( pluginXmlFile, buildingRequest ).getProject();
 
         File outputDir = mojo.getReportOutputDirectory();
diff --git a/src/test/java/org/apache/maven/report/projectinfo/CiManagementReportTest.java b/src/test/java/org/apache/maven/report/projectinfo/CiManagementReportTest.java
index c438fc0..027c328 100644
--- a/src/test/java/org/apache/maven/report/projectinfo/CiManagementReportTest.java
+++ b/src/test/java/org/apache/maven/report/projectinfo/CiManagementReportTest.java
@@ -64,7 +64,7 @@ public class CiManagementReportTest
         assertTrue( response.getContentLength() > 0 );
 
         // Test the Page title
-        String expectedTitle = prepareTitle( getString( "report.ci-management.name" ),
+        String expectedTitle = prepareTitle( "ci mangement project info",
             getString( "report.ci-management.title" ) );
         assertEquals( expectedTitle, response.getTitle() );
 
diff --git a/src/test/java/org/apache/maven/report/projectinfo/DependenciesReportTest.java b/src/test/java/org/apache/maven/report/projectinfo/DependenciesReportTest.java
index a90ffaf..9f2f0ad 100644
--- a/src/test/java/org/apache/maven/report/projectinfo/DependenciesReportTest.java
+++ b/src/test/java/org/apache/maven/report/projectinfo/DependenciesReportTest.java
@@ -64,7 +64,7 @@ public class DependenciesReportTest
         assertTrue( response.getContentLength() > 0 );
 
         // Test the Page title
-        String expectedTitle = prepareTitle( getString( "report.dependencies.name" ),
+        String expectedTitle = prepareTitle( "dependencies project info",
             getString( "report.dependencies.title" ) );
         assertEquals( expectedTitle, response.getTitle() );
 
diff --git a/src/test/java/org/apache/maven/report/projectinfo/DependencyConvergenceReportTest.java b/src/test/java/org/apache/maven/report/projectinfo/DependencyConvergenceReportTest.java
index 402422d..91768f2 100644
--- a/src/test/java/org/apache/maven/report/projectinfo/DependencyConvergenceReportTest.java
+++ b/src/test/java/org/apache/maven/report/projectinfo/DependencyConvergenceReportTest.java
@@ -63,7 +63,7 @@ public class DependencyConvergenceReportTest
         assertTrue( response.getContentLength() > 0 );
 
         // Test the Page title
-        String expectedTitle = prepareTitle( getString( "report.dependency-convergence.name" ),
+        String expectedTitle = prepareTitle( "dependency convergence project info",
             getString( "report.dependency-convergence.reactor.title" ) );
         assertEquals( expectedTitle, response.getTitle() );
 
diff --git a/src/test/java/org/apache/maven/report/projectinfo/DependencyManagementReportTest.java b/src/test/java/org/apache/maven/report/projectinfo/DependencyManagementReportTest.java
index 574880d..143cb2d 100644
--- a/src/test/java/org/apache/maven/report/projectinfo/DependencyManagementReportTest.java
+++ b/src/test/java/org/apache/maven/report/projectinfo/DependencyManagementReportTest.java
@@ -64,7 +64,7 @@ public class DependencyManagementReportTest
         assertTrue( response.getContentLength() > 0 );
 
         // Test the Page title
-        String expectedTitle = prepareTitle( getString( "report.dependency-management.name" ),
+        String expectedTitle = prepareTitle( "dependency management project info",
             getString( "report.dependency-management.title" ) );
         assertEquals( expectedTitle, response.getTitle() );
 
diff --git a/src/test/java/org/apache/maven/report/projectinfo/IndexReportTest.java b/src/test/java/org/apache/maven/report/projectinfo/IndexReportTest.java
index 0f7e6e0..ccd6e37 100644
--- a/src/test/java/org/apache/maven/report/projectinfo/IndexReportTest.java
+++ b/src/test/java/org/apache/maven/report/projectinfo/IndexReportTest.java
@@ -64,7 +64,7 @@ public class IndexReportTest
 
         // Test the Page title
         // Index does not have a 'name' but 'title' only
-        String expectedTitle = prepareTitle( getString( "report.index.title" ),
+        String expectedTitle = prepareTitle( "index project info",
             getString( "report.index.title" ) );
         assertEquals( expectedTitle, response.getTitle() );
 
diff --git a/src/test/java/org/apache/maven/report/projectinfo/IssueManagementReportTest.java b/src/test/java/org/apache/maven/report/projectinfo/IssueManagementReportTest.java
index c0f77e0..0f235bf 100644
--- a/src/test/java/org/apache/maven/report/projectinfo/IssueManagementReportTest.java
+++ b/src/test/java/org/apache/maven/report/projectinfo/IssueManagementReportTest.java
@@ -64,7 +64,7 @@ public class IssueManagementReportTest
         assertTrue( response.getContentLength() > 0 );
 
         // Test the Page title
-        String expectedTitle = prepareTitle( getString( "report.issue-management.name" ),
+        String expectedTitle = prepareTitle( "issue management project info",
             getString( "report.issue-management.title" ) );
         assertEquals( expectedTitle, response.getTitle() );
 
diff --git a/src/test/java/org/apache/maven/report/projectinfo/LicensesReportTest.java b/src/test/java/org/apache/maven/report/projectinfo/LicensesReportTest.java
index a6733bd..cbc2c59 100644
--- a/src/test/java/org/apache/maven/report/projectinfo/LicensesReportTest.java
+++ b/src/test/java/org/apache/maven/report/projectinfo/LicensesReportTest.java
@@ -64,7 +64,7 @@ public class LicensesReportTest
         assertTrue( response.getContentLength() > 0 );
 
         // Test the Page title
-        String expectedTitle = prepareTitle( getString( "report.licenses.name" ),
+        String expectedTitle = prepareTitle( "licenses project info",
             getString( "report.licenses.title" ) );
         assertEquals( expectedTitle, response.getTitle() );
 
@@ -99,7 +99,7 @@ public class LicensesReportTest
         assertTrue( response.getContentLength() > 0 );
 
         // Test the Page title
-        String expectedTitle = prepareTitle( getString( "report.licenses.name" ),
+        String expectedTitle = prepareTitle( "licenses project info",
             getString( "report.licenses.title" ) );
         assertEquals( expectedTitle, response.getTitle() );
 
diff --git a/src/test/java/org/apache/maven/report/projectinfo/MailingListsReportTest.java b/src/test/java/org/apache/maven/report/projectinfo/MailingListsReportTest.java
index aba5387..2a96e15 100644
--- a/src/test/java/org/apache/maven/report/projectinfo/MailingListsReportTest.java
+++ b/src/test/java/org/apache/maven/report/projectinfo/MailingListsReportTest.java
@@ -65,7 +65,7 @@ public class MailingListsReportTest
         assertTrue( response.getContentLength() > 0 );
 
         // Test the Page title
-        String expectedTitle = prepareTitle( getString( "report.mailing-lists.name" ),
+        String expectedTitle = prepareTitle( "mailing lists project info",
             getString( "report.mailing-lists.title" ) );
         assertEquals( expectedTitle, response.getTitle() );
 
diff --git a/src/test/java/org/apache/maven/report/projectinfo/ModulesReportTest.java b/src/test/java/org/apache/maven/report/projectinfo/ModulesReportTest.java
index 3202960..a90106c 100644
--- a/src/test/java/org/apache/maven/report/projectinfo/ModulesReportTest.java
+++ b/src/test/java/org/apache/maven/report/projectinfo/ModulesReportTest.java
@@ -46,15 +46,15 @@ public class ModulesReportTest
      * WebConversation object
      */
     private static final WebConversation WEB_CONVERSATION = new WebConversation();
-    
+
     @Override
     protected AbstractProjectInfoReport createReportMojo( String goal, File pluginXmlFile )
         throws Exception
     {
         AbstractProjectInfoReport mojo = super.createReportMojo( goal, pluginXmlFile );
-        
+
         mojo.setLog( new SilentLog() );
-        
+
         return mojo;
     }
 
@@ -81,12 +81,14 @@ public class ModulesReportTest
         assertTrue( response.getContentLength() > 0 );
 
         // Test the Page title
-        String expectedTitle = prepareTitle( getString( "report.modules.name" ), getString( "report.modules.title" ) );
+        String expectedTitle = prepareTitle( "modules project info",
+            getString( "report.modules.title" ) );
         assertEquals( expectedTitle, response.getTitle() );
 
         // Test the texts
         TextBlock[] textBlocks = response.getTextBlocks();
-        assertEquals( 2, textBlocks.length );
+        // Last one is footer noise
+        assertEquals( 2, textBlocks.length - 1 );
         assertEquals( getString( "report.modules.title" ), textBlocks[0].getText() );
         assertEquals( getString( "report.modules.intro" ), textBlocks[1].getText() );
 
diff --git a/src/test/java/org/apache/maven/report/projectinfo/PluginManagementReportTest.java b/src/test/java/org/apache/maven/report/projectinfo/PluginManagementReportTest.java
index 9f9281e..68cd90e 100644
--- a/src/test/java/org/apache/maven/report/projectinfo/PluginManagementReportTest.java
+++ b/src/test/java/org/apache/maven/report/projectinfo/PluginManagementReportTest.java
@@ -53,16 +53,14 @@ public class PluginManagementReportTest
      */
     private static final WebConversation WEB_CONVERSATION = new WebConversation();
 
-    
-    
     @Override
     protected AbstractProjectInfoReport createReportMojo( String goal, File pluginXmlFile )
         throws Exception
     {
         AbstractProjectInfoReport mojo = super.createReportMojo( goal, pluginXmlFile );
-        
+
         ProjectBuilder builder = mock( ProjectBuilder.class );
-        
+
         when( builder.build( isA( Artifact.class ),
                              isA( ProjectBuildingRequest.class ) ) ).thenAnswer( new Answer<ProjectBuildingResult>()
                              {
@@ -70,16 +68,16 @@ public class PluginManagementReportTest
                                  public ProjectBuildingResult answer( InvocationOnMock invocation )
                                      throws Throwable
                                  {
-                                     return createProjectBuildingResult( (Artifact) invocation.getArgument( 0 ), 
+                                     return createProjectBuildingResult( (Artifact) invocation.getArgument( 0 ),
                                                                          "http://m.a.o/" );
                                  }
                              } );
 
         setVariableValueToObject( mojo, "projectBuilder", builder );
-        
+
         return mojo;
     }
-    
+
     /**
      * Test report
      *
@@ -103,7 +101,7 @@ public class PluginManagementReportTest
         assertTrue( response.getContentLength() > 0 );
 
         // Test the Page title
-        String expectedTitle = prepareTitle( getString( "report.plugin-management.name" ),
+        String expectedTitle = prepareTitle( "plugin management project info",
             getString( "report.plugin-management.title" ) );
         assertEquals( expectedTitle, response.getTitle() );
 
@@ -142,7 +140,7 @@ public class PluginManagementReportTest
         assertTrue( response.getContentLength() > 0 );
 
         // Test the Page title
-        String expectedTitle = prepareTitle( getString( "report.plugin-management.name" ),
+        String expectedTitle = prepareTitle( "plugin management project info",
             getString( "report.plugin-management.title" ) );
         assertEquals( expectedTitle, response.getTitle() );
 
diff --git a/src/test/java/org/apache/maven/report/projectinfo/ScmReportTest.java b/src/test/java/org/apache/maven/report/projectinfo/ScmReportTest.java
index 308927d..49504ec 100644
--- a/src/test/java/org/apache/maven/report/projectinfo/ScmReportTest.java
+++ b/src/test/java/org/apache/maven/report/projectinfo/ScmReportTest.java
@@ -66,15 +66,14 @@ public class ScmReportTest
         assertTrue( response.getContentLength() > 0 );
 
         // Test the Page title
-        String expectedTitle = prepareTitle( getString( "report.scm.name" ),
+        String expectedTitle = prepareTitle( "scm project info",
             getString( "report.scm.title" ) );
         assertEquals( expectedTitle, response.getTitle() );
 
         // Test the texts
         TextBlock[] textBlocks = response.getTextBlocks();
-
-        assertEquals( textBlocks.length, 6 );
-
+        // Last one is footer noise
+        assertEquals( 6, textBlocks.length - 1 );
         assertEquals( getString( "report.scm.overview.title" ), textBlocks[0].getText() );
         assertEquals( getString( "report.scm.general.intro" ), textBlocks[1].getText() );
         assertEquals( getString( "report.scm.webaccess.title" ), textBlocks[2].getText() );
@@ -93,8 +92,7 @@ public class ScmReportTest
     {
         File pluginXmlFile = new File( getBasedir(), "src/test/resources/plugin-configs/"
                 + "scm-wrong-url-plugin-config.xml" );
-        Mojo mojo = lookupMojo( "scm", pluginXmlFile );
-        assertNotNull( "Mojo found.", mojo );
+        Mojo mojo = createReportMojo( "scm", pluginXmlFile );
 
         setVariableValueToObject( mojo, "anonymousConnection", "scm:svn" );
         try
diff --git a/src/test/java/org/apache/maven/report/projectinfo/SummaryReportTest.java b/src/test/java/org/apache/maven/report/projectinfo/SummaryReportTest.java
index 8a876cd..a716488 100644
--- a/src/test/java/org/apache/maven/report/projectinfo/SummaryReportTest.java
+++ b/src/test/java/org/apache/maven/report/projectinfo/SummaryReportTest.java
@@ -63,7 +63,7 @@ public class SummaryReportTest
         assertTrue( response.getContentLength() > 0 );
 
         // Test the Page title
-        String expectedTitle = prepareTitle( getString( "report.summary.name" ),
+        String expectedTitle = prepareTitle( "summary project info",
             getString( "report.summary.title" ) );
         assertEquals( expectedTitle, response.getTitle() );
 
diff --git a/src/test/java/org/apache/maven/report/projectinfo/TeamReportTest.java b/src/test/java/org/apache/maven/report/projectinfo/TeamReportTest.java
index ed0ca5c..e45272e 100644
--- a/src/test/java/org/apache/maven/report/projectinfo/TeamReportTest.java
+++ b/src/test/java/org/apache/maven/report/projectinfo/TeamReportTest.java
@@ -70,7 +70,7 @@ public class TeamReportTest
         assertTrue( response.getContentLength() > 0 );
 
         // Test the Page title
-        String expectedTitle = prepareTitle( getString( "report.team.name" ),
+        String expectedTitle = prepareTitle( "team project info",
             getString( "report.team.title" ) );
         assertEquals( expectedTitle, response.getTitle() );
 
@@ -78,9 +78,8 @@ public class TeamReportTest
 
         // Test the texts
         TextBlock[] textBlocks = response.getTextBlocks();
-
-        assertEquals( textBlocks.length, 7 );
-
+        // Last one is footer noise
+        assertEquals( 7, textBlocks.length - 1 );
         assertEquals( getString( "report.team.intro.title" ), textBlocks[0].getText() );
         assertEquals( getString( "report.team.intro.description1" ), textBlocks[1].getText() );
         assertEquals( getString( "report.team.intro.description2" ), textBlocks[2].getText() );