add offline mode

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@329056 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-10-28 03:02:38 +00:00
parent 3bcac3bd2f
commit dc85782bbc
1 changed files with 16 additions and 3 deletions

View File

@ -75,6 +75,12 @@ public class LicenseReport
*/
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)
*/
@ -128,9 +134,16 @@ public class LicenseReport
*/
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 @@ public class LicenseReport
return sb.toString();
}
}
}