You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2011/03/26 03:43:31 UTC

svn commit: r1085630 - in /maven/plugins/branches/maven-site-plugin-3.x: ./ src/main/java/org/apache/maven/plugins/site/ src/main/java/org/apache/maven/reporting/exec/ src/test/java/org/apache/maven/plugins/site/

Author: hboutemy
Date: Sat Mar 26 02:43:30 2011
New Revision: 1085630

URL: http://svn.apache.org/viewvc?rev=1085630&view=rev
Log:
[MSITE-560] made maven-site-plugin 3.x work both with Maven 2.2 and Maven 3.x

Modified:
    maven/plugins/branches/maven-site-plugin-3.x/pom.xml
    maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/AbstractDeployMojo.java
    maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/AbstractSiteMojo.java
    maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/AbstractSiteRenderingMojo.java
    maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/ReportDocumentRenderer.java
    maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/MavenReportExecution.java
    maven/plugins/branches/maven-site-plugin-3.x/src/test/java/org/apache/maven/plugins/site/AbstractSiteDeployWebDavTest.java

Modified: maven/plugins/branches/maven-site-plugin-3.x/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-site-plugin-3.x/pom.xml?rev=1085630&r1=1085629&r2=1085630&view=diff
==============================================================================
--- maven/plugins/branches/maven-site-plugin-3.x/pom.xml (original)
+++ maven/plugins/branches/maven-site-plugin-3.x/pom.xml Sat Mar 26 02:43:30 2011
@@ -162,7 +162,7 @@ under the License.
   </contributors>
 
   <prerequisites>
-    <maven>${mavenVersion}</maven>
+    <maven>2.2.0</maven>
   </prerequisites>
 
   <scm>
@@ -207,6 +207,7 @@ under the License.
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-compat</artifactId>
       <version>${mavenVersion}</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
@@ -238,11 +239,13 @@ under the License.
       <groupId>org.sonatype.aether</groupId>
       <artifactId>aether-util</artifactId>
       <version>1.7</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.sonatype.aether</groupId>
       <artifactId>aether-api</artifactId>
       <version>1.7</version>
+      <scope>provided</scope>
     </dependency>
 
     <!-- Doxia -->
@@ -513,6 +516,42 @@ under the License.
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-shade-plugin</artifactId>
+        <version>1.4</version>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>shade</goal>
+            </goals>
+            <configuration>
+              <artifactSet>
+                <includes>
+                  <include>org.apache.maven.reporting:maven-reporting-api</include>
+                  <include>org.apache.maven:maven-artifact</include>
+                </includes>
+              </artifactSet>
+              <filters>
+                <filter>
+                  <artifact>org.apache.maven.reporting:maven-reporting-api</artifact>
+                  <includes><!-- class not included in maven-reporting-api from Maven 2.2 -->
+                    <include>**/MavenMultiPageReport.class</include>
+                  </includes>
+                </filter>
+                <filter>
+                  <artifact>org.apache.maven:maven-artifact</artifact>
+                  <includes>
+                    <include>**/ComparableVersion.class</include>
+                    <include>**/ComparableVersion$*.class</include>
+                  </includes>
+                </filter>                
+              </filters>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
 

Modified: maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/AbstractDeployMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/AbstractDeployMojo.java?rev=1085630&r1=1085629&r2=1085630&view=diff
==============================================================================
--- maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/AbstractDeployMojo.java (original)
+++ maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/AbstractDeployMojo.java Sat Mar 26 02:43:30 2011
@@ -34,7 +34,6 @@ import org.apache.maven.model.Site;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.logging.Log;
 import org.apache.maven.project.MavenProject;
-import org.apache.maven.repository.legacy.WagonConfigurationException;
 import org.apache.maven.settings.Proxy;
 import org.apache.maven.settings.Server;
 import org.apache.maven.settings.Settings;
@@ -55,6 +54,7 @@ import org.apache.maven.wagon.observers.
 import org.apache.maven.wagon.proxy.ProxyInfo;
 import org.apache.maven.wagon.repository.Repository;
 
+import org.codehaus.plexus.PlexusConstants;
 import org.codehaus.plexus.PlexusContainer;
 import org.codehaus.plexus.component.configurator.ComponentConfigurationException;
 import org.codehaus.plexus.component.configurator.ComponentConfigurator;
@@ -62,6 +62,9 @@ import org.codehaus.plexus.component.rep
 import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
 import org.codehaus.plexus.configuration.PlexusConfiguration;
 import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration;
