mirror of https://github.com/apache/maven.git
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:
parent
3bcac3bd2f
commit
dc85782bbc
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue