diff options
author | Dominik Stadler <centic@apache.org> | 2021-05-13 12:11:38 +0000 |
---|---|---|
committer | Dominik Stadler <centic@apache.org> | 2021-05-13 12:11:38 +0000 |
commit | f3e670c1eb32afef345a2090db2eedce661c21b0 (patch) | |
tree | 36cd5a1e921da4b0889b55b028374fd022263776 /build.xml | |
parent | 41ff8bb20c9b1b127968becda2c67fad812e7015 (diff) | |
download | poi-f3e670c1eb32afef345a2090db2eedce661c21b0.tar.gz poi-f3e670c1eb32afef345a2090db2eedce661c21b0.zip |
Use proper module-name without "poi-" prefix when compiling module-java with Java 9+
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1889840 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build.xml')
-rw-r--r-- | build.xml | 24 |
1 files changed, 20 insertions, 4 deletions
@@ -1059,14 +1059,22 @@ under the License. </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> @@ -1125,7 +1133,7 @@ under the License. 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> @@ -2185,6 +2193,14 @@ under the License. <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" @@ -2192,7 +2208,7 @@ under the License. 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> |