+import org.codehaus.plexus.context.Context;
+import org.codehaus.plexus.context.ContextException;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable;
 import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.xml.Xpp3Dom;
 
@@ -74,7 +77,7 @@ import org.codehaus.plexus.util.xml.Xpp3
  * @since 2.3
  */
 public abstract class AbstractDeployMojo
-    extends AbstractSiteMojo
+    extends AbstractSiteMojo implements Contextualizable
 {
     /**
      * Directory containing the generated project sites and report distributions.
@@ -133,17 +136,6 @@ public abstract class AbstractDeployMojo
      */
     protected MavenSession mavenSession;
 
-    /**
-     * @since 3.0-beta-2
-     * @component
-     * @readonly
-     */
-    private SettingsDecrypter settingsDecrypter;
-
-    /**
-     * @component
-     * @readonly
-     */
     private PlexusContainer container;
 
     /** {@inheritDoc} */
@@ -232,14 +224,31 @@ public abstract class AbstractDeployMojo
         {
             configureWagon( wagon, repository.getId(), settings, container, getLog() );
         }
-        catch ( WagonConfigurationException e )
+        catch ( TransferFailedException e )
         {
             throw new MojoExecutionException( "Unable to configure Wagon: '" + repository.getProtocol() + "'", e );
         }
 
         try
         {
-            final ProxyInfo proxyInfo = getProxy( repository, getLog(), mavenSession, settingsDecrypter );
+            final ProxyInfo proxyInfo;
+            if ( !isMaven3OrMore() )
+            {
+                proxyInfo = getProxyInfo( repository, wagonManager );
+            }
+            else
+            {
+                try
+                {
+                    SettingsDecrypter settingsDecrypter = container.lookup( SettingsDecrypter.class );
+
+                    proxyInfo = getProxy( repository, getLog(), mavenSession, settingsDecrypter );
+                }
+                catch ( ComponentLookupException cle )
+                {
+                    throw new MojoExecutionException( "Unable to lookup SettingsDecrypter: " + cle.getMessage(), cle );
+                }
+            }
 
             push( directory, repository, wagonManager, wagon, proxyInfo,
                 siteTool.getAvailableLocales( locales ), getDeployModuleDirectory(), getLog() );
@@ -305,7 +314,7 @@ public abstract class AbstractDeployMojo
         {
             throw new MojoExecutionException( "Unsupported protocol: '" + repository.getProtocol() + "'", e );
         }
-        catch ( WagonConfigurationException e )
+        catch ( TransferFailedException e )
         {
             throw new MojoExecutionException( "Unable to configure Wagon: '" + repository.getProtocol() + "'", e );
         }
@@ -580,7 +589,7 @@ public abstract class AbstractDeployMojo
      */
     private static void configureWagon( Wagon wagon, String repositoryId, Settings settings, PlexusContainer container,
                                         Log log )
-        throws WagonConfigurationException
+        throws TransferFailedException
     {
         log.debug( " configureWagon " );
 
@@ -607,13 +616,13 @@ public abstract class AbstractDeployMojo
                     }
                     catch ( final ComponentLookupException e )
                     {
-                        throw new WagonConfigurationException( repositoryId, "Unable to lookup wagon configurator."
-                            + " Wagon configuration cannot be applied.", e );
+                        throw new TransferFailedException( "While configuring wagon for \'" + repositoryId
+                            + "\': Unable to lookup wagon configurator." + " Wagon configuration cannot be applied.", e );
                     }
                     catch ( ComponentConfigurationException e )
                     {
-                        throw new WagonConfigurationException( repositoryId, "Unable to apply wagon configuration.",
-                            e );
+                        throw new TransferFailedException( "While configuring wagon for \'" + repositoryId
+                            + "\': Unable to apply wagon configuration.", e );
                     }
                     finally
                     {
@@ -634,6 +643,13 @@ public abstract class AbstractDeployMojo
         }
     }
 
+    /** {@inheritDoc} */
+    public void contextualize( Context context )
+        throws ContextException
+    {
+        container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY );
+    }
+
     /**
      * Find the top level parent in the reactor, i.e. the execution root.
      *

Modified: maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/AbstractSiteMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/AbstractSiteMojo.java?rev=1085630&r1=1085629&r2=1085630&view=diff
==============================================================================
--- maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/AbstractSiteMojo.java (original)
+++ maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/AbstractSiteMojo.java Sat Mar 26 02:43:30 2011
@@ -20,15 +20,20 @@ package org.apache.maven.plugins.site;
  */
 
 import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
 
 import java.util.List;
