You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Douglas Kramer <Do...@Sun.COM> on 2005/01/27 23:53:28 UTC
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>
The equivalent command line command that works is:
java \
-classpath /mifdoclet/ws/build/jar/mifdoclet_toolkit.jar:/programs/jdk1.5.0/lib/tools.jar \
com.sun.tools.javadoc.Main \
-doclet com.sun.tools.doclets.formats.mif.MIFDoclet \
-d ./sample-out \
-sourcepath ../sample-src \
com.package1
Could something be wrong with the <arg value=xxx> lines?
-Doug
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Ant: java task - invalid flag
Posted by Matt Benson <gu...@yahoo.com>.
--- Douglas Kramer <Do...@Sun.COM> wrote:
> Instant success!! Thank you.
>
> Any explanation for why the anomaly that <arg>
> cannot contain a value
> space-separated parameters, contrary to the
> documentation:
>
> value a single command-line argument; can
> contain space characters.
>
> Perhaps because Ant thinks it is an argument to
> java, not javadoc?
DD explained it perfectly; I'm sure you composed this
before you saw his answer.
But as he said, why *don't* you use the javadoc task?
-Matt
>
> -Doug
>
> Matt Benson wrote:
> > --- Douglas Kramer <Do...@Sun.COM> wrote:
> >
> >
> >>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.
> >
> > [SNIP]
> >
> >>Could something be wrong with the <arg value=xxx>
> >>lines?
> >>
> >
> > Can you first try:
> >
> > <arg value="-doclet" />
> > <arg
> >
> value="com.sun.tools.doclets.formats.mif.MIFDoclet"
> />
> >
> > instead of:
> >
> > <arg value="-doclet
> > com.sun.tools.doclets.formats.mif.MIFDoclet" />
> >
> > ?
> >
> > -Matt
> >
> >
> >>-Doug
> >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
>
>
__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Ant: java task - invalid flag
Posted by Douglas Kramer <Do...@Sun.COM>.
Instant success!! Thank you.
Any explanation for why the anomaly that <arg> cannot contain a value
space-separated parameters, contrary to the documentation:
value a single command-line argument; can contain space characters.
Perhaps because Ant thinks it is an argument to java, not javadoc?
-Doug
Matt Benson wrote:
> --- Douglas Kramer <Do...@Sun.COM> wrote:
>
>
>>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.
>
> [SNIP]
>
>>Could something be wrong with the <arg value=xxx>
>>lines?
>>
>
> Can you first try:
>
> <arg value="-doclet" />
> <arg
> value="com.sun.tools.doclets.formats.mif.MIFDoclet" />
>
> instead of:
>
> <arg value="-doclet
> com.sun.tools.doclets.formats.mif.MIFDoclet" />
>
> ?
>
> -Matt
>
>
>>-Doug
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Ant: java task - invalid flag
Posted by Matt Benson <gu...@yahoo.com>.
--- Douglas Kramer <Do...@Sun.COM> wrote:
> 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.
[SNIP]
>
> Could something be wrong with the <arg value=xxx>
> lines?
>
Can you first try:
<arg value="-doclet" />
<arg
value="com.sun.tools.doclets.formats.mif.MIFDoclet" />
instead of:
<arg value="-doclet
com.sun.tools.doclets.formats.mif.MIFDoclet" />
?
-Matt
> -Doug
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org