maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r329056 - /maven/components/trunk/maven-plugins/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/LicenseReport.java
Date Fri, 28 Oct 2005 03:02:39 GMT
Author: brett
Date: Thu Oct 27 20:02:38 2005
New Revision: 329056

URL: http://svn.apache.org/viewcvs?rev=329056&view=rev
Log:
add offline mode

Modified:
    maven/components/trunk/maven-plugins/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/LicenseReport.java

Modified: maven/components/trunk/maven-plugins/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/LicenseReport.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/LicenseReport.java?rev=329056&r1=329055&r2=329056&view=diff
==============================================================================
--- maven/components/trunk/maven-plugins/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/LicenseReport.java
(original)
+++ maven/components/trunk/maven-plugins/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/LicenseReport.java
Thu Oct 27 20:02:38 2005
@@ -76,6 +76,12 @@
     private MavenProject project;
 
     /**
+     * Whether the system is currently offline.
+     * @parameter expression="${settings.offline}"
+     */
+    private boolean offline;
+
+    /**
      * @see org.apache.maven.reporting.MavenReport#getName(java.util.Locale)
      */
     public String getName( Locale locale )
@@ -128,9 +134,16 @@
      */
     public void executeReport( Locale locale )
     {
-        LicenseRenderer r = new LicenseRenderer( getSink(), getProject(), locale );
+        if ( !offline )
+        {
+            LicenseRenderer r = new LicenseRenderer( getSink(), getProject(), locale );
 
-        r.render();
+            r.render();
+        }
+        else
+        {
+            getLog().info( "Not generating license report while offline." );
+        }
     }
 
     /**
@@ -368,4 +381,4 @@
 
         return sb.toString();
     }
-}
\ No newline at end of file
+}



Mime
View raw message