maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r819745 - /maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/DefaultMavenReportExecutor.java
Date Mon, 28 Sep 2009 22:04:00 GMT
Author: olamy
Date: Mon Sep 28 22:04:00 2009
New Revision: 819745

URL: http://svn.apache.org/viewvc?rev=819745&view=rev
Log:
set offline flag in pluginVersionRequest (value from the mavenSession)

Modified:
    maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/DefaultMavenReportExecutor.java

Modified: maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/DefaultMavenReportExecutor.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/DefaultMavenReportExecutor.java?rev=819745&r1=819744&r2=819745&view=diff
==============================================================================
--- maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/DefaultMavenReportExecutor.java
(original)
+++ maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/DefaultMavenReportExecutor.java
Mon Sep 28 22:04:00 2009
@@ -74,7 +74,7 @@
     
     @Requirement
     protected PluginVersionResolver pluginVersionResolver;
-
+    
     public List<MavenReportExecution> buildMavenReports( MavenReportExecutorRequest
mavenReportExecutorRequest )
         throws MojoExecutionException
     {
@@ -91,7 +91,7 @@
         imports.add( "org.codehaus.doxia.sink.Sink" );
         imports.add( "org.apache.maven.doxia.sink.Sink" );
         imports.add( "org.apache.maven.doxia.sink.SinkEventAttributes" );
-
+       
         RepositoryRequest repositoryRequest = new DefaultRepositoryRequest();
         repositoryRequest.setLocalRepository( mavenReportExecutorRequest.getLocalRepository()
);
         
@@ -111,7 +111,7 @@
                 Plugin plugin = new Plugin();
                 plugin.setGroupId( reportPlugin.getGroupId() );
                 plugin.setArtifactId( reportPlugin.getArtifactId() );
-                plugin.setVersion( getPluginVersion (reportPlugin, repositoryRequest, mavenReportExecutorRequest.getProject()
) );
+                plugin.setVersion( getPluginVersion (reportPlugin, repositoryRequest, mavenReportExecutorRequest
) );
 
                 if (logger.isInfoEnabled())
                 {
@@ -344,7 +344,7 @@
         return logger;
     }
     
-    protected String getPluginVersion( ReportPlugin reportPlugin, RepositoryRequest repositoryRequest,
MavenProject project )
+    protected String getPluginVersion( ReportPlugin reportPlugin, RepositoryRequest repositoryRequest,
MavenReportExecutorRequest mavenReportExecutorRequest )
         throws PluginVersionResolutionException
     {
         if ( getLog().isDebugEnabled() )
@@ -356,6 +356,8 @@
             return reportPlugin.getVersion();
         }
         
+        MavenProject project = mavenReportExecutorRequest.getProject();
+        
         // search in the build section
         if ( project.getBuild() != null )
         {
@@ -398,6 +400,11 @@
         logger.warn( "" );
 
         PluginVersionRequest pluginVersionRequest = new DefaultPluginVersionRequest( repositoryRequest
);
+        pluginVersionRequest.setOffline( mavenReportExecutorRequest.getMavenSession().isOffline()
);
+        
+        // FIXME how to get this from the mavenSession ? 
+        //pluginVersionRequest.setForceUpdate( forceUpdate )
+        
         pluginVersionRequest.setGroupId( reportPlugin.getGroupId() );
         pluginVersionRequest.setArtifactId( reportPlugin.getArtifactId() );
         PluginVersionResult result = pluginVersionResolver.resolve( pluginVersionRequest
);



Mime
View raw message