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

@ -81,6 +81,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.
* See <a href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html#d">d</a>. * See <a href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html#d">d</a>.
@ -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 ) );
if ( !isOffline )
{
addArgIfNotEmpty( arguments, "-link", quotedPathArgument( link ), true ); addArgIfNotEmpty( arguments, "-link", quotedPathArgument( link ), true );
addArgIfNotEmpty( arguments, "-linkoffline", quotedPathArgument( linkoffline ), true ); addArgIfNotEmpty( arguments, "-linkoffline", quotedPathArgument( linkoffline ), true );
addArgIf( arguments, linksource, "-linksource", 1.4f ); 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 );