Re: module naming syntax
Glenn Burkhardt <[email protected]> Tue, 14 May 2019 06:45:52 -0400
| Newsgroups | gmane.comp.jakarta.ant.user |
|---|---|
| Message-ID | <[email protected]> |
On 5/14/2019 3:01 AM, Stefan Bodewig wrote: > 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: [email protected] > For additional commands, e-mail: [email protected] > <java fork="true" modulepath="jaxb-ri/mod" module="com.sun.tools.xjc" classname="com.sun.tools.xjc.XJCFacade" > <arg value="-d"/> <arg value="out"/> <arg value="-p"/> <arg value="generated"/> <arg value="Schema_Specification.xsd"/> </java> works.