maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Herve Boutemy (JIRA)" <>
Subject [jira] Closed: (MJAVADOC-292) javadoc:jar FATAL ERROR Host name may not be null
Date Sun, 01 May 2011 19:39:22 GMT


Herve Boutemy closed MJAVADOC-292.

       Resolution: Fixed
    Fix Version/s: 2.8
         Assignee: Herve Boutemy

fixed with MJAVADOC-317: the link is not checked by the plugin but javadoc tool

> javadoc:jar FATAL ERROR Host name may not be null
> -------------------------------------------------
>                 Key: MJAVADOC-292
>                 URL:
>             Project: Maven 2.x Javadoc Plugin
>          Issue Type: Bug
>    Affects Versions: 2.7
>         Environment: Ubuntu 10.04 & Windows XP. Running maven 2.2.1 java 1.6.0_14
>            Reporter: Richard Mortimer
>            Assignee: Herve Boutemy
>             Fix For: 2.8
>         Attachments: maven-javadoc-null-host.patch
> For some reason (that I have yet to determine) I am using a bad URL when linking to the
jdk6 apidocs. This causes my javadoc:jar to terminate with a fatal error. This is doubly problematic
> (a) the error message does not include the URL that is at fault; and
> (b) the build crashes out where other similar badly configured javadoc link URLs continue
after emitting a warning message.
> {noformat}[INFO] [INFO] [javadoc:jar {execution: attach-javadocs}]
> [INFO] [INFO] ------------------------------------------------------------------------
> [INFO] [INFO] ------------------------------------------------------------------------
> [INFO] [INFO] Host name may not be null
> [INFO] [INFO] ------------------------------------------------------------------------
> [INFO] [INFO] Trace
> [INFO] java.lang.IllegalArgumentException: Host name may not be null
> [INFO] 	at org.apache.commons.httpclient.HttpHost.<init>(
> [INFO] 	at org.apache.commons.httpclient.HttpHost.<init>(
> [INFO] 	at org.apache.commons.httpclient.HttpMethodBase.setURI(
> [INFO] 	at org.apache.commons.httpclient.HttpMethodBase.<init>(
> [INFO] 	at org.apache.commons.httpclient.methods.GetMethod.<init>(
> [INFO] 	at org.apache.maven.plugin.javadoc.JavadocUtil.fetchURL(
> [INFO] 	at org.apache.maven.plugin.javadoc.AbstractJavadocMojo.isValidJavadocLink(
> [INFO] 	at org.apache.maven.plugin.javadoc.AbstractJavadocMojo.addLinkArguments(
> [INFO] 	at org.apache.maven.plugin.javadoc.AbstractJavadocMojo.addStandardDocletOptions(
> [INFO] 	at org.apache.maven.plugin.javadoc.AbstractJavadocMojo.executeReport(
> [INFO] 	at org.apache.maven.plugin.javadoc.JavadocJar.execute(
> [INFO] 	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
> [INFO] 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> [INFO] 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(
> [INFO] 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
> [INFO] 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(
> [INFO] 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> [INFO] 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> [INFO] 	at org.apache.maven.DefaultMaven.doExecute(
> [INFO] 	at org.apache.maven.DefaultMaven.execute(
> [INFO] 	at org.apache.maven.cli.MavenCli.main(
> [INFO] 	at org.apache.maven.cli.compat.CompatibleMain.main(
> [INFO] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [INFO] 	at sun.reflect.NativeMethodAccessorImpl.invoke(
> [INFO] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> [INFO] 	at java.lang.reflect.Method.invoke(
> [INFO] 	at org.codehaus.classworlds.Launcher.launchEnhanced(
> [INFO] 	at org.codehaus.classworlds.Launcher.launch(
> [INFO] 	at org.codehaus.classworlds.Launcher.mainWithExitCode(
> [INFO] 	at org.codehaus.classworlds.Launcher.main({noformat}
> I have attached a patch that catches the IllegalArgumentException that is thrown by httpclient
and logs a suitable error message. I suspect that this is not the best way to fix the issue
because it might mask other errors but it certainly gets me past my immediate issue.
> With the patch applied the fatal error becomes a single line as follows and the build
> [ERROR] Malformed link: http:/// Ignored it.
> I have tested with both 2.7 and trunk and have confirmed that the problem exists in both
and that the patch works on both.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message