You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Arun Katkere <ka...@praja.com> on 2000/07/11 01:40:00 UTC

Javadoc linkoffline

Has anyone gotten linkoffline attribute of Javadoc task to work at all. Here
is the problem I am facing:

- the two URLs passed to linkoffline are treated as a single attribute:

// add the single linkoffline arguments
if (linkoffline != null) {
   argList.addElement("-linkoffline");
   argList.addElement(linkoffline);
}

- Javadoc task quotes each argument with double quotes:

if (!arg.startsWith("-")) {
  b.append("\"");
  b.append(arg);
  b.append("\"");
}

- When Javadoc is exec'd, it tries to use the argument after linkoffline
(typically package name) to find package-list (results in FATAL ERROR).
E.g., if linkoffline is
linkoffline="http://java.sun.com/products/jdk/1.3/docs/api
javadoc-package-lists/jdk1.3", javadoc is invoked with

javadoc ... -linkoffline "http://java.sun.com/products/jdk/1.3/docs/api
javadoc-package-lists/jdk1.3" com.foo.bar

and javadoc complains about com.foo.bar/package-list not found (instead of
looking for file javadoc-package-lists/jdk1.3/package-lists which exists).

If I execute javadoc by hand without the double quotes, it executes
successfully.

Any workarounds? I noticed that code to handle link/linkoffline lists is in.
How do we use it?

-arun

ps: I noticed the "argument J in javadoc1 is not supported (what is that for
anyway?)" comment in the code. Well, you can use it to specify proxy host
and port definitions to JVM and get around linkoffline all together!

RE: Javadoc linkoffline

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
Ernst and Arun,

It appears that the attribute version of the linkoffline is broken. It
really needs to separate the value into two arguments (presumably using a
space drive tokenizer). I'll have a look at it. I wouldn't recommend you use
the technique you have outlined as it relies too much on the way the
implementation orders it arguments. That could change. The better approach
is to use the new <link> nested element. Have a look at the latest
documentation for an example of how to use it. In fact I think we should
deprecate the link and linkoffline attributes.

Conor


--
Conor MacNeill
conor@cortexebusiness.com.au
Cortex eBusiness
http://www.cortexebusiness.com.au

> -----Original Message-----
> From: Ernst de Haan [mailto:ernst@jollem.com]
> Sent: Tuesday, 11 July 2000 16:00
> To: ant-dev@jakarta.apache.org
> Subject: Re: Javadoc linkoffline
>
>
> Hi Arun,
>
>
> I am not sure if this is solved in the latest version of Ant (Conor ?)
> But I do know a dirty workaround: I use linkoffline as follows:
>
>    <target ...>
>       <javadoc ...
>                linkoffline="url1"
>                packages="url2,${packages}"
>                ...
>       />
>    </target>
>
> This works in practice, at least with last weeks version of the Javadoc
> task. ${packages} would be something like "com.foo.x,com.foo.y".
>
>
> Ernst
>
>
> Arun Katkere wrote:
> > Has anyone gotten linkoffline attribute of Javadoc task to work
> at all. Here
> > is the problem I am facing:
> >
> > - the two URLs passed to linkoffline are treated as a single attribute:
> >
> > // add the single linkoffline arguments
> > if (linkoffline != null) {
> >    argList.addElement("-linkoffline");
> >    argList.addElement(linkoffline);
> > }
> >
> > - Javadoc task quotes each argument with double quotes:
> >
> > if (!arg.startsWith("-")) {
> >   b.append("\"");
> >   b.append(arg);
> >   b.append("\"");
> > }
> >
> > - When Javadoc is exec'd, it tries to use the argument after linkoffline
> > (typically package name) to find package-list (results in FATAL ERROR).
> > E.g., if linkoffline is
> > linkoffline="http://java.sun.com/products/jdk/1.3/docs/api
> > javadoc-package-lists/jdk1.3", javadoc is invoked with
> >
> > javadoc ... -linkoffline "http://java.sun.com/products/jdk/1.3/docs/api
> > javadoc-package-lists/jdk1.3" com.foo.bar
> >
> > and javadoc complains about com.foo.bar/package-list not found
> (instead of
> > looking for file javadoc-package-lists/jdk1.3/package-lists
> which exists).
> >
> > If I execute javadoc by hand without the double quotes, it executes
> > successfully.
> >
> > Any workarounds? I noticed that code to handle link/linkoffline
> lists is in.
> > How do we use it?
> >
> > -arun
> >
> > ps: I noticed the "argument J in javadoc1 is not supported
> (what is that for
> > anyway?)" comment in the code. Well, you can use it to specify
> proxy host
> > and port definitions to JVM and get around linkoffline all together!
>


Re: Javadoc linkoffline

Posted by Ernst de Haan <er...@jollem.com>.
Hi Arun,


I am not sure if this is solved in the latest version of Ant (Conor ?)
But I do know a dirty workaround: I use linkoffline as follows:

   <target ...>
      <javadoc ...
               linkoffline="url1"
               packages="url2,${packages}"
               ...
      />
   </target>

This works in practice, at least with last weeks version of the Javadoc
task. ${packages} would be something like "com.foo.x,com.foo.y".


Ernst


Arun Katkere wrote:
> Has anyone gotten linkoffline attribute of Javadoc task to work at all. Here
> is the problem I am facing:
> 
> - the two URLs passed to linkoffline are treated as a single attribute:
> 
> // add the single linkoffline arguments
> if (linkoffline != null) {
>    argList.addElement("-linkoffline");
>    argList.addElement(linkoffline);
> }
> 
> - Javadoc task quotes each argument with double quotes:
> 
> if (!arg.startsWith("-")) {
>   b.append("\"");
>   b.append(arg);
>   b.append("\"");
> }
> 
> - When Javadoc is exec'd, it tries to use the argument after linkoffline
> (typically package name) to find package-list (results in FATAL ERROR).
> E.g., if linkoffline is
> linkoffline="http://java.sun.com/products/jdk/1.3/docs/api
> javadoc-package-lists/jdk1.3", javadoc is invoked with
> 
> javadoc ... -linkoffline "http://java.sun.com/products/jdk/1.3/docs/api
> javadoc-package-lists/jdk1.3" com.foo.bar
> 
> and javadoc complains about com.foo.bar/package-list not found (instead of
> looking for file javadoc-package-lists/jdk1.3/package-lists which exists).
> 
> If I execute javadoc by hand without the double quotes, it executes
> successfully.
> 
> Any workarounds? I noticed that code to handle link/linkoffline lists is in.
> How do we use it?
> 
> -arun
> 
> ps: I noticed the "argument J in javadoc1 is not supported (what is that for
> anyway?)" comment in the code. Well, you can use it to specify proxy host
> and port definitions to JVM and get around linkoffline all together!