mirror of https://github.com/apache/maven.git
MNG-891(Javadoc fails to include libraries): Readded cmd.createArgument().setValue( ... ) for all elements in the arguments list; Formatted code.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@280832 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6c2fbc16a7
commit
eb89e520e4
|
@ -614,6 +614,7 @@ public class JavadocReport
|
||||||
for ( Iterator i = getProject().getCompileClasspathElements().iterator(); i.hasNext(); )
|
for ( Iterator i = getProject().getCompileClasspathElements().iterator(); i.hasNext(); )
|
||||||
{
|
{
|
||||||
classpath.append( (String) i.next() );
|
classpath.append( (String) i.next() );
|
||||||
|
|
||||||
if ( i.hasNext() )
|
if ( i.hasNext() )
|
||||||
{
|
{
|
||||||
classpath.append( PATH_SEPARATOR );
|
classpath.append( PATH_SEPARATOR );
|
||||||
|
@ -636,12 +637,12 @@ public class JavadocReport
|
||||||
|
|
||||||
File javadocDirectory = getReportOutputDirectory();
|
File javadocDirectory = getReportOutputDirectory();
|
||||||
|
|
||||||
if ( ! javadocDirectory.equals( getOutputDirectory() ) )
|
if ( !javadocDirectory.equals( getOutputDirectory() ) )
|
||||||
{
|
{
|
||||||
// we're in site-embedded report mode, so Doxia has set the
|
// we're in site-embedded report mode, so Doxia has set the
|
||||||
// reportOutputDirectory to the basedir of the site.
|
// reportOutputDirectory to the basedir of the site.
|
||||||
// Append 'apidocs'.
|
// Append 'apidocs'.
|
||||||
javadocDirectory = new File( javadocDirectory, "apidocs" );
|
javadocDirectory = new File( javadocDirectory, "apidocs" );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( fileList != null && fileList.length != 0 )
|
if ( fileList != null && fileList.length != 0 )
|
||||||
|
@ -711,7 +712,8 @@ public class JavadocReport
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( ( NumberUtils.isDigits( minmemory.substring( 0, minmemory.length() - 1 ) ) ) && ( minmemory.toLowerCase().endsWith( "m" ) ) )
|
if ( ( NumberUtils.isDigits( minmemory.substring( 0, minmemory.length() - 1 ) ) )
|
||||||
|
&& ( minmemory.toLowerCase().endsWith( "m" ) ) )
|
||||||
{
|
{
|
||||||
addArgIf( arguments, true, "-J-Xms" + minmemory );
|
addArgIf( arguments, true, "-J-Xms" + minmemory );
|
||||||
}
|
}
|
||||||
|
@ -752,7 +754,8 @@ public class JavadocReport
|
||||||
{
|
{
|
||||||
bottom = "Copyright © " + year + " ";
|
bottom = "Copyright © " + year + " ";
|
||||||
|
|
||||||
if ( ( model.getOrganization() != null ) && ( !StringUtils.isEmpty( model.getOrganization().getName() ) ) )
|
if ( ( model.getOrganization() != null )
|
||||||
|
&& ( !StringUtils.isEmpty( model.getOrganization().getName() ) ) )
|
||||||
{
|
{
|
||||||
bottom += model.getOrganization().getName();
|
bottom += model.getOrganization().getName();
|
||||||
}
|
}
|
||||||
|
@ -769,7 +772,8 @@ public class JavadocReport
|
||||||
}
|
}
|
||||||
if ( windowtitle.equals( DEFAULT_WINDOW_TITLE ) )
|
if ( windowtitle.equals( DEFAULT_WINDOW_TITLE ) )
|
||||||
{
|
{
|
||||||
windowtitle = ( model.getName() == null ? model.getArtifactId() : model.getName() ) + " " + model.getVersion() + " API";
|
windowtitle = ( model.getName() == null ? model.getArtifactId() : model.getName() ) + " "
|
||||||
|
+ model.getVersion() + " API";
|
||||||
}
|
}
|
||||||
if ( doctitle.equals( DEFAULT_DOCTITLE ) )
|
if ( doctitle.equals( DEFAULT_DOCTITLE ) )
|
||||||
{
|
{
|
||||||
|
@ -814,6 +818,12 @@ public class JavadocReport
|
||||||
addArgIfNotEmpty( arguments, "-windowtitle", windowtitle );
|
addArgIfNotEmpty( arguments, "-windowtitle", windowtitle );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for ( Iterator it = arguments.iterator(); it.hasNext(); )
|
||||||
|
{
|
||||||
|
String current = (String) it.next();
|
||||||
|
cmd.createArgument().setValue( current );
|
||||||
|
}
|
||||||
|
|
||||||
cmd.createArgument().setValue( "@files" );
|
cmd.createArgument().setValue( "@files" );
|
||||||
|
|
||||||
getLog().info( Commandline.toString( cmd.getCommandline() ) );
|
getLog().info( Commandline.toString( cmd.getCommandline() ) );
|
||||||
|
@ -858,7 +868,7 @@ public class JavadocReport
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
javadocExe = new File( SystemUtils .getJavaHome() + "/../bin", javadocCommand );
|
javadocExe = new File( SystemUtils.getJavaHome() + "/../bin", javadocCommand );
|
||||||
}
|
}
|
||||||
|
|
||||||
getLog().debug( "Javadoc executable=[" + javadocExe.getAbsolutePath() + "]" );
|
getLog().debug( "Javadoc executable=[" + javadocExe.getAbsolutePath() + "]" );
|
||||||
|
@ -939,7 +949,7 @@ public class JavadocReport
|
||||||
{
|
{
|
||||||
arguments.add( key );
|
arguments.add( key );
|
||||||
|
|
||||||
StringTokenizer token = new StringTokenizer( value, ",", false );
|
StringTokenizer token = new StringTokenizer( value, "," );
|
||||||
while ( token.hasMoreTokens() )
|
while ( token.hasMoreTokens() )
|
||||||
{
|
{
|
||||||
String current = token.nextToken().trim();
|
String current = token.nextToken().trim();
|
||||||
|
@ -985,7 +995,8 @@ public class JavadocReport
|
||||||
* @param requiredJavaVersion the required Java version, for example 1.31f or 1.4f
|
* @param requiredJavaVersion the required Java version, for example 1.31f or 1.4f
|
||||||
* @param repeatKey repeat or not the key in the command line
|
* @param repeatKey repeat or not the key in the command line
|
||||||
*/
|
*/
|
||||||
private void addArgIfNotEmpty( List arguments, String key, String value, float requiredJavaVersion, boolean repeatKey )
|
private void addArgIfNotEmpty( List arguments, String key, String value, float requiredJavaVersion,
|
||||||
|
boolean repeatKey )
|
||||||
{
|
{
|
||||||
if ( SystemUtils.isJavaVersionAtLeast( requiredJavaVersion ) )
|
if ( SystemUtils.isJavaVersionAtLeast( requiredJavaVersion ) )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue