Thanks for your help. A comment below.

Dominique Devienne wrote:
-----Original Message-----
From: Douglas Kramer [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 27, 2005 4:53 PM
To: [email protected]
Subject: Ant: java task - invalid flag

The following java task fails with this error:

javadoc: error - invalid flag: -doclet
com.sun.tools.doclets.formats.mif.MIFDoclet

which is a perfectly valid option for javadoc.

Notice java calls javadoc Main, which then

    <java dir="${sample}/example-commandline"
classname="com.sun.tools.javadoc.Main" maxmemory="20M">
        <classpath>
           <pathelement


location="/mifdoclet/ws/build/jar/mifdoclet_toolkit.jar"

/>
           <pathelement
               location="/jdk1.5.0/lib/tools.jar" />
        </classpath>
        <arg value="-doclet

com.sun.tools.doclets.formats.mif.MIFDoclet"

/>
        <arg value="-d ./sample-out" />
        <arg value="-sourcepath ../sample-src" />
        <arg value="com.package1" />
    </java>


Why not use <javadoc> instead?

This is just an interim solution. I can't use <javadoc> because I have a package namespace conflict with the JDK and must set the classpath *prior* to running javadoc so my modified classes are ahead of the JDK classes on the classpath. I work at Sun and am using slightly modified copies of JDK classes to develop a doclet toolkit.

In any case, <arg> has two distinct attributes:
1) value for a single argument used as-is, even if with spaces.

Yes, I am confused. It would help if the manual example for value were less ambiguous:

  <arg value="-l -a"/>

This looks to me like two command line options with a space.
http://ant.apache.org/manual/using.html#arg

How about if I submit a request to change the example to:

  <arg value="Program Files">

That's a single argument with a space that many can relate to.

2) line for a command-line like multi-arg sequence with spaces in
between args.

You're confusing value with line above. --DD

-Doug

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to