ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: module naming syntax
Date Tue, 14 May 2019 07:01:54 GMT
On 2019-05-14, Glenn Burkhardt wrote:

>   <java fork="true" modulepath="axb-ri/mod"
> module="com.sun.tools.xjc/com.sun.tools.xjc.XJCFacade">
>                 <arg value="-d out"/>
>                 <arg value="-p generated"/>
>                 <arg value="Schema_Specification.xsd"/>
>  </java>

> Running 'ant' in verbose mode, it shows that the argument "-m
> com.sun.tools.xjc\com.sun.tools.xjc.XJCFacade" is passed to the Java
> program.

I think what happens here is CommandlineJava#setModule is called with
executableType being null and thus Commandline#setExecutable is called
without the second argument which would prevent slash translation.

>From the top of my head I don't recall why we have a case for
executableType being null here at all rather than switching to module
mode immediately and processing the argument after that. There must be a
reason for that but figuring things out requires a bit more thought.

On second thought from looking at the code the java task seems to expect
you'd use

<java module="com.sun.tools.xjc"
      classname="com.sun.tools.xjc.XJCFacade" ...

instead. This contradicts the manual page which says module and
classname would couldn't be used at the same time, but please give it a
try.

The module attribute seems to really correspond to the module itself and
not the -m switch. We build the later from a combination of module and
classname.

At the very least we need to fix the documentation.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message