Jigsaw + Ant

Tomas Zezula tomas.zezula at oracle.com
Wed Mar 30 05:53:56 UTC 2016


Hi All,
the Ant 1.9.7alpha (https://ant.apache.org/nightlies.html) now supports modules in the Javac and Java tasks.

The Javac single module compilation example:

<javac srcdir="${src}"
         destdir="${build}"
         includeantruntime="false"
         modulepath="modules"
         source="9"
  />


The Javac multi-module compilation example:

<javac modulesourcepath="${src}/*/{gen,lin{32,64}}/classes"
         destdir="${build}"
         includeantruntime="false"
         modulepath="modules"
         source="9"
  />

The main module execution example:

<java fork="true"
           module="TestModule"
           modulepath="lib:dist/test.jar”/>

An execution of an explicit main class in a module:

<java fork="true"
           module="TestModule"
           classname="Main">
         <modulepath>
           <pathelement location="lib"/>
           <pathelement location="dist/test.jar"/>
         </modulepath>
       </java>


— Tomas


More information about the jigsaw-dev mailing list