Author: olamy Date: Mon Aug 17 22:13:27 2009 New Revision: 805180 URL: http://svn.apache.org/viewvc?rev=805180&view=rev Log: fix with current mvn trunk. NOTE : to build you need to apply patch from MNG-4162 in trunk
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/AbstractSiteRenderingMojo.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=805180&r1=805179&r2=805180&view=diff ============================================================================== --- maven/plugins/branches/maven-site-plugin-3.x/pom.xml (original) +++ maven/plugins/branches/maven-site-plugin-3.x/pom.xml Mon Aug 17 22:13:27 2009 @@ -322,7 +322,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-site-plugin</artifactId> - <version>3.0-beta-1-SNAPSHOT</version> + <version>${project.version}</version> </plugin> </plugins> </pluginManagement> 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=805180&r1=805179&r2=805180&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 Mon Aug 17 22:13:27 2009 @@ -30,9 +30,10 @@ import java.util.Locale; import java.util.Map; -import org.apache.maven.Maven; import org.apache.maven.artifact.factory.ArtifactFactory; import org.apache.maven.artifact.repository.ArtifactRepository; +import org.apache.maven.artifact.repository.DefaultRepositoryRequest; +import org.apache.maven.artifact.repository.RepositoryRequest; import org.apache.maven.artifact.resolver.ArtifactResolver; import org.apache.maven.classrealm.ClassRealmManager; import org.apache.maven.doxia.module.xhtml.decoration.render.RenderingContext; @@ -53,7 +54,6 @@ import org.apache.maven.plugin.MojoExecution; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; -import org.apache.maven.plugin.PluginConfigurationException; import org.apache.maven.plugin.PluginManager; import org.apache.maven.plugin.PluginManagerException; import org.apache.maven.plugin.descriptor.MojoDescriptor; @@ -282,6 +282,10 @@ private Map<MavenReport, ClassRealm> buildMavenReports() throws MojoExecutionException { + RepositoryRequest repositoryRequest = new DefaultRepositoryRequest(); + repositoryRequest.setLocalRepository( localRepository ); + repositoryRequest.setRemoteRepositories( mavenSession.getRequest().getRemoteRepositories() ); + try { @@ -302,7 +306,7 @@ // no report set we will execute all from the report plugin boolean emptyReports = goals.isEmpty(); - PluginDescriptor pluginDescriptor = pluginManager.loadPlugin( plugin, localRepository, repositories ); + PluginDescriptor pluginDescriptor = pluginManager.loadPlugin( plugin, repositoryRequest ); if (emptyReports) { @@ -316,8 +320,7 @@ for ( String goal : goals ) { MojoDescriptor mojoDescriptor = - pluginManager.getMojoDescriptor( plugin, goal, localRepository, - mavenSession.getRequest().getRemoteRepositories() ); + pluginManager.getMojoDescriptor( plugin, goal, repositoryRequest ); MojoExecution mojoExecution = new MojoExecution( plugin, goal, "report" + goal ); mojoExecution.setConfiguration( convert( mojoDescriptor ) );