</classpath>
</javac>
- <!-- compile jigsaw files to sources, so we don't forget to update/provide them for Java 8 builds -->
+ <local name="module-name"/>
+ <loadresource property="module-name">
+ <string>@{module}</string>
+ <filterchain>
+ <replacestring from="poi-" to=""/>
+ </filterchain>
+ </loadresource>
+
+ <!-- compile jigsaw files to sources, so we don't forget to update/provide them for Java 8 builds -->
<javac release="9"
srcdir="${basedir}/@{module}/src/main/java9"
destdir="${basedir}/@{module}/src/main/java9"
includeantruntime="false"
fork="true"
unless:true="${isJava8}">
- <compilerarg line="--patch-module org.apache.poi.@{module}=@{classes}"/>
+ <compilerarg line="--patch-module org.apache.poi.${module-name}=@{classes}"/>
<modulepath>
<lib/>
</modulepath>
includeantruntime="false"
fork="true"
unless:true="${isJava8}" unless:blank="@{test}">
- <compilerarg line="--patch-module org.apache.poi.@{module}=${merged}"/>
+ <compilerarg line="--patch-module org.apache.poi.${module-name}=${merged}"/>
<modulepath>
<lib/>
</modulepath>
<mkdir dir="@{src}/META-INF/versions/9"/>
+ <local name="module-name"/>
+ <loadresource property="module-name">
+ <string>@{module}</string>
+ <filterchain>
+ <replacestring from="poi-" to=""/>
+ </filterchain>
+ </loadresource>
+
<javac release="9"
srcdir="${basedir}/@{module}/src/main/java9"
destdir="@{src}/META-INF/versions/9"
fork="true"
modulepath="${main.lib}"
unless:true="${isJava8}">
- <compilerarg line="--patch-module org.apache.poi.@{module}=@{src}"/>
+ <compilerarg line="--patch-module org.apache.poi.${module-name}=@{src}"/>
<elements/>
</javac>