Resolving: MNG-1004...won't add link args if maven is offline.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@315043 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
John Dennis Casey 2005-10-12 20:51:04 +00:00
parent 2bc772a524
commit b99ea0af8a
1 changed files with 15 additions and 3 deletions

View File

@ -80,6 +80,13 @@ public class JavadocReport
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
// Mojo Parameters // Mojo Parameters
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
/**
* @parameter default-value="${settings.offline}"
* @required
* @readonly
*/
private boolean isOffline;
/** /**
* Specifies the destination directory where javadoc saves the generated HTML files. * Specifies the destination directory where javadoc saves the generated HTML files.
@ -798,9 +805,14 @@ public class JavadocReport
addArgIfNotEmpty( arguments, "-group", quotedArgument( group ), true ); addArgIfNotEmpty( arguments, "-group", quotedArgument( group ), true );
addArgIfNotEmpty( arguments, "-header", quotedArgument( header ) ); addArgIfNotEmpty( arguments, "-header", quotedArgument( header ) );
addArgIfNotEmpty( arguments, "-helpfile", quotedPathArgument( helpfile ) ); addArgIfNotEmpty( arguments, "-helpfile", quotedPathArgument( helpfile ) );
addArgIfNotEmpty( arguments, "-link", quotedPathArgument( link ), true );
addArgIfNotEmpty( arguments, "-linkoffline", quotedPathArgument( linkoffline ), true ); if ( !isOffline )
addArgIf( arguments, linksource, "-linksource", 1.4f ); {
addArgIfNotEmpty( arguments, "-link", quotedPathArgument( link ), true );
addArgIfNotEmpty( arguments, "-linkoffline", quotedPathArgument( linkoffline ), true );
addArgIf( arguments, linksource, "-linksource", 1.4f );
}
addArgIf( arguments, nodeprecated, "-nodeprecated" ); addArgIf( arguments, nodeprecated, "-nodeprecated" );
addArgIf( arguments, nodeprecatedlist, "-nodeprecatedlist" ); addArgIf( arguments, nodeprecatedlist, "-nodeprecatedlist" );
addArgIf( arguments, nocomment, "-nocomment", 1.4f ); addArgIf( arguments, nocomment, "-nocomment", 1.4f );