+import java.util.Properties;
 
 import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.versioning.ComparableVersion;
 import org.apache.maven.doxia.tools.SiteTool;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.project.MavenProject;
 
 import org.codehaus.plexus.i18n.I18N;
+import org.codehaus.plexus.util.IOUtil;
 import org.codehaus.plexus.util.ReaderFactory;
 
 /**
@@ -127,4 +132,34 @@ public abstract class AbstractSiteMojo
     {
         return ( outputEncoding == null ) ? ReaderFactory.UTF_8 : outputEncoding;
     }
+    
+    protected boolean isMaven3OrMore()
+    {
+        return new ComparableVersion( getMavenVersion() ).compareTo( new ComparableVersion( "3.0" ) ) >= 0;
+    }
+
+    protected String getMavenVersion()
+    {
+        // This relies on the fact that MavenProject is the in core classloader
+        // and that the core classloader is for the maven-core artifact
+        // and that should have a pom.properties file
+        // if this ever changes, we will have to revisit this code.
+        final Properties properties = new Properties();
+        final InputStream in =
+            MavenProject.class.getClassLoader().getResourceAsStream( "META-INF/maven/org.apache.maven/maven-core/pom.properties" );
+        try
+        {
+            properties.load( in );
+        }
+        catch ( IOException ioe )
+        {
+            return "";
+        }
+        finally
+        {
+            IOUtil.close( in );
+        }
+
+        return properties.getProperty( "version" ).trim();
+    }
 }

Modified: maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/AbstractSiteRenderingMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/AbstractSiteRenderingMojo.java?rev=1085630&r1=1085629&r2=1085630&view=diff
==============================================================================
--- maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/AbstractSiteRenderingMojo.java (original)
+++ maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/AbstractSiteRenderingMojo.java Sat Mar 26 02:43:30 2011
@@ -24,7 +24,6 @@ import java.io.IOException;
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
@@ -51,7 +50,12 @@ import org.apache.maven.reporting.exec.M
 import org.apache.maven.reporting.exec.MavenReportExecutor;
 import org.apache.maven.reporting.exec.MavenReportExecutorRequest;
 import org.apache.maven.reporting.exec.ReportPlugin;
-
+import org.codehaus.plexus.PlexusConstants;
+import org.codehaus.plexus.PlexusContainer;
+import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
+import org.codehaus.plexus.context.Context;
+import org.codehaus.plexus.context.ContextException;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable;
 
 /**
  * Base class for site rendering mojos.
@@ -60,7 +64,7 @@ import org.apache.maven.reporting.exec.R
  * @version $Id$
  */
 public abstract class AbstractSiteRenderingMojo
-    extends AbstractSiteMojo
+    extends AbstractSiteMojo implements Contextualizable
 {
     /**
      * Module type exclusion mappings
@@ -138,12 +142,6 @@ public abstract class AbstractSiteRender
     protected Renderer siteRenderer;
 
     /**
-     * @parameter
-     * @since 3.0-beta-1
-     */
-    private ReportPlugin[] reportPlugins;
-
-    /**
      * Alternative directory for xdoc source, useful for m1 to m2 migration
      *
      * @parameter default-value="${basedir}/xdocs"
@@ -170,12 +168,23 @@ public abstract class AbstractSiteRender
     protected MavenSession mavenSession;
 
     /**
-     * The report executor.
+     * Reports (Maven 2).
      * 
-     * @component
+     * @parameter expression="${reports}"
+     * @required
      * @readonly
      */
-    private MavenReportExecutor mavenReportExecutor;
+    protected List<MavenReport> reports;
+
+    /**
+     * Report plugins (Maven 3).
+     * 
+     * @parameter
+     * @since 3.0-beta-1
+     */
+    private ReportPlugin[] reportPlugins;
+
+    private PlexusContainer container;
 
     /**
      * Make links in the site descriptor relative to the project URL.
@@ -199,21 +208,45 @@ public abstract class AbstractSiteRender
      */
     private boolean generateProjectInfo;
 
+    /** {@inheritDoc} */
+    public void contextualize( Context context )
+        throws ContextException
+    {
+        container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY );
+    }
+
     protected List<MavenReportExecution> getReports()
         throws MojoExecutionException
     {
-        if ( reportPlugins == null || reportPlugins.length <= 0 )
+        if ( isMaven3OrMore() )
         {
-            return Collections.emptyList();
-        }
+            MavenReportExecutorRequest mavenReportExecutorRequest = new MavenReportExecutorRequest();
+            mavenReportExecutorRequest.setLocalRepository( localRepository );
+            mavenReportExecutorRequest.setMavenSession( mavenSession );
+            mavenReportExecutorRequest.setProject( project );
+            mavenReportExecutorRequest.setReportPlugins( reportPlugins );
 
-        MavenReportExecutorRequest mavenReportExecutorRequest = new MavenReportExecutorRequest();
-        mavenReportExecutorRequest.setLocalRepository( localRepository );
-        mavenReportExecutorRequest.setMavenSession( mavenSession );
-        mavenReportExecutorRequest.setProject( project );
-        mavenReportExecutorRequest.setReportPlugins( reportPlugins );
+            MavenReportExecutor mavenReportExecutor;
+            try
+            {
+                mavenReportExecutor = (MavenReportExecutor) container.lookup( MavenReportExecutor.class.getName() );
+            }
+            catch ( ComponentLookupException e )
+            {
+                throw new MojoExecutionException( "could not get MavenReportExecutor component", e );
+            }
+            return mavenReportExecutor.buildMavenReports( mavenReportExecutorRequest );
+        }
 
-        return mavenReportExecutor.buildMavenReports( mavenReportExecutorRequest );
+        List<MavenReportExecution> reportExecutions = new ArrayList<MavenReportExecution>( reports.size() );
+        for ( MavenReport report : reports )
+        {
+            if ( report.canGenerateReport() )
+            {
+                reportExecutions.add( new MavenReportExecution( report ) );
+            }
+        }
+        return reportExecutions;
     }
 
     protected SiteRenderingContext createSiteRenderingContext( Locale locale )
@@ -483,7 +516,6 @@ public abstract class AbstractSiteRender
 
                 if ( report != null )
                 {
-
                     if ( item.getName() == null )
                     {
                         item.setName( report.getName( locale ) );

Modified: maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/ReportDocumentRenderer.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/ReportDocumentRenderer.java?rev=1085630&r1=1085629&r2=1085630&view=diff
==============================================================================
--- maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/ReportDocumentRenderer.java (original)
+++ maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/ReportDocumentRenderer.java Sat Mar 26 02:43:30 2011
@@ -24,6 +24,8 @@ import java.io.IOException;
 import java.io.OutputStream;
 import java.io.Writer;
 import java.io.File;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
 
 import java.util.ArrayList;
 import java.util.Locale;
@@ -71,14 +73,54 @@ public class ReportDocumentRenderer
 
         this.renderingContext = renderingContext;
 
-        this.pluginInfo =
-            mavenReportExecution.getPlugin().getArtifactId() + ':' + mavenReportExecution.getPlugin().getVersion();
+        if ( mavenReportExecution.getPlugin() == null )
+        {
+            this.pluginInfo = getPluginInfo( report );
+        }
+        else
+        {
+            this.pluginInfo =
+                mavenReportExecution.getPlugin().getArtifactId() + ':' + mavenReportExecution.getPlugin().getVersion();
+        }
 
         this.classLoader = mavenReportExecution.getClassLoader();
 
         this.log = log;
     }
 
+    /**
+     * Get plugin information from report's Manifest.
+     * 
+     * @param report the Maven report
+     * @return plugin information as Specification Title followed by Specification Version if set in Manifest and
+     *         supported by JVM
+     */
+    private String getPluginInfo( MavenReport report )
+    {
+        Package pkg = report.getClass().getPackage();
+
+        if ( pkg != null )
+        {
+            String title = pkg.getSpecificationTitle();
+            String version = pkg.getSpecificationVersion();
+            
+            if ( title == null )
+            {
+                return version;
+            }
+            else if ( version == null )
+            {
+                return title;
+            }
+            else
+            {
+                return title + ' ' + version;
+            }
+        }
+
+        return null;
+    }
+
     private static class MySink
         extends SiteRendererSink
     {
@@ -164,7 +206,10 @@ public class ReportDocumentRenderer
 
         SiteRendererSink sink = new SiteRendererSink( renderingContext );
         ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader();
-        Thread.currentThread().setContextClassLoader( classLoader );
+        if ( classLoader != null )
+        {
+            Thread.currentThread().setContextClassLoader( classLoader );
+        }
         try
         {
             if ( report instanceof MavenMultiPageReport )
@@ -172,6 +217,10 @@ public class ReportDocumentRenderer
                 // extended multi-page API
                 ( (MavenMultiPageReport) report ).generate( sink, sf, locale );
             }
+            else if ( generateMultiPage( locale, sf, sink ) )
+            {
+             // extended multi-page API for Maven 2.2, only accessible by reflection API
+            }
             else
             {
                 // old single-page-only API
@@ -189,7 +238,10 @@ public class ReportDocumentRenderer
         }
         finally
         {
-            Thread.currentThread().setContextClassLoader( originalClassLoader );
+            if ( classLoader != null )
+            {
+                Thread.currentThread().setContextClassLoader( originalClassLoader );
+            }
             sink.close();
         }
 
@@ -231,6 +283,47 @@ public class ReportDocumentRenderer
         }
     }
 
+    /**
+     * Try to generate report with extended multi-page API.
+     * 
+     * @return <code>true</code> if the report was compatible with the extended API
+     */
+    private boolean generateMultiPage( Locale locale, SinkFactory sf, Sink sink )
+        throws MavenReportException
+    {
+        try
+        {
+            // MavenMultiPageReport is not in Maven Core, then the class is different in site plugin and in each report
+            // plugin: only reflection can let us invoke its method
+            Method generate =
+                report.getClass().getMethod( "generate", Sink.class, SinkFactory.class, Locale.class );
+
+            generate.invoke( report, sink, sf, locale );
+
+            return true;
+        }
+        catch ( SecurityException se )
+        {
+            return false;
+        }
+        catch ( NoSuchMethodException nsme )
+        {
+            return false;
+        }
+        catch ( IllegalArgumentException iae )
+        {
+            throw new MavenReportException( "error while invoking generate", iae );
+        }
+        catch ( IllegalAccessException iae )
+        {
+            throw new MavenReportException( "error while invoking generate", iae );
+        }
+        catch ( InvocationTargetException ite )
+        {
+            throw new MavenReportException( "error while invoking generate", ite );
+        }
+    }
+
     public String getOutputName()
     {
         return renderingContext.getOutputName();

Modified: maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/MavenReportExecution.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/MavenReportExecution.java?rev=1085630&r1=1085629&r2=1085630&view=diff
==============================================================================
--- maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/MavenReportExecution.java (original)
+++ maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/MavenReportExecution.java Sat Mar 26 02:43:30 2011
@@ -58,6 +58,11 @@ public class MavenReportExecution
         this.classLoader = classLoader;
     }
 
+    public MavenReportExecution( MavenReport mavenReport )
+    {
+        this( null, mavenReport, null );
+    }
+
     public MavenReport getMavenReport()
     {
         return mavenReport;

Modified: maven/plugins/branches/maven-site-plugin-3.x/src/test/java/org/apache/maven/plugins/site/AbstractSiteDeployWebDavTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-site-plugin-3.x/src/test/java/org/apache/maven/plugins/site/AbstractSiteDeployWebDavTest.java?rev=1085630&r1=1085629&r2=1085630&view=diff
==============================================================================
--- maven/plugins/branches/maven-site-plugin-3.x/src/test/java/org/apache/maven/plugins/site/AbstractSiteDeployWebDavTest.java (original)
+++ maven/plugins/branches/maven-site-plugin-3.x/src/test/java/org/apache/maven/plugins/site/AbstractSiteDeployWebDavTest.java Sat Mar 26 02:43:30 2011
@@ -38,7 +38,6 @@ import org.apache.maven.plugins.site.Sim
 import org.apache.maven.plugins.site.stubs.SiteMavenProjectStub;
 import org.apache.maven.settings.Proxy;
 import org.apache.maven.settings.Settings;
-import org.apache.maven.settings.crypto.SettingsDecrypter;
 import org.codehaus.plexus.util.ReflectionUtils;
 import org.junit.Before;
 import org.junit.Test;
@@ -149,9 +148,6 @@ public abstract class AbstractSiteDeploy
             
             setVariableValueToObject( mojo, "mavenSession", mavenSession );
             
-            SettingsDecrypter settingsDecrypter = getContainer().lookup( SettingsDecrypter.class );
-            setVariableValueToObject( mojo, "settingsDecrypter", settingsDecrypter );
-            
             File inputDirectory = new File( "src/test/resources/unit/deploy-dav/target/site" );
             
             setVariableValueToObject( mojo, "inputDirectory", inputDirectory );
@@ -220,9 +216,6 @@ public abstract class AbstractSiteDeploy
             
             setVariableValueToObject( mojo, "mavenSession", mavenSession );
             
-            SettingsDecrypter settingsDecrypter = getContainer().lookup( SettingsDecrypter.class );
-            setVariableValueToObject( mojo, "settingsDecrypter", settingsDecrypter );
-            
             File inputDirectory = new File( "src/test/resources/unit/deploy-dav/target/site" );
             
             // test which mojo we